org.apache.cassandra.tools
Class NodeProbe

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

public class NodeProbe
extends java.lang.Object

JMX client operations for Cassandra.


Constructor Summary
NodeProbe(java.lang.String host)
          Creates a NodeProbe using the specified JMX host and default port.
NodeProbe(java.lang.String host, int port)
          Creates a NodeProbe using the specified JMX host and port.
 
Method Summary
 void clearSnapshot()
          Remove all the existing snapshots.
 void decommission()
           
 void forceTableCleanup()
           
 void forceTableCompaction()
           
 void forceTableFlush(java.lang.String tableName, java.lang.String... columnFamilies)
           
 void forceTableRepair(java.lang.String tableName, java.lang.String... columnFamilies)
           
 void getCompactionThreshold(java.io.PrintStream outs)
          Get the compaction threshold
 void loadBalance()
           
static void main(java.lang.String[] args)
           
 void move(java.lang.String newToken)
           
 void printColumnFamilyStats(java.io.PrintStream outs)
           
 void printInfo(java.io.PrintStream outs)
          Write node information.
 void printRing(java.io.PrintStream outs)
          Write a textual representation of the Cassandra ring.
 void printThreadPoolStats(java.io.PrintStream outs)
          Print out the size of the queues in the thread pools
 void removeToken(java.lang.String token)
           
 void setCompactionThreshold(int minimumCompactionThreshold, int maximumCompactionThreshold)
          Set the compaction threshold
 void takeSnapshot(java.lang.String snapshotName)
          Take a snapshot of all the tables.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NodeProbe

public NodeProbe(java.lang.String host,
                 int port)
          throws java.io.IOException,
                 java.lang.InterruptedException
Creates a NodeProbe 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

NodeProbe

public NodeProbe(java.lang.String host)
          throws java.io.IOException,
                 java.lang.InterruptedException
Creates a NodeProbe 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

forceTableCleanup

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

forceTableCompaction

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

forceTableFlush

public void forceTableFlush(java.lang.String tableName,
                            java.lang.String... columnFamilies)
                     throws java.io.IOException
Throws:
java.io.IOException

forceTableRepair

public void forceTableRepair(java.lang.String tableName,
                             java.lang.String... columnFamilies)
                      throws java.io.IOException
Throws:
java.io.IOException

printRing

public void printRing(java.io.PrintStream outs)
Write a textual representation of the Cassandra ring.

Parameters:
outs - the stream to write to

printColumnFamilyStats

public void printColumnFamilyStats(java.io.PrintStream outs)

printInfo

public void printInfo(java.io.PrintStream outs)
Write node information.

Parameters:
outs - the stream to write to

takeSnapshot

public void takeSnapshot(java.lang.String snapshotName)
                  throws java.io.IOException
Take a snapshot of all the tables.

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

clearSnapshot

public void clearSnapshot()
                   throws java.io.IOException
Remove all the existing snapshots.

Throws:
java.io.IOException

decommission

public void decommission()
                  throws java.lang.InterruptedException
Throws:
java.lang.InterruptedException

loadBalance

public void loadBalance()
                 throws java.io.IOException,
                        java.lang.InterruptedException
Throws:
java.io.IOException
java.lang.InterruptedException

move

public void move(java.lang.String newToken)
          throws java.io.IOException,
                 java.lang.InterruptedException
Throws:
java.io.IOException
java.lang.InterruptedException

removeToken

public void removeToken(java.lang.String token)

printThreadPoolStats

public void printThreadPoolStats(java.io.PrintStream outs)
Print out the size of the queues in the thread pools

Parameters:
outs - Output stream to generate the output on.

getCompactionThreshold

public void getCompactionThreshold(java.io.PrintStream outs)
Get the compaction threshold

Parameters:
outs - the stream to write to

setCompactionThreshold

public void setCompactionThreshold(int minimumCompactionThreshold,
                                   int maximumCompactionThreshold)
Set the compaction threshold

Parameters:
minimumCompactionThreshold - minimum compaction threshold
maximumCompactionThreshold - maximum compaction threshold

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 © 2010 The Apache Software Foundation