Skip to content

Commit

Permalink
GH2 (hibari/hibari): add checkpoint to hibari and nodetool
Browse files Browse the repository at this point in the history
  • Loading branch information
norton committed Jan 20, 2011
1 parent 5640619 commit 995e742
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 1 deletion.
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ check-package: package
@sleep 1
./tmp/hibari/bin/hibari-admin client-list
./tmp/hibari/bin/hibari-admin client-delete hibari@127.0.0.1
./tmp/hibari/bin/hibari checkpoint
./tmp/hibari/bin/hibari stop

package: generate
Expand Down
9 changes: 8 additions & 1 deletion rel/files/hibari
Original file line number Diff line number Diff line change
Expand Up @@ -155,8 +155,15 @@ case "$1" in
exec $CMD
;;

###--- Hibari custom START
checkpoint)
## Checkpoint
$NODETOOL checkpoint
;;
###--- Hibari custom FINISH

*)
echo "Usage: $SCRIPT {start|stop|restart|reboot|ping|console|attach}"
echo "Usage: $SCRIPT {start|stop|restart|reboot|ping|console|attach|checkpoint}"
exit 1
;;
esac
Expand Down
4 changes: 4 additions & 0 deletions rel/files/nodetool
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@ main(Args) ->
io:format("~p\n", [rpc:call(TargetNode, init, restart, [], 60000)]);
["reboot"] ->
io:format("~p\n", [rpc:call(TargetNode, init, reboot, [], 60000)]);
%%--- Hibari custom START
["checkpoint"] ->
io:format("~p\n", [rpc:call(TargetNode, brick_server, checkpoint_bricks_and_wait, [TargetNode], 900000)]);
%%--- Hibari custom FINISH
["rpc", Module, Function | RpcArgs] ->
case rpc:call(TargetNode, list_to_atom(Module), list_to_atom(Function), [RpcArgs], 60000) of
ok ->
Expand Down

0 comments on commit 995e742

Please sign in to comment.