Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Patch handoff status to work with status_v2.

  • Loading branch information...
commit 72a06332dbe21011b7b65e4c98960dd0ad252da8 1 parent 6a1161c
@cmeiklejohn authored
Showing with 14 additions and 2 deletions.
  1. +14 −2 src/riak_control_session.erl
View
16 src/riak_control_session.erl
@@ -269,7 +269,6 @@ get_member_info (_Member={Node,Status},Ring) ->
%% run locally per-node, collects information about this node for the session
get_my_info () ->
- Handoffs=riak_core_handoff_manager:status(),
{Total,Used}=get_my_memory(),
%% construct the member information for this node
@@ -279,9 +278,22 @@ get_my_info () ->
mem_used=Used,
mem_erlang=proplists:get_value(total,erlang:memory()),
vnodes=riak_core_vnode_manager:all_vnodes(),
- handoffs=[{M,I,N} || {{M,I},N,outbound,_,_} <- Handoffs]
+ handoffs=get_handoff_status()
}.
+%% format transfer to unifed display.
+format_transfer(Transfer) ->
+ {status_v2, Handoff} = Transfer,
+ Mod = proplists:get_value(mod, Handoff),
+ SrcPartition = proplists:get_value(src_partition, Handoff),
+ SrcNode = proplists:get_value(src_node, Handoff),
+ {Mod, SrcPartition, SrcNode}.
+
+%% get handoffs.
+get_handoff_status() ->
+ Transfers = riak_core_handoff_manager:status({direction, outbound}),
+ [format_transfer(Transfer) || Transfer <- lists:flatten(Transfers)].
+
%% get memory information for this machine
get_my_memory () ->
Mem=memsup:get_system_memory_data(),
Please sign in to comment.
Something went wrong with that request. Please try again.