org.apache.cassandra.service
Interface StorageServiceMBean

All Known Implementing Classes:
StorageService

public interface StorageServiceMBean


Method Summary
 void clearSnapshot()
          Remove all the existing snapshots.
 void decommission()
          transfer this node's data to other machines and remove it from service.
 void deliverHints(java.lang.String host)
          force hint delivery to an endpoint
 void drain()
          makes node unavailable for writes, flushes memtables and replays commitlog.
 void forceTableCleanup()
          Trigger a cleanup of keys on all tables.
 void forceTableCleanup(java.lang.String tableName)
          Trigger a cleanup of keys on a single keyspace
 void forceTableCompaction()
          Forces major compaction (all sstable files compacted)
 void forceTableCompaction(java.lang.String tableName)
          Forces major compaction of a single keyspace
 void forceTableFlush(java.lang.String tableName, java.lang.String... columnFamilies)
          Flush all memtables for the given column families, or all columnfamilies for the given table if none are explicitly listed.
 void forceTableRepair(java.lang.String tableName, java.lang.String... columnFamilies)
          Triggers proactive repair for given column families, or all columnfamilies for the given table if none are explicitly listed.
 int getCurrentGenerationNumber()
          Return the generation value for this node.
 java.util.Set<java.lang.String> getLiveNodes()
          Retrieve the list of live nodes in the cluster, where "liveness" is determined by the failure detector of the node being queried.
 double getLoad()
          Numeric load value.
 java.util.Map<java.lang.String,java.lang.String> getLoadMap()
          Human-readable load value.
 java.lang.String getLoadString()
          Human-readable load value
 java.util.List<java.net.InetAddress> getNaturalEndpoints(java.lang.String key, java.lang.String table)
          This method returns the N endpoints that are responsible for storing the specified key i.e for replication.
 java.lang.String getOperationMode()
          get the operational mode (leaving, joining, normal, decommissioned, client)
 java.util.Map<Range,java.util.List<java.lang.String>> getRangeToEndPointMap(java.lang.String keyspace)
          Retrieve a map of range to end points that describe the ring topology of a Cassandra cluster.
 java.lang.String getToken()
          Fetch a string representation of the token.
 java.util.Set<java.lang.String> getUnreachableNodes()
          Retrieve the list of unreachable nodes in the cluster, as determined by this node's failure detector.
 void loadBalance()
          This node will unload its data onto its neighbors, and bootstrap to share the range of the most-loaded node in the ring.
 void move(java.lang.String newToken)
           
 void removeToken(java.lang.String token)
          removeToken removes token (and all data associated with enpoint that had it) from the ring
 void saveCaches()
          save row and key caches
 void setLog4jLevel(java.lang.String classQualifier, java.lang.String level)
          set the logging level at runtime
 void takeAllSnapshot(java.lang.String tag)
          Takes a snapshot for every table.
 void takeSnapshot(java.lang.String tableName, java.lang.String tag)
          Takes the snapshot for a given table.
 

Method Detail

getLiveNodes

java.util.Set<java.lang.String> getLiveNodes()
Retrieve the list of live nodes in the cluster, where "liveness" is determined by the failure detector of the node being queried.

Returns:
set of IP addresses, as Strings

getUnreachableNodes

java.util.Set<java.lang.String> getUnreachableNodes()
Retrieve the list of unreachable nodes in the cluster, as determined by this node's failure detector.

Returns:
set of IP addresses, as Strings

getToken

java.lang.String getToken()
Fetch a string representation of the token.

Returns:
a string token

getRangeToEndPointMap

java.util.Map<Range,java.util.List<java.lang.String>> getRangeToEndPointMap(java.lang.String keyspace)
Retrieve a map of range to end points that describe the ring topology of a Cassandra cluster.

Returns:
mapping of ranges to end points

getLoad

double getLoad()
Numeric load value.


getLoadString

java.lang.String getLoadString()
Human-readable load value


getLoadMap

java.util.Map<java.lang.String,java.lang.String> getLoadMap()
Human-readable load value. Keys are IP addresses.


getCurrentGenerationNumber

int getCurrentGenerationNumber()
Return the generation value for this node.

Returns:
generation number

getNaturalEndpoints

java.util.List<java.net.InetAddress> getNaturalEndpoints(java.lang.String key,
                                                         java.lang.String table)
This method returns the N endpoints that are responsible for storing the specified key i.e for replication.

Parameters:
key - - key for which we need to find the endpoint return value - the endpoint responsible for this key

forceTableCompaction

void forceTableCompaction()
                          throws java.io.IOException
Forces major compaction (all sstable files compacted)

Throws:
java.io.IOException

forceTableCompaction

void forceTableCompaction(java.lang.String tableName)
                          throws java.io.IOException
Forces major compaction of a single keyspace

Throws:
java.io.IOException

forceTableCleanup

void forceTableCleanup()
                       throws java.io.IOException
Trigger a cleanup of keys on all tables.

Throws:
java.io.IOException

forceTableCleanup

void forceTableCleanup(java.lang.String tableName)
                       throws java.io.IOException
Trigger a cleanup of keys on a single keyspace

Throws:
java.io.IOException

takeSnapshot

void takeSnapshot(java.lang.String tableName,
                  java.lang.String tag)
                  throws java.io.IOException
Takes the snapshot for a given table.

Parameters:
tableName - the name of the table.
tag - the tag given to the snapshot (null is permissible)
Throws:
java.io.IOException

takeAllSnapshot

void takeAllSnapshot(java.lang.String tag)
                     throws java.io.IOException
Takes a snapshot for every table.

Parameters:
tag - the tag given to the snapshot (null is permissible)
Throws:
java.io.IOException

clearSnapshot

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

Throws:
java.io.IOException

forceTableFlush

void forceTableFlush(java.lang.String tableName,
                     java.lang.String... columnFamilies)
                     throws java.io.IOException
Flush all memtables for the given column families, or all columnfamilies for the given table if none are explicitly listed.

Parameters:
tableName -
columnFamilies -
Throws:
java.io.IOException

forceTableRepair

void forceTableRepair(java.lang.String tableName,
                      java.lang.String... columnFamilies)
                      throws java.io.IOException
Triggers proactive repair for given column families, or all columnfamilies for the given table if none are explicitly listed.

Parameters:
tableName -
columnFamilies -
Throws:
java.io.IOException

decommission

void decommission()
                  throws java.lang.InterruptedException
transfer this node's data to other machines and remove it from service.

Throws:
java.lang.InterruptedException

move

void move(java.lang.String newToken)
          throws java.io.IOException,
                 java.lang.InterruptedException
Parameters:
newToken - token to move this node to. This node will unload its data onto its neighbors, and bootstrap to the new token.
Throws:
java.io.IOException
java.lang.InterruptedException

loadBalance

void loadBalance()
                 throws java.io.IOException,
                        java.lang.InterruptedException
This node will unload its data onto its neighbors, and bootstrap to share the range of the most-loaded node in the ring.

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

removeToken

void removeToken(java.lang.String token)
removeToken removes token (and all data associated with enpoint that had it) from the ring


setLog4jLevel

void setLog4jLevel(java.lang.String classQualifier,
                   java.lang.String level)
set the logging level at runtime


getOperationMode

java.lang.String getOperationMode()
get the operational mode (leaving, joining, normal, decommissioned, client)


drain

void drain()
           throws java.io.IOException,
                  java.lang.InterruptedException,
                  java.util.concurrent.ExecutionException
makes node unavailable for writes, flushes memtables and replays commitlog.

Throws:
java.io.IOException
java.lang.InterruptedException
java.util.concurrent.ExecutionException

deliverHints

void deliverHints(java.lang.String host)
                  throws java.net.UnknownHostException
force hint delivery to an endpoint

Throws:
java.net.UnknownHostException

saveCaches

void saveCaches()
                throws java.util.concurrent.ExecutionException,
                       java.lang.InterruptedException
save row and key caches

Throws:
java.util.concurrent.ExecutionException
java.lang.InterruptedException


Copyright © 2010 The Apache Software Foundation