mirror of https://github.com/apache/cassandra
Do not allow 'nodetool decommission' to take parameters.
Patch by brandonwilliams, reviewed by vijay for CASSANDRA-4160
This commit is contained in:
parent
b2ca7f8212
commit
452619cd07
|
|
@ -134,7 +134,7 @@ public class NodeCmd
|
|||
addCmdHelp(header, "version", "Print cassandra version");
|
||||
addCmdHelp(header, "tpstats", "Print usage statistics of thread pools");
|
||||
addCmdHelp(header, "drain", "Drain the node (stop accepting writes and flush all column families)");
|
||||
addCmdHelp(header, "decommission", "Decommission the node");
|
||||
addCmdHelp(header, "decommission", "Decommission the *node I am connecting to*");
|
||||
addCmdHelp(header, "compactionstats", "Print statistics on compactions");
|
||||
addCmdHelp(header, "disablegossip", "Disable gossip (effectively marking the node dead)");
|
||||
addCmdHelp(header, "enablegossip", "Reenable gossip");
|
||||
|
|
@ -650,7 +650,6 @@ public class NodeCmd
|
|||
case RING : nodeCmd.printRing(System.out); break;
|
||||
case INFO : nodeCmd.printInfo(System.out); break;
|
||||
case CFSTATS : nodeCmd.printColumnFamilyStats(System.out); break;
|
||||
case DECOMMISSION : probe.decommission(); break;
|
||||
case TPSTATS : nodeCmd.printThreadPoolStats(System.out); break;
|
||||
case VERSION : nodeCmd.printReleaseVersion(System.out); break;
|
||||
case COMPACTIONSTATS : nodeCmd.printCompactionStats(System.out); break;
|
||||
|
|
@ -659,7 +658,16 @@ public class NodeCmd
|
|||
case DISABLETHRIFT : probe.stopThriftServer(); break;
|
||||
case ENABLETHRIFT : probe.startThriftServer(); break;
|
||||
case STATUSTHRIFT : nodeCmd.printIsThriftServerRunning(System.out); break;
|
||||
|
||||
|
||||
case DECOMMISSION :
|
||||
if (arguments.length > 0)
|
||||
{
|
||||
System.err.println("Decommission will decommission the node you are connected to and does not take arguments!");
|
||||
System.exit(1);
|
||||
}
|
||||
probe.decommission();
|
||||
break;
|
||||
|
||||
case DRAIN :
|
||||
try { probe.drain(); }
|
||||
catch (ExecutionException ee) { err(ee, "Error occured during flushing"); }
|
||||
|
|
|
|||
Loading…
Reference in New Issue