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)
           
 java.util.Iterator<java.util.Map.Entry<java.lang.String,ColumnFamilyStoreMBean>> getColumnFamilyStoreMBeanProxies()
           
 void getCompactionThreshold(java.io.PrintStream outs)
          Get the compaction threshold
 int getCurrentGenerationNumber()
           
 java.util.List<java.net.InetAddress> getEndPoints(java.lang.String key, java.lang.String table)
           
 java.util.List<java.lang.String> getFilesDestinedFor(java.net.InetAddress host)
           
 java.lang.management.MemoryUsage getHeapMemoryUsage()
           
 java.util.List<java.lang.String> getIncomingFiles(java.net.InetAddress host)
           
 JMXInstrumentedCacheMBean getKeyCacheMBean(java.lang.String tableName, java.lang.String cfName)
           
 java.util.Set<java.lang.String> getLiveNodes()
           
 java.util.Map<java.lang.String,java.lang.String> getLoadMap()
           
 java.lang.String getLoadString()
           
 java.lang.String getOperationMode()
           
 java.util.Map<Range,java.util.List<java.lang.String>> getRangeToEndPointMap(java.lang.String tableName)
           
 JMXInstrumentedCacheMBean getRowCacheMBean(java.lang.String tableName, java.lang.String cfName)
           
 java.util.Set<java.net.InetAddress> getStreamDestinations()
           
 java.util.Set<java.net.InetAddress> getStreamSources()
           
 java.util.Iterator<java.util.Map.Entry<java.lang.String,IExecutorMBean>> getThreadPoolMBeanProxies()
           
 java.lang.String getToken()
           
 java.util.Set<java.lang.String> getUnreachableNodes()
           
 long getUptime()
           
 void loadBalance()
           
 void move(java.lang.String newToken)
           
 void printRing(java.io.PrintStream outs)
          Write a textual representation of the Cassandra ring.
 void removeToken(java.lang.String token)
           
 void setCacheCapacities(java.lang.String tableName, java.lang.String cfName, int keyCacheCapacity, int rowCacheCapacity)
           
 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

getRangeToEndPointMap

public java.util.Map<Range,java.util.List<java.lang.String>> getRangeToEndPointMap(java.lang.String tableName)

getLiveNodes

public java.util.Set<java.lang.String> getLiveNodes()

printRing

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

Parameters:
outs - the stream to write to

getUnreachableNodes

public java.util.Set<java.lang.String> getUnreachableNodes()

getLoadMap

public java.util.Map<java.lang.String,java.lang.String> getLoadMap()

getColumnFamilyStoreMBeanProxies

public java.util.Iterator<java.util.Map.Entry<java.lang.String,ColumnFamilyStoreMBean>> getColumnFamilyStoreMBeanProxies()

getKeyCacheMBean

public JMXInstrumentedCacheMBean getKeyCacheMBean(java.lang.String tableName,
                                                  java.lang.String cfName)

getRowCacheMBean

public JMXInstrumentedCacheMBean getRowCacheMBean(java.lang.String tableName,
                                                  java.lang.String cfName)

getToken

public java.lang.String getToken()

getLoadString

public java.lang.String getLoadString()

getCurrentGenerationNumber

public int getCurrentGenerationNumber()

getUptime

public long getUptime()

getHeapMemoryUsage

public java.lang.management.MemoryUsage getHeapMemoryUsage()

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)

getThreadPoolMBeanProxies

public java.util.Iterator<java.util.Map.Entry<java.lang.String,IExecutorMBean>> getThreadPoolMBeanProxies()

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

setCacheCapacities

public void setCacheCapacities(java.lang.String tableName,
                               java.lang.String cfName,
                               int keyCacheCapacity,
                               int rowCacheCapacity)

getEndPoints

public java.util.List<java.net.InetAddress> getEndPoints(java.lang.String key,
                                                         java.lang.String table)

getStreamDestinations

public java.util.Set<java.net.InetAddress> getStreamDestinations()

getFilesDestinedFor

public java.util.List<java.lang.String> getFilesDestinedFor(java.net.InetAddress host)
                                                     throws java.io.IOException
Throws:
java.io.IOException

getStreamSources

public java.util.Set<java.net.InetAddress> getStreamSources()

getIncomingFiles

public java.util.List<java.lang.String> getIncomingFiles(java.net.InetAddress host)
                                                  throws java.io.IOException
Throws:
java.io.IOException

getOperationMode

public java.lang.String getOperationMode()


Copyright © 2010 The Apache Software Foundation