org.apache.cassandra.tools
Class ClusterCmd

java.lang.Object
  extended by org.apache.cassandra.tools.ClusterCmd

public class ClusterCmd
extends java.lang.Object

JMX cluster wide operations for Cassandra.


Constructor Summary
ClusterCmd(java.lang.String host)
          Creates a ClusterProbe using the specified JMX host and default port.
ClusterCmd(java.lang.String host, int port)
          Creates a ClusterProbe using the specified JMX host and port.
 
Method Summary
 void clearGlobalSnapshot()
          Remove all the existing snapshots from all (live) nodes in the cluster
 void close()
           
static void main(java.lang.String[] args)
           
 void printEndpoints(java.lang.String keyspace, java.lang.String key)
           
 void takeGlobalSnapshot(java.lang.String snapshotName)
          Take a snapshot of all tables on all (live) nodes in the cluster
 void truncate(java.lang.String tableName, java.lang.String cfName)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ClusterCmd

public ClusterCmd(java.lang.String host,
                  int port)
           throws java.io.IOException,
                  java.lang.InterruptedException
Creates a ClusterProbe using the specified JMX host and port.

Parameters:
host - hostname or IP address of the JMX agent
port - TCP port of the remote JMX agent
Throws:
java.io.IOException - on connection failures
java.lang.InterruptedException

ClusterCmd

public ClusterCmd(java.lang.String host)
           throws java.io.IOException,
                  java.lang.InterruptedException
Creates a ClusterProbe using the specified JMX host and default port.

Parameters:
host - hostname or IP address of the JMX agent
Throws:
java.io.IOException - on connection failures
java.lang.InterruptedException
Method Detail

close

public void close()
           throws java.io.IOException
Throws:
java.io.IOException

printEndpoints

public void printEndpoints(java.lang.String keyspace,
                           java.lang.String key)

takeGlobalSnapshot

public void takeGlobalSnapshot(java.lang.String snapshotName)
                        throws java.io.IOException,
                               java.lang.InterruptedException
Take a snapshot of all tables on all (live) nodes in the cluster

Parameters:
snapshotName - name of the snapshot
Throws:
java.io.IOException
java.lang.InterruptedException

clearGlobalSnapshot

public void clearGlobalSnapshot()
                         throws java.io.IOException,
                                java.lang.InterruptedException
Remove all the existing snapshots from all (live) nodes in the cluster

Throws:
java.io.IOException
java.lang.InterruptedException

truncate

public void truncate(java.lang.String tableName,
                     java.lang.String cfName)

main

public static void main(java.lang.String[] args)
                 throws java.io.IOException,
                        java.lang.InterruptedException
Parameters:
args -
Throws:
java.io.IOException
java.lang.InterruptedException


Copyright © 2011 The Apache Software Foundation