@@ -29,7 +29,8 @@ usage() {
2929 echo " aae-status | diag | stat | status | transfer-limit | reformat-indexes |"
3030 echo " top [-interval N] [-sort reductions|memory|msg_q] [-lines N] |"
3131 echo " downgrade-objects | security | bucket-type | repair-2i |"
32- echo " search | services | ensemble-status }"
32+ echo " search | services | ensemble-status | handoff | set |"
33+ echo " show | describe }"
3334}
3435
3536stat_admin ()
@@ -304,6 +305,19 @@ cluster_admin()
304305 node_up_check
305306 $NODETOOL rpc riak_core_console clear_staged
306307 ;;
308+ status)
309+ node_up_check
310+ $NODETOOL rpc riak_core_console command $SCRIPT cluster status
311+ ;;
312+ partitions|partition)
313+ node_up_check
314+ $NODETOOL rpc riak_core_console command $SCRIPT cluster $@
315+ ;;
316+ partition[_-]count)
317+ node_up_check
318+ shift
319+ $NODETOOL rpc riak_core_console command $SCRIPT cluster partition-count $@
320+ ;;
307321 * )
308322 echo " \
309323Usage: $SCRIPT cluster <command>
@@ -312,25 +326,44 @@ The following commands stage changes to cluster membership. These commands
312326do not take effect immediately. After staging a set of changes, the staged
313327plan must be committed to take effect:
314328
315- join <node> Join node to the cluster containing <node>
316- leave Have this node leave the cluster and shutdown
317- leave <node> Have <node> leave the cluster and shutdown
329+ join <node> Join node to the cluster containing <node>
330+ leave Have this node leave the cluster and shutdown
331+ leave <node> Have <node> leave the cluster and shutdown
318332
319- force-remove <node> Remove <node> from the cluster without
320- first handing off data. Designed for
321- crashed, unrecoverable nodes
333+ force-remove <node> Remove <node> from the cluster without
334+ first handing off data. Designed for
335+ crashed, unrecoverable nodes
322336
323- replace <node1> <node2> Have <node1> transfer all data to <node2>,
324- and then leave the cluster and shutdown
337+ replace <node1> <node2> Have <node1> transfer all data to <node2>,
338+ and then leave the cluster and shutdown
325339
326- force-replace <node1> <node2> Reassign all partitions owned by <node1> to
327- <node2> without first handing off data, and
328- remove <node1> from the cluster.
340+ force-replace <node1> <node2> Reassign all partitions owned by <node1> to
341+ <node2> without first handing off data, and
342+ remove <node1> from the cluster.
329343
330344Staging commands:
331- plan Display the staged changes to the cluster
332- commit Commit the staged changes
333- clear Clear the staged changes
345+ plan Display the staged changes to the cluster
346+ commit Commit the staged changes
347+ clear Clear the staged changes
348+
349+ Status and information commands:
350+ status Display a concise summary of node membership
351+ availability and ring ownership.
352+
353+ partitions [--node=<node>] Print primary, secondary and stopped
354+ partition indices and ids for the current
355+ node, or for the specified node.
356+
357+ partition-count [--node=<node>] Print the cluster-wide number of
358+ partitions or the number of partitions
359+ on the specified node.
360+
361+ partition id=<id> Convert the given partition id to the
362+ matching index.
363+
364+ partition index=<index> Convert the given partition index to
365+ the matching id.
366+
334367"
335368 esac
336369}
@@ -1036,6 +1069,26 @@ case "$1" in
10361069 shift
10371070 btype_admin " $@ "
10381071 ;;
1072+ handoff)
1073+ # New pattern for command line. Use nodetool for RPC
1074+ node_up_check
1075+ exec $NODETOOL rpc riak_core_console command $SCRIPT $@
1076+ ;;
1077+ set)
1078+ # New pattern for command line. Use nodetool for RPC
1079+ node_up_check
1080+ exec $NODETOOL rpc riak_core_console command $SCRIPT $@
1081+ ;;
1082+ show)
1083+ # New pattern for command line. Use nodetool for RPC
1084+ node_up_check
1085+ exec $NODETOOL rpc riak_core_console command $SCRIPT $@
1086+ ;;
1087+ describe)
1088+ # New pattern for command line. Use nodetool for RPC
1089+ node_up_check
1090+ exec $NODETOOL rpc riak_core_console command $SCRIPT $@
1091+ ;;
10391092 transfer[_-]limit)
10401093 if [ $# -gt 3 ]; then
10411094 echo " Usage: $SCRIPT $1 "
0 commit comments