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.


Field Summary
 MessagingServiceMBean msProxy
           
 
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(java.lang.String tag, java.lang.String... keyspaces)
          Remove all the existing snapshots.
 void close()
           
 void decommission()
           
 java.util.List<java.lang.String> describeRing(java.lang.String keyspaceName)
           
 void drain()
           
 java.util.Map<java.net.InetAddress,java.lang.Float> effectiveOwnership(java.lang.String keyspace)
           
 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, boolean isSequential, boolean isLocal, java.lang.String... columnFamilies)
           
 void forceTableRepairPrimaryRange(java.lang.String tableName, boolean isSequential, boolean isLocal, java.lang.String... columnFamilies)
           
 void forceTableRepairRange(java.lang.String beginToken, java.lang.String endToken, java.lang.String tableName, boolean isSequential, boolean isLocal, java.lang.String... columnFamilies)
           
 CacheServiceMBean getCacheServiceMBean()
           
 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 getCompactionThroughput()
           
 int getCurrentGenerationNumber()
           
 java.lang.String getDataCenter()
           
 java.util.Map<java.lang.String,java.lang.Integer> getDroppedMessages()
           
 java.lang.String getEndpoint()
           
 java.util.List<java.net.InetAddress> getEndpoints(java.lang.String keyspace, java.lang.String cf, java.lang.String key)
           
 EndpointSnitchInfoMBean getEndpointSnitchInfoProxy()
           
 int getExceptionCount()
           
 java.util.List<java.lang.String> getFilesDestinedFor(java.net.InetAddress host)
           
 java.lang.String getGossipInfo()
           
 java.lang.management.MemoryUsage getHeapMemoryUsage()
           
 java.util.Map<java.lang.String,java.lang.String> getHostIdMap()
           
 java.util.List<java.lang.String> getIncomingFiles(java.net.InetAddress host)
           
 java.util.List<java.lang.String> getJoiningNodes()
           
 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()
           
 java.lang.String getLocalHostId()
           
 java.util.List<java.lang.String> getMovingNodes()
           
 java.lang.String getOperationMode()
           
 java.util.Map<java.net.InetAddress,java.lang.Float> getOwnership()
           
 PBSPredictorMBean getPBSPredictorMBean()
           
 java.lang.String getRack()
           
 java.lang.String getReleaseVersion()
           
 java.lang.String getRemovalStatus()
           
 java.lang.String getSchemaVersion()
           
 StorageProxyMBean getSpProxy()
           
 java.util.List<java.lang.String> getSSTables(java.lang.String keyspace, java.lang.String cf, java.lang.String key)
           
 java.util.Set<java.net.InetAddress> getStreamDestinations()
           
 java.util.Set<java.net.InetAddress> getStreamSources()
           
 java.util.Iterator<java.util.Map.Entry<java.lang.String,JMXEnabledThreadPoolExecutorMBean>> getThreadPoolMBeanProxies()
           
 java.util.List<java.lang.String> getTokens()
           
 java.util.List<java.lang.String> getTokens(java.lang.String endpoint)
           
 java.util.Map<java.lang.String,java.lang.String> getTokenToEndpointMap()
           
 java.util.List<java.lang.String> getUnreachableNodes()
           
 long getUptime()
           
 void invalidateKeyCache()
           
 void invalidateRowCache()
           
 boolean isInitialized()
           
 boolean isJoined()
           
 boolean isThriftServerRunning()
           
 void joinRing()
           
 void loadNewSSTables(java.lang.String ksName, java.lang.String cfName)
           
 void move(java.lang.String newToken)
           
 void rebuild(java.lang.String sourceDc)
           
 void rebuildIndex(java.lang.String ksName, java.lang.String cfName, java.lang.String... idxNames)
           
 void removeNode(java.lang.String token)
           
 void resetLocalSchema()
           
 java.util.List<java.lang.String> sampleKeyRange()
           
 void scrub(java.lang.String tableName, java.lang.String... columnFamilies)
           
 void setCacheCapacities(int keyCacheCapacity, int rowCacheCapacity)
           
 void setCompactionThreshold(java.lang.String ks, java.lang.String cf, int minimumCompactionThreshold, int maximumCompactionThreshold)
          Set the compaction threshold
 void setCompactionThroughput(int value)
           
 void setStreamThroughput(int value)
           
 void setTraceProbability(double value)
           
 void startGossiping()
           
 void startThriftServer()
           
 void stop(java.lang.String string)
           
 void stopGossiping()
           
 void stopThriftServer()
           
 void takeSnapshot(java.lang.String snapshotName, java.lang.String columnFamily, java.lang.String... keyspaces)
          Take a snapshot of all the tables, optionally specifying only a specific column family.
 void truncate(java.lang.String tableName, java.lang.String cfName)
           
 void upgradeSSTables(java.lang.String tableName, java.lang.String... columnFamilies)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

msProxy

public MessagingServiceMBean msProxy
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

upgradeSSTables

public void upgradeSSTables(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,
                             boolean isSequential,
                             boolean isLocal,
                             java.lang.String... columnFamilies)
                      throws java.io.IOException
Throws:
java.io.IOException

forceTableRepairPrimaryRange

public void forceTableRepairPrimaryRange(java.lang.String tableName,
                                         boolean isSequential,
                                         boolean isLocal,
                                         java.lang.String... columnFamilies)
                                  throws java.io.IOException
Throws:
java.io.IOException

forceTableRepairRange

public void forceTableRepairRange(java.lang.String beginToken,
                                  java.lang.String endToken,
                                  java.lang.String tableName,
                                  boolean isSequential,
                                  boolean isLocal,
                                  java.lang.String... columnFamilies)
                           throws java.io.IOException
Throws:
java.io.IOException

invalidateKeyCache

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

invalidateRowCache

public void invalidateRowCache()
                        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<java.lang.String,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()

getMovingNodes

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

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<java.net.InetAddress,java.lang.Float> getOwnership()

effectiveOwnership

public java.util.Map<java.net.InetAddress,java.lang.Float> effectiveOwnership(java.lang.String keyspace)
                                                                       throws java.lang.IllegalStateException
Throws:
java.lang.IllegalStateException

getCacheServiceMBean

public CacheServiceMBean getCacheServiceMBean()

getColumnFamilyStoreMBeanProxies

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

getCompactionManagerProxy

public CompactionManagerMBean getCompactionManagerProxy()

getTokens

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

getTokens

public java.util.List<java.lang.String> getTokens(java.lang.String endpoint)

getLocalHostId

public java.lang.String getLocalHostId()

getHostIdMap

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

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,
                         java.lang.String columnFamily,
                         java.lang.String... keyspaces)
                  throws java.io.IOException
Take a snapshot of all the tables, optionally specifying only a specific column family.

Parameters:
snapshotName - the name of the snapshot.
columnFamily - the column family to snapshot or all on null
keyspaces - the keyspaces to snapshot
Throws:
java.io.IOException

clearSnapshot

public void clearSnapshot(java.lang.String tag,
                          java.lang.String... keyspaces)
                   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
Throws:
java.io.IOException

decommission

public void decommission()
                  throws java.lang.InterruptedException
Throws:
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

removeNode

public void removeNode(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,JMXEnabledThreadPoolExecutorMBean>> 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(int keyCacheCapacity,
                               int rowCacheCapacity)

getEndpoints

public java.util.List<java.net.InetAddress> getEndpoints(java.lang.String keyspace,
                                                         java.lang.String cf,
                                                         java.lang.String key)

getSSTables

public java.util.List<java.lang.String> getSSTables(java.lang.String keyspace,
                                                    java.lang.String cf,
                                                    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)

getEndpointSnitchInfoProxy

public EndpointSnitchInfoMBean getEndpointSnitchInfoProxy()

getCfsProxy

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

getSpProxy

public StorageProxyMBean getSpProxy()

getEndpoint

public java.lang.String getEndpoint()

getDataCenter

public java.lang.String getDataCenter()

getRack

public java.lang.String getRack()

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

isThriftServerRunning

public boolean isThriftServerRunning()

isInitialized

public boolean isInitialized()

setCompactionThroughput

public void setCompactionThroughput(int value)

getCompactionThroughput

public int getCompactionThroughput()

getExceptionCount

public int getExceptionCount()

getDroppedMessages

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

loadNewSSTables

public void loadNewSSTables(java.lang.String ksName,
                            java.lang.String cfName)

rebuildIndex

public void rebuildIndex(java.lang.String ksName,
                         java.lang.String cfName,
                         java.lang.String... idxNames)

getGossipInfo

public java.lang.String getGossipInfo()

stop

public void stop(java.lang.String string)

setStreamThroughput

public void setStreamThroughput(int value)

setTraceProbability

public void setTraceProbability(double value)

getSchemaVersion

public java.lang.String getSchemaVersion()

describeRing

public java.util.List<java.lang.String> describeRing(java.lang.String keyspaceName)
                                              throws java.io.IOException
Throws:
java.io.IOException

getPBSPredictorMBean

public PBSPredictorMBean getPBSPredictorMBean()

rebuild

public void rebuild(java.lang.String sourceDc)

sampleKeyRange

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

resetLocalSchema

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


Copyright © 2012 The Apache Software Foundation