Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert "Merge branch 'feature/nodetool-zero-arg-rpc' into develop" [JIRA: TOOLS-130] #156

Merged
merged 1 commit into from Jul 28, 2014
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
27 changes: 3 additions & 24 deletions priv/base/nodetool
Expand Up @@ -63,17 +63,6 @@ main(Args) ->
io:format("~p\n", [rpc:call(TargetNode, init, restart, [], RpcTimeout)]);
["reboot"] ->
io:format("~p\n", [rpc:call(TargetNode, init, reboot, [], RpcTimeout)]);
["rpc", Module, Function] ->
case rpc:call(TargetNode, list_to_atom(Module), list_to_atom(Function),
[], RpcTimeout) of
ok ->
ok;
{badrpc, Reason} ->
io:format(standard_error, "RPC to ~p failed: ~p\n", [TargetNode, Reason]),
halt(1);
_ ->
halt(1)
end;
["rpc", Module, Function | RpcArgs] ->
case rpc:call(TargetNode, list_to_atom(Module), list_to_atom(Function),
[RpcArgs], RpcTimeout) of
Expand All @@ -85,16 +74,6 @@ main(Args) ->
_ ->
halt(1)
end;
["rpc_infinity", Module, Function] ->
case rpc:call(TargetNode, list_to_atom(Module), list_to_atom(Function), [], infinity) of
ok ->
ok;
{badrpc, Reason} ->
io:format(standard_error, "RPC to ~p failed: ~p\n", [TargetNode, Reason]),
halt(1);
_ ->
halt(1)
end;
["rpc_infinity", Module, Function | RpcArgs] ->
case rpc:call(TargetNode, list_to_atom(Module), list_to_atom(Function), [RpcArgs], infinity) of
ok ->
Expand Down Expand Up @@ -188,13 +167,13 @@ chkconfig(File) ->
io:format("ok\n"),
halt(0);
{error, {Line, Mod, Term}} ->
io:format(standard_error,
["Error on line ",
io:format(standard_error,
["Error on line ",
file:format_error({Line, Mod, Term}), "\n"], []),
halt(1);
{error, R} ->
io:format(standard_error,
["Error reading config file: ",
["Error reading config file: ",
file:format_error(R), "\n"], []),
halt(1)
end.
Expand Down