anchor.diff:  
   -module(riak_kv_console).
   
  --export([join/1, leave/1, status/1, reip/1]).
  +-export([join/1, leave/1, status/1, reip/1, ringready/1, transfers/1]).
   
   join([NodeStr]) ->
       case riak:join(NodeStr) of
  
positive.code:     format_stats(T, [io_lib:format("vnode gets : ~p~n", [V])|Acc]);
  format_stats([{Stat, V}|T], Acc) ->
      format_stats(T, [io_lib:format("~p : ~p~n", [Stat, V])|Acc]).
      
  
negative.code:     io:format("New ring file written to ~p~n", 
                [element(2, riak_core_ring_manager:find_latest_ringfile())]).
  
  %% Check if all nodes in the cluster agree on the partition assignment
  ringready([]) ->
      case get_rings() of
          {[], Rings} ->
              {N1,R1}=hd(Rings),
              case rings_match(hash_ring(R1), tl(Rings)) of
                  true ->
                      Nodes = [N || {N,_} <- Rings],
                      io:format("TRUE All nodes agree on the ring ~p\n", [Nodes]);
                  {false, N2} ->
                      io:format("FALSE Node ~p and ~p list different partition owners\n", [N1, N2]),
                      false % make nodetool exit 1
              end;
          {Down, _Rings} ->
              io:format("FALSE ~p down.  All nodes need to be up to check.\n", [Down]),
              false % make nodetool exit 1
     end.
  
  %% Provide a list of nodes with pending partition transfers (i.e. any secondary vnodes)
  %% and list any owned vnodes that are *not* running
  transfers([]) ->
      {Down, Rings} = get_rings(),
      case Down of
          [] ->
              ok;
          _ ->
              io:format("Nodes ~p are currently down.\n", [Down])
      end,
  
      %% Work out which vnodes are running and which partitions they claim
      F = fun({N,R}, Acc) ->
                  {_Pri, Sec, Stopped} = partitions(N, R),
                  case Sec of
                      [] ->
                          [];
                      _ ->
                          io:format("~p waiting to handoff ~p partitions\n", [N, length(Sec)]),
                          [{waiting_to_handoff, N, length(Sec)}]
                  end ++
                      case Stopped of
                          [] ->
                              [];
                          _ ->
                              io:format("~p does not have ~p primary partitions running\n",
                                        [N, length(Stopped)]),
                              [{stopped, N}]
                      end ++
                      Acc
          end,
      case lists:foldl(F, [], Rings) of
          [] ->
              io:format("No transfers active\n");
          _ ->
              ok
      end.
  
  
  format_stats([], Acc) ->
      lists:reverse(Acc);
  