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.
NodeProbe(java.lang.String host, int port, java.lang.String username, java.lang.String password)
          Creates a NodeProbe using the specified JMX host, port, username, and password.
 
Method Summary
 void clearSnapshot()
          Remove all the existing snapshots.
 void close()
           
 void decommission()
           
 void drain()
           
 java.lang.String exportSchemaToYAML()
           
 void forceRemoveCompletion()
           
 void forceTableCleanup(java.lang.String tableName, java.lang.String... columnFamilies)
           
 void forceTableCompaction(java.lang.String tableName, java.lang.String... columnFamilies)
           
 void forceTableFlush(java.lang.String tableName, java.lang.String... columnFamilies)
           
 void forceTableRepair(java.lang.String tableName, java.lang.String... columnFamilies)
           
 ColumnFamilyStoreMBean getCfsProxy(java.lang.String ks, java.lang.String cf)
           
 java.util.Iterator<java.util.Map.Entry<java.lang.String,ColumnFamilyStoreMBean>> getColumnFamilyStoreMBeanProxies()
           
 CompactionManagerMBean getCompactionManagerProxy()
           
 void getCompactionThreshold(java.io.PrintStream outs, java.lang.String ks, java.lang.String cf)
          Get the compaction threshold
 int getCurrentGenerationNumber()
           
 java.util.List<java.net.InetAddress> getEndpoints(java.lang.String keyspace, java.lang.String key)
           
 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)
           
 java.util.List<java.lang.String> getJoiningNodes()
           
 JMXInstrumentedCacheMBean getKeyCacheMBean(java.lang.String tableName, java.lang.String cfName)
           
 java.util.List<java.lang.String> getKeyspaces()
           
 java.util.List<java.lang.String> getLeavingNodes()
           
 java.util.List<java.lang.String> getLiveNodes()
           
 java.util.Map<java.lang.String,java.lang.String> getLoadMap()
           
 java.lang.String getLoadString()
           
 MessagingServiceMBean getMsProxy()
           
 java.lang.String getOperationMode()
           
 java.util.Map<Token,java.lang.Float> getOwnership()
           
 java.lang.String getReleaseVersion()
           
 java.lang.String getRemovalStatus()
           
 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.Map<Token,java.lang.String> getTokenToEndpointMap()
           
 java.util.List<java.lang.String> getUnreachableNodes()
           
 long getUptime()
           
 void invalidateKeyCaches(java.lang.String tableName, java.lang.String... columnFamilies)
           
 void invalidateRowCaches(java.lang.String tableName, java.lang.String... columnFamilies)
           
 boolean isInitialized()
           
 boolean isJoined()
           
 void joinRing()
           
 void loadBalance()
           
 void loadSchemaFromYAML()
          Deprecated. 
 void move(java.lang.String newToken)
           
 void removeToken(java.lang.String token)
           
 void scrub(java.lang.String tableName, java.lang.String... columnFamilies)
           
 void setCacheCapacities(java.lang.String tableName, java.lang.String cfName, int keyCacheCapacity, int rowCacheCapacity)
           
 void setCompactionThreshold(java.lang.String ks, java.lang.String cf, int minimumCompactionThreshold, int maximumCompactionThreshold)
          Set the compaction threshold
 void startGossiping()
           
 void startThriftServer()
           
 void stopGossiping()
           
 void stopThriftServer()
           
 void takeSnapshot(java.lang.String snapshotName)
          Take a snapshot of all the tables.
 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

NodeProbe

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

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,
                 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

close

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

forceTableCleanup

public void forceTableCleanup(java.lang.String tableName,
                              java.lang.String... columnFamilies)
                       throws java.io.IOException,
                              java.util.concurrent.ExecutionException,
                              java.lang.InterruptedException
Throws:
java.io.IOException
java.util.concurrent.ExecutionException
java.lang.InterruptedException

scrub

public void scrub(java.lang.String tableName,
                  java.lang.String... columnFamilies)
           throws java.io.IOException,
                  java.util.concurrent.ExecutionException,
                  java.lang.InterruptedException
Throws:
java.io.IOException
java.util.concurrent.ExecutionException
java.lang.InterruptedException

forceTableCompaction

public void forceTableCompaction(java.lang.String tableName,
                                 java.lang.String... columnFamilies)
                          throws java.io.IOException,
                                 java.util.concurrent.ExecutionException,
                                 java.lang.InterruptedException
Throws:
java.io.IOException
java.util.concurrent.ExecutionException
java.lang.InterruptedException

forceTableFlush

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

forceTableRepair

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

invalidateKeyCaches

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

invalidateRowCaches

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

drain

public void drain()
           throws java.io.IOException,
                  java.lang.InterruptedException,
                  java.util.concurrent.ExecutionException
Throws:
java.io.IOException
java.lang.InterruptedException
java.util.concurrent.ExecutionException

getTokenToEndpointMap

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

getLiveNodes

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

getJoiningNodes

public java.util.List<java.lang.String> getJoiningNodes()

getLeavingNodes

public java.util.List<java.lang.String> getLeavingNodes()

getUnreachableNodes

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

getLoadMap

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

getOwnership

public java.util.Map<Token,java.lang.Float> getOwnership()

getColumnFamilyStoreMBeanProxies

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

getCompactionManagerProxy

public CompactionManagerMBean getCompactionManagerProxy()

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()

getReleaseVersion

public java.lang.String getReleaseVersion()

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

isJoined

public boolean isJoined()

joinRing

public void joinRing()
              throws java.io.IOException,
                     ConfigurationException
Throws:
java.io.IOException
ConfigurationException

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)

getRemovalStatus

public java.lang.String getRemovalStatus()

forceRemoveCompletion

public void forceRemoveCompletion()

getThreadPoolMBeanProxies

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

getCompactionThreshold

public void getCompactionThreshold(java.io.PrintStream outs,
                                   java.lang.String ks,
                                   java.lang.String cf)
Get the compaction threshold

Parameters:
outs - the stream to write to

setCompactionThreshold

public void setCompactionThreshold(java.lang.String ks,
                                   java.lang.String cf,
                                   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 keyspace,
                                                         java.lang.String key)

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()

truncate

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

loadSchemaFromYAML

@Deprecated
public void loadSchemaFromYAML()
                        throws ConfigurationException,
                               java.io.IOException
Deprecated. 

Throws:
ConfigurationException
java.io.IOException

exportSchemaToYAML

public java.lang.String exportSchemaToYAML()
                                    throws java.io.IOException
Throws:
java.io.IOException

getMsProxy

public MessagingServiceMBean getMsProxy()

getCfsProxy

public ColumnFamilyStoreMBean getCfsProxy(java.lang.String ks,
                                          java.lang.String cf)

getKeyspaces

public java.util.List<java.lang.String> getKeyspaces()

stopGossiping

public void stopGossiping()

startGossiping

public void startGossiping()

stopThriftServer

public void stopThriftServer()

startThriftServer

public void startThriftServer()

isInitialized

public boolean isInitialized()


Copyright © 2011 The Apache Software Foundation