Skip to content

Instantly share code, notes, and snippets.

@joeljacobson
Created March 25, 2014 16:15
Show Gist options
  • Save joeljacobson/9765291 to your computer and use it in GitHub Desktop.
Save joeljacobson/9765291 to your computer and use it in GitHub Desktop.
setsdemo.erl
-module(partdemo).
-compile(export_all).
part() ->
true = rpc:call('[email protected]', erlang, set_cookie, ['[email protected]', riak2]),
true = erlang:set_cookie(node(), riak2),
true = rpc:call('[email protected]', erlang, disconnect_node, ['[email protected]']),
true = rpc:call('[email protected]', erlang, disconnect_node, ['[email protected]']),
true = erlang:disconnect_node('[email protected]'),
true = erlang:disconnect_node('[email protected]'),
true = erlang:disconnect_node('[email protected]').
heal() ->
true = rpc:call('[email protected]', erlang, set_cookie, ['[email protected]', riak]),
true = erlang:set_cookie(node(), riak),
rpc:abcast(riak_core_node_watcher, broadcast).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment