Updated Branches: refs/heads/cassandra-1.1 b43cc362a -> c565b64fe refs/heads/trunk 96a46771b -> 4c1b11bc3
merge from 1.1 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/4c1b11bc Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/4c1b11bc Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/4c1b11bc Branch: refs/heads/trunk Commit: 4c1b11bc35ed8770076742ad27e8374418e9970e Parents: 96a4677 c565b64 Author: Jonathan Ellis <[email protected]> Authored: Wed Sep 19 11:10:39 2012 -0500 Committer: Jonathan Ellis <[email protected]> Committed: Wed Sep 19 11:10:39 2012 -0500 ---------------------------------------------------------------------- src/java/org/apache/cassandra/tools/NodeCmd.java | 611 +++++------------ 1 files changed, 183 insertions(+), 428 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cassandra/blob/4c1b11bc/src/java/org/apache/cassandra/tools/NodeCmd.java ---------------------------------------------------------------------- diff --cc src/java/org/apache/cassandra/tools/NodeCmd.java index 5f2ac12,3f8e942..4d2790d --- a/src/java/org/apache/cassandra/tools/NodeCmd.java +++ b/src/java/org/apache/cassandra/tools/NodeCmd.java @@@ -162,11 -138,63 +138,63 @@@ public class NodeCm private static void printUsage() { HelpFormatter hf = new HelpFormatter(); - StringBuilder header = new StringBuilder(512); - header.append("\nAvailable commands\n"); - final NodeToolHelp ntHelp = loadHelp(); - for(NodeToolHelp.NodeToolCommand cmd : ntHelp.commands) - addCmdHelp(header, cmd); + StringBuilder header = new StringBuilder(); + header.append("\nAvailable commands:\n"); + // No args ++ addCmdHelp(header, "ring", "Print information about the token ring"); + addCmdHelp(header, "join", "Join the ring"); + addCmdHelp(header, "info", "Print node information (uptime, load, ...)"); + addCmdHelp(header, "cfstats", "Print statistics on column families"); + addCmdHelp(header, "version", "Print cassandra version"); + addCmdHelp(header, "tpstats", "Print usage statistics of thread pools"); + addCmdHelp(header, "proxyhistograms", "Print statistic histograms for network operations"); + addCmdHelp(header, "drain", "Drain the node (stop accepting writes and flush all column families)"); + 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"); + addCmdHelp(header, "disablethrift", "Disable thrift server"); + addCmdHelp(header, "enablethrift", "Reenable thrift server"); + addCmdHelp(header, "statusthrift", "Status of thrift server"); + addCmdHelp(header, "gossipinfo", "Shows the gossip information for the cluster"); + addCmdHelp(header, "invalidatekeycache", "Invalidate the key cache"); + addCmdHelp(header, "invalidaterowcache", "Invalidate the row cache"); + addCmdHelp(header, "resetlocalschema", "Reset node's local schema and resync"); + + // One arg - addCmdHelp(header, "ring [keyspace]", "Print information about the token ring for a given keyspace (for all keyspaces if it is not specified)"); + addCmdHelp(header, "netstats [host]", "Print network information on provided host (connecting node by default)"); + addCmdHelp(header, "move <new token>", "Move node on the token ring to a new token"); + addCmdHelp(header, "removetoken status|force|<token>", "Show status of current token removal, force completion of pending removal or remove providen token"); + addCmdHelp(header, "setcompactionthroughput <value_in_mb>", "Set the MB/s throughput cap for compaction in the system, or 0 to disable throttling."); + addCmdHelp(header, "setstreamthroughput <value_in_mb>", "Set the MB/s throughput cap for streaming in the system, or 0 to disable throttling."); + addCmdHelp(header, "describering [keyspace]", "Shows the token ranges info of a given keyspace."); + addCmdHelp(header, "rangekeysample", "Shows the sampled keys held across all keyspaces."); + addCmdHelp(header, "rebuild [src-dc-name]", "Rebuild data by streaming from other nodes (similarly to bootstrap)"); + + // Two args + addCmdHelp(header, "snapshot [keyspaces...] -cf [columnfamilyName] -t [snapshotName]", "Take a snapshot of the optionally specified column family of the specified keyspaces using optional name snapshotName"); + addCmdHelp(header, "clearsnapshot [keyspaces...] -t [snapshotName]", "Remove snapshots for the specified keyspaces. Either remove all snapshots or remove the snapshots with the given name."); + addCmdHelp(header, "flush [keyspace] [cfnames]", "Flush one or more column family"); + addCmdHelp(header, "repair [keyspace] [cfnames]", "Repair one or more column family (use -pr to repair only the first range returned by the partitioner)"); + addCmdHelp(header, "cleanup [keyspace] [cfnames]", "Run cleanup on one or more column family"); + addCmdHelp(header, "compact [keyspace] [cfnames]", "Force a (major) compaction on one or more column family"); + addCmdHelp(header, "scrub [keyspace] [cfnames]", "Scrub (rebuild sstables for) one or more column family"); + + addCmdHelp(header, "upgradesstables [keyspace] [cfnames]", "Scrub (rebuild sstables for) one or more column family"); + addCmdHelp(header, "getcompactionthreshold <keyspace> <cfname>", "Print min and max compaction thresholds for a given column family"); + addCmdHelp(header, "cfhistograms <keyspace> <cfname>", "Print statistic histograms for a given column family"); + addCmdHelp(header, "refresh <keyspace> <cf-name>", "Load newly placed SSTables to the system without restart."); + addCmdHelp(header, "rebuild_index <keyspace> <cf-name> <idx1,idx1>", "a full rebuilds of native secondry index for a given column family. IndexNameExample: Standard3.IdxName,Standard3.IdxName1"); + addCmdHelp(header, "setcachecapacity <key-cache-capacity> <row-cache-capacity>", "Set global key and row cache capacities (in MB units)."); + + // Three args + addCmdHelp(header, "getendpoints <keyspace> <cf> <key>", "Print the end points that owns the key"); + addCmdHelp(header, "getsstables <keyspace> <cf> <key>", "Print the sstable filenames that own the key"); + + // Four args + addCmdHelp(header, "setcompactionthreshold <keyspace> <cfname> <minthreshold> <maxthreshold>", "Set the min and max compaction thresholds for a given column family"); + addCmdHelp(header, "stop <compaction_type>", "Supported types are COMPACTION, VALIDATION, CLEANUP, SCRUB, INDEX_BUILD"); + String usage = String.format("java %s --host <arg> <command>%n", NodeCmd.class.getName()); hf.printHelp(usage, "", options, ""); System.out.println(header.toString());
