org.apache.cassandra.service

## Class StorageService

- java.lang.Object
- - javax.management.NotificationBroadcasterSupport
  - - org.apache.cassandra.service.StorageService

All Implemented Interfaces:
  javax.management.NotificationBroadcaster, javax.management.NotificationEmitter, IEndpointStateChangeSubscriber, StorageServiceMBean

    public class StorageService
    extends javax.management.NotificationBroadcasterSupport
    implements IEndpointStateChangeSubscriber, StorageServiceMBean

This abstraction contains the token/identifier of this node on the identifier space. This token gets gossiped around. This class will also maintain histograms of the load information of other nodes in the cluster.

### Field Summary

Fields
`static StorageService` `instance`
`static int` `RING_DELAY`
`VersionedValue.VersionedValueFactory` `valueFactory`

### Constructor Summary

Constructors
Constructor and Description
`StorageService()`

### Method Summary

All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods
`protected void` `addExpireTimeIfFound(java.net.InetAddress endpoint, long expireTime)`
`void` `beforeChange(java.net.InetAddress endpoint, EndpointState currentState, ApplicationState newStateKey, VersionedValue newValue)`
`void` `bulkLoad(java.lang.String directory)` Starts a bulk load and blocks until it completes.
`java.lang.String` `bulkLoadAsync(java.lang.String directory)` Starts a bulk load asynchronously and returns the String representation of the planID for the new streaming session.
`Pair<java.util.Set<Range<Token>>,java.util.Set<Range<Token>>>` `calculateStreamAndFetchRanges(java.util.Collection<Range<Token>> current, java.util.Collection<Range<Token>> updated)` Calculate pair of ranges to stream/fetch for given two range collections (current ranges for keyspace and ranges after move to new token)
`void` `checkForEndpointCollision()`
`void` `clearSnapshot(java.lang.String tag, java.lang.String... keyspaceNames)` Remove the snapshot with the given name from the given keyspaces.
`void` `confirmReplication(java.net.InetAddress node)`
`void` `decommission()` transfer this node's data to other machines and remove it from service.
`void` `deliverHints(java.lang.String host)`
`java.util.List<TokenRange>` `describeLocalRing(java.lang.String keyspace)` The same as `describeRing(String)` but considers only the part of the ring formed by nodes in the local DC.
`java.util.List<TokenRange>` `describeRing(java.lang.String keyspace)` The TokenRange for a given keyspace.
`java.util.List<java.lang.String>` `describeRingJMX(java.lang.String keyspace)` The same as `describeRing(String)` but converts TokenRange to the String for JMX compatibility
`void` `disableAutoCompaction(java.lang.String ks, java.lang.String... columnFamilies)`
`void` `drain()` Shuts node off to writes, empties memtables and the commit log.
`java.util.LinkedHashMap<java.net.InetAddress,java.lang.Float>` `effectiveOwnership(java.lang.String keyspace)` Calculates ownership.
`void` `enableAutoCompaction(java.lang.String ks, java.lang.String... columnFamilies)`
`protected long` `extractExpireTime(java.lang.String[] pieces)`
`int` `forceKeyspaceCleanup(int jobs, java.lang.String keyspaceName, java.lang.String... columnFamilies)`
`int` `forceKeyspaceCleanup(java.lang.String keyspaceName, java.lang.String... columnFamilies)` Trigger a cleanup of keys on a single keyspace
`void` `forceKeyspaceCompaction(boolean splitOutput, java.lang.String keyspaceName, java.lang.String... columnFamilies)` Forces major compaction of a single keyspace
`void` `forceKeyspaceFlush(java.lang.String keyspaceName, java.lang.String... columnFamilies)` Flush all memtables for a keyspace and column families.
`void` `forceRemoveCompletion()` Force a remove operation to complete.
`int` `forceRepairAsync(java.lang.String keyspace, boolean isSequential, boolean isLocal, boolean primaryRange, boolean fullRepair, java.lang.String... columnFamilies)` Deprecated.
`int` `forceRepairAsync(java.lang.String keyspace, boolean isSequential, java.util.Collection<java.lang.String> dataCenters, java.util.Collection<java.lang.String> hosts, boolean primaryRange, boolean fullRepair, java.lang.String... columnFamilies)` Deprecated.
`int` `forceRepairAsync(java.lang.String keyspace, int parallelismDegree, java.util.Collection<java.lang.String> dataCenters, java.util.Collection<java.lang.String> hosts, boolean primaryRange, boolean fullRepair, java.lang.String... columnFamilies)` Deprecated.
`int` `forceRepairAsync(java.lang.String keyspace, RepairOption options, boolean legacy)`
`int` `forceRepairRangeAsync(java.lang.String beginToken, java.lang.String endToken, java.lang.String keyspaceName, boolean isSequential, boolean isLocal, boolean fullRepair, java.lang.String... columnFamilies)` Deprecated.
`int` `forceRepairRangeAsync(java.lang.String beginToken, java.lang.String endToken, java.lang.String keyspaceName, boolean isSequential, java.util.Collection<java.lang.String> dataCenters, java.util.Collection<java.lang.String> hosts, boolean fullRepair, java.lang.String... columnFamilies)` Deprecated.
`int` `forceRepairRangeAsync(java.lang.String beginToken, java.lang.String endToken, java.lang.String keyspaceName, int parallelismDegree, java.util.Collection<java.lang.String> dataCenters, java.util.Collection<java.lang.String> hosts, boolean fullRepair, java.lang.String... columnFamilies)` Deprecated.
`void` `forceTerminateAllRepairSessions()`
`java.lang.String[]` `getAllDataFileLocations()` Get the list of all data file locations from conf
`java.util.List<Range<Token>>` `getAllRanges(java.util.List<Token> sortedTokens)` Get all ranges that span the ring given a set of tokens.
`int` `getBatchSizeFailureThreshold()` Returns the threshold for rejecting queries due to a large batch size
`java.lang.String` `getClusterName()` Returns the name of the cluster
`java.lang.String` `getCommitLogLocation()` Get location of the commit log
`int` `getCompactionThroughputMbPerSec()`
`int` `getCurrentGenerationNumber()` Return the generation value for this node.
`java.lang.String` `getDrainProgress()` get the progress of a drain operation
`java.util.Map<java.lang.String,java.lang.String>` `getEndpointToHostId()` Retrieve the mapping of endpoint to host ID
`java.util.Map<java.lang.String,java.lang.String>` `getHostIdMap()` `StorageServiceMBean.getEndpointToHostId()`
`java.util.Map<java.lang.String,java.lang.String>` `getHostIdToEndpoint()` Retrieve the mapping of host ID to endpoint
`int` `getInterDCStreamThroughputMbPerSec()`
`java.util.List<java.lang.String>` `getJoiningNodes()` Retrieve the list of nodes currently bootstrapping into the ring.
`java.util.List<java.lang.String>` `getKeyspaces()`
`java.util.List<java.lang.String>` `getLeavingNodes()` Retrieve the list of nodes currently leaving the ring.
`java.util.List<java.net.InetAddress>` `getLiveNaturalEndpoints(Keyspace keyspace, java.nio.ByteBuffer key)` This method attempts to return N endpoints that are responsible for storing the specified key i.e for replication.
`java.util.List<java.net.InetAddress>` `getLiveNaturalEndpoints(Keyspace keyspace, RingPosition pos)`
`java.util.List<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.
`java.util.Set<java.net.InetAddress>` `getLiveRingMembers()`
`java.util.Set<java.net.InetAddress>` `getLiveRingMembers(boolean excludeDeadStates)`
`java.util.Map<java.lang.String,java.lang.String>` `getLoadMap()` Human-readable load value.
`java.lang.String` `getLoadString()` Human-readable load value
`java.lang.String` `getLocalHostId()` Retrieve this hosts unique ID
`java.util.Collection<Range<Token>>` `getLocalRanges(java.lang.String keyspaceName)`
`java.util.Collection<Token>` `getLocalTokens()`
`java.util.Map<java.lang.String,java.lang.String>` `getLoggingLevels()` get the runtime logging levels
`java.util.List<java.lang.String>` `getMovingNodes()` Retrieve the list of nodes currently moving in the ring.
`java.util.List<java.net.InetAddress>` `getNaturalEndpoints(java.lang.String keyspaceName, java.nio.ByteBuffer key)`
`java.util.List<java.net.InetAddress>` `getNaturalEndpoints(java.lang.String keyspaceName, RingPosition pos)` This method returns the N endpoints that are responsible for storing the specified key i.e for replication.
`java.util.List<java.net.InetAddress>` `getNaturalEndpoints(java.lang.String keyspaceName, java.lang.String cf, java.lang.String key)` This method returns the N endpoints that are responsible for storing the specified key i.e for replication.
`java.util.List<java.lang.String>` `getNonSystemKeyspaces()`
`java.lang.String` `getOperationMode()` get the operational mode (leaving, joining, normal, decommissioned, client)
`java.util.Map<java.net.InetAddress,java.lang.Float>` `getOwnership()` given a list of tokens (representing the nodes in the cluster), returns a mapping from "token -> %age of cluster owned by that token"
`static IPartitioner` `getPartitioner()`
`java.lang.String` `getPartitionerName()` Returns the cluster partitioner
`java.util.Map<java.util.List<java.lang.String>,java.util.List<java.lang.String>>` `getPendingRangeToEndpointMap(java.lang.String keyspace)` Retrieve a map of pending ranges to endpoints that describe the ring topology
`java.util.Collection<Range<Token>>` `getPrimaryRangeForEndpointWithinDC(java.lang.String keyspace, java.net.InetAddress referenceEndpoint)` Get the "primary ranges" within local DC for the specified keyspace and endpoint.
`java.util.Collection<Range<Token>>` `getPrimaryRanges(java.lang.String keyspace)`
`java.util.Collection<Range<Token>>` `getPrimaryRangesForEndpoint(java.lang.String keyspace, java.net.InetAddress ep)` Get the "primary ranges" for the specified keyspace and endpoint.
`java.util.Collection<Range<Token>>` `getPrimaryRangesWithinDC(java.lang.String keyspace)`
`java.util.Map<Range<Token>,java.util.List<java.net.InetAddress>>` `getRangeToAddressMap(java.lang.String keyspace)`
`java.util.Map<Range<Token>,java.util.List<java.net.InetAddress>>` `getRangeToAddressMapInLocalDC(java.lang.String keyspace)`
`java.util.Map<java.util.List<java.lang.String>,java.util.List<java.lang.String>>` `getRangeToEndpointMap(java.lang.String keyspace)` for a keyspace, return the ranges and corresponding listen addresses.
`java.util.Map<java.util.List<java.lang.String>,java.util.List<java.lang.String>>` `getRangeToRpcaddressMap(java.lang.String keyspace)` for a keyspace, return the ranges and corresponding RPC addresses for a given keyspace.
`java.lang.String` `getReleaseVersion()` Fetch a string representation of the Cassandra version.
`java.lang.String` `getRemovalStatus()` Get the status of a token removal.
`java.lang.String` `getRpcaddress(java.net.InetAddress endpoint)` Return the rpc address associated with an endpoint as a string.
`java.lang.String` `getSavedCachesLocation()` Get location of the saved caches dir
`java.lang.String` `getSchemaVersion()` Fetch a string representation of the current Schema version.
`double` `getSeverity(java.net.InetAddress endpoint)`
`java.util.Map<java.lang.String,javax.management.openmbean.TabularData>` `getSnapshotDetails()` Get the details of all the snapshot
`java.util.List<Pair<Range<Token>,java.lang.Long>>` `getSplits(java.lang.String keyspaceName, java.lang.String cfName, Range<Token> range, int keysPerSplit)`
`int` `getStreamThroughputMbPerSec()`
`TokenMetadata` `getTokenMetadata()`
`java.util.List<java.lang.String>` `getTokens()` Fetch string representations of the tokens for this node.
`java.util.List<java.lang.String>` `getTokens(java.lang.String endpoint)` Fetch string representations of the tokens for a specified node.
`java.util.Map<java.lang.String,java.lang.String>` `getTokenToEndpointMap()` Retrieve a map of tokens to endpoints, including the bootstrapping ones.
`int` `getTombstoneFailureThreshold()` Returns the threshold for abandoning queries with many tombstones
`int` `getTombstoneWarnThreshold()` Returns the threshold for warning of queries with many tombstones
`double` `getTraceProbability()` Returns the configured tracing probability.
`java.util.List<java.lang.String>` `getUnreachableNodes()` Retrieve the list of unreachable nodes in the cluster, as determined by this node's failure detector.
`java.lang.Iterable<ColumnFamilyStore>` `getValidColumnFamilies(boolean allowIndexes, boolean autoAddIndexes, java.lang.String keyspaceName, java.lang.String... cfNames)`
`void` `gossipSnitchInfo()`
`void` `initServer()`
`void` `initServer(int delay)`
`boolean` `isBootstrapMode()`
`boolean` `isGossipRunning()`
`boolean` `isIncrementalBackupsEnabled()`
`boolean` `isInitialized()`
`boolean` `isInShutdownHook()`
`boolean` `isJoined()`
`boolean` `isNativeTransportRunning()`
`static boolean` `isReplacingSameAddress()`
`boolean` `isRpcReady(java.net.InetAddress endpoint)`
`boolean` `isRPCServerRunning()`
`boolean` `isSetupCompleted()`
`boolean` `isStarting()` Returns whether the storage service is starting or not
`void` `joinRing()`
`void` `loadNewSSTables(java.lang.String ksName, java.lang.String cfName)` #Load new SSTables to the given keyspace/columnFamily
`void` `move(java.lang.String newToken)`
`void` `onAlive(java.net.InetAddress endpoint, EndpointState state)`
`void` `onChange(java.net.InetAddress endpoint, ApplicationState state, VersionedValue value)`
`void` `onDead(java.net.InetAddress endpoint, EndpointState state)`
`void` `onJoin(java.net.InetAddress endpoint, EndpointState epState)` Use to inform interested parties about the change in the state for specified endpoint
`void` `onRemove(java.net.InetAddress endpoint)`
`void` `onRestart(java.net.InetAddress endpoint, EndpointState state)` Called whenever a node is restarted.
`java.util.Collection<Token>` `prepareReplacementInfo()`
`void` `rebuild(java.lang.String sourceDc)` Initiate a process of streaming data for which we are responsible from other nodes.
`void` `rebuildSecondaryIndex(java.lang.String ksName, java.lang.String cfName, java.lang.String... idxNames)` rebuild the specified indexes
`void` `refreshSizeEstimates()` Forces refresh of values stored in system.size_estimates of all column families.
`void` `register(IEndpointLifecycleSubscriber subscriber)`
`void` `registerDaemon(CassandraDaemon daemon)`
`void` `removeNode(java.lang.String hostIdString)` Remove a node that has died, attempting to restore the replica count.
`void` `removeShutdownHook()` In the event of forceful termination we need to remove the shutdown hook to prevent hanging (OOM for instance)
`int` `repairAsync(java.lang.String keyspace, java.util.Map<java.lang.String,java.lang.String> repairSpec)` Invoke repair asynchronously.
`void` `reportManualSeverity(double incr)`
`void` `reportSeverity(double incr)` Increment about the known Compaction severity of the events in this node
`void` `rescheduleFailedDeletions()`
`void` `resetLocalSchema()`
`boolean` `resumeBootstrap()` Resume bootstrap streaming when there is failed data streaming.
`java.util.List<java.lang.String>` `sampleKeyRange()` #Return a List of Tokens representing a sample of keys across all ColumnFamilyStores.
`int` `scrub(boolean disableSnapshot, boolean skipCorrupted, boolean checkData, boolean reinsertOverflowedTTLRows, int jobs, java.lang.String keyspaceName, java.lang.String... columnFamilies)`
`int` `scrub(boolean disableSnapshot, boolean skipCorrupted, boolean checkData, int jobs, java.lang.String keyspaceName, java.lang.String... columnFamilies)`
`int` `scrub(boolean disableSnapshot, boolean skipCorrupted, boolean checkData, java.lang.String keyspaceName, java.lang.String... columnFamilies)`
`int` `scrub(boolean disableSnapshot, boolean skipCorrupted, java.lang.String keyspaceName, java.lang.String... columnFamilies)` Scrub (deserialize + reserialize at the latest version, skipping bad rows if any) the given keyspace.
`void` `setBatchSizeFailureThreshold(int threshold)` Sets the threshold for rejecting queries due to a large batch size
`void` `setCompactionThroughputMbPerSec(int value)`
`void` `setGossipTokens(java.util.Collection<Token> tokens)`
`void` `setHintedHandoffThrottleInKB(int throttleInKB)` Sets the hinted handoff throttle in kb per second, per delivery thread.
`void` `setIncrementalBackupsEnabled(boolean value)`
`void` `setInterDCStreamThroughputMbPerSec(int value)`

`void`

`setLoggingLevel(java.lang.String classQualifier, java.lang.String rawLevel)`
set the logging level at runtime
If both classQualifer and level are empty/null, it will reload the configuration to reset.
If classQualifer is not empty but level is empty/null, it will set the level to null for the defined classQualifer
If level cannot be parsed, then the level will be defaulted to DEBUG
The logback configuration should have < jmxConfigurator /> set

`void` `setRpcReady(boolean value)`
`void` `setStreamThroughputMbPerSec(int value)`
`void` `setTokens(java.util.Collection<Token> tokens)` This method updates the local token on disk
`void` `setTombstoneFailureThreshold(int threshold)` Sets the threshold for abandoning queries with many tombstones
`void` `setTombstoneWarnThreshold(int threshold)` Sets the threshold for warning queries with many tombstones
`void` `setTraceProbability(double probability)` Enables/Disables tracing for the whole system.
`void` `startGossiping()`
`void` `startNativeTransport()`
`void` `startRPCServer()`
`void` `stopClient()`
`void` `stopDaemon()`
`void` `stopGossiping()`
`void` `stopNativeTransport()`
`void` `stopRPCServer()`
`void` `stopTransports()`
`void` `takeColumnFamilySnapshot(java.lang.String keyspaceName, java.lang.String columnFamilyName, java.lang.String tag)` Takes the snapshot of a specific column family.
`void` `takeMultipleColumnFamilySnapshot(java.lang.String tag, java.lang.String... columnFamilyList)` Takes the snapshot of a multiple column family from different keyspaces.
`void` `takeSnapshot(java.lang.String tag, java.lang.String... keyspaceNames)` Takes the snapshot for the given keyspaces.
`long` `trueSnapshotsSize()` Get the true size taken by all snapshots across all keyspaces.
`void` `truncate(java.lang.String keyspace, java.lang.String columnFamily)` Truncates (deletes) the given columnFamily from the provided keyspace.
`void` `unregister(IEndpointLifecycleSubscriber subscriber)`
`void` `unsafeInitialize()`
`void` `updateSnitch(java.lang.String epSnitchClassName, java.lang.Boolean dynamic, java.lang.Integer dynamicUpdateInterval, java.lang.Integer dynamicResetInterval, java.lang.Double dynamicBadnessThreshold)` Change endpointsnitch class and dynamic-ness (and dynamic attributes) at runtime
`void` `updateTopology()`
`void` `updateTopology(java.net.InetAddress endpoint)`
`int` `upgradeSSTables(java.lang.String keyspaceName, boolean excludeCurrentVersion, int jobs, java.lang.String... columnFamilies)`
`int` `upgradeSSTables(java.lang.String keyspaceName, boolean excludeCurrentVersion, java.lang.String... columnFamilies)` Rewrite all sstables to the latest version.
`int` `verify(boolean extendedVerify, java.lang.String keyspaceName, java.lang.String... columnFamilies)` Verify (checksums of) the given keyspace.

### Methods inherited from class javax.management.NotificationBroadcasterSupport

`addNotificationListener, getNotificationInfo, handleNotification, removeNotificationListener, removeNotificationListener, sendNotification`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Methods inherited from interface javax.management.NotificationEmitter

`removeNotificationListener`

### Methods inherited from interface javax.management.NotificationBroadcaster

`addNotificationListener, getNotificationInfo, removeNotificationListener`

### Field Detail

#### RING_DELAY

    public static final int RING_DELAY

#### valueFactory

    public volatile VersionedValue.VersionedValueFactory valueFactory

#### instance

    public static final StorageService instance

### Constructor Detail

#### StorageService

    public StorageService()

### Method Detail

#### isInShutdownHook

    public boolean isInShutdownHook()

#### getPartitioner

    public static IPartitioner getPartitioner()

#### getLocalRanges

    public java.util.Collection<Range<Token>> getLocalRanges(java.lang.String keyspaceName)

#### getPrimaryRanges

    public java.util.Collection<Range<Token>> getPrimaryRanges(java.lang.String keyspace)

#### getPrimaryRangesWithinDC

    public java.util.Collection<Range<Token>> getPrimaryRangesWithinDC(java.lang.String keyspace)

#### setTokens

    public void setTokens(java.util.Collection<Token> tokens)

This method updates the local token on disk

#### setGossipTokens

    public void setGossipTokens(java.util.Collection<Token> tokens)

#### registerDaemon

    public void registerDaemon(CassandraDaemon daemon)

#### register

    public void register(IEndpointLifecycleSubscriber subscriber)

#### unregister

    public void unregister(IEndpointLifecycleSubscriber subscriber)

#### stopGossiping

    public void stopGossiping()

Specified by:
  `stopGossiping` in interface `StorageServiceMBean`

#### startGossiping

    public void startGossiping()

Specified by:
  `startGossiping` in interface `StorageServiceMBean`

#### isGossipRunning

    public boolean isGossipRunning()

Specified by:
  `isGossipRunning` in interface `StorageServiceMBean`

#### startRPCServer

    public void startRPCServer()

Specified by:
  `startRPCServer` in interface `StorageServiceMBean`

#### stopRPCServer

    public void stopRPCServer()

Specified by:
  `stopRPCServer` in interface `StorageServiceMBean`

#### isRPCServerRunning

    public boolean isRPCServerRunning()

Specified by:
  `isRPCServerRunning` in interface `StorageServiceMBean`

#### startNativeTransport

    public void startNativeTransport()

Specified by:
  `startNativeTransport` in interface `StorageServiceMBean`

#### stopNativeTransport

    public void stopNativeTransport()

Specified by:
  `stopNativeTransport` in interface `StorageServiceMBean`

#### isNativeTransportRunning

    public boolean isNativeTransportRunning()

Specified by:
  `isNativeTransportRunning` in interface `StorageServiceMBean`

#### stopTransports

    public void stopTransports()

#### stopClient

    public void stopClient()

#### isInitialized

    public boolean isInitialized()

Specified by:
  `isInitialized` in interface `StorageServiceMBean`

#### isSetupCompleted

    public boolean isSetupCompleted()

#### stopDaemon

    public void stopDaemon()

Specified by:
  `stopDaemon` in interface `StorageServiceMBean`

#### prepareReplacementInfo

    public java.util.Collection<Token> prepareReplacementInfo()
                                                       throws ConfigurationException

Throws:
  `ConfigurationException`

#### checkForEndpointCollision

    public void checkForEndpointCollision()
                                   throws ConfigurationException

Throws:
  `ConfigurationException`

#### unsafeInitialize

    public void unsafeInitialize()
                          throws ConfigurationException

Throws:
  `ConfigurationException`

#### initServer

    public void initServer()
                    throws ConfigurationException

Throws:
  `ConfigurationException`

#### initServer

    public void initServer(int delay)
                    throws ConfigurationException

Throws:
  `ConfigurationException`

#### removeShutdownHook

    public void removeShutdownHook()

In the event of forceful termination we need to remove the shutdown hook to prevent hanging (OOM for instance)

#### isReplacingSameAddress

    public static boolean isReplacingSameAddress()

#### gossipSnitchInfo

    public void gossipSnitchInfo()

#### joinRing

    public void joinRing()
                  throws java.io.IOException

Specified by:
  `joinRing` in interface `StorageServiceMBean`
Throws:
  `java.io.IOException`

#### isJoined

    public boolean isJoined()

Specified by:
  `isJoined` in interface `StorageServiceMBean`

#### rebuild

    public void rebuild(java.lang.String sourceDc)

Description copied from interface: `StorageServiceMBean`
Initiate a process of streaming data for which we are responsible from other nodes. It is similar to bootstrap except meant to be used on a node which is already in the cluster (typically containing no data) as an alternative to running repair.

Specified by:
  `rebuild` in interface `StorageServiceMBean`
Parameters:
  `sourceDc` - Name of DC from which to select sources for streaming or null to pick any node

#### setStreamThroughputMbPerSec

    public void setStreamThroughputMbPerSec(int value)

Specified by:
  `setStreamThroughputMbPerSec` in interface `StorageServiceMBean`

#### getStreamThroughputMbPerSec

    public int getStreamThroughputMbPerSec()

Specified by:
  `getStreamThroughputMbPerSec` in interface `StorageServiceMBean`

#### setInterDCStreamThroughputMbPerSec

    public void setInterDCStreamThroughputMbPerSec(int value)

Specified by:
  `setInterDCStreamThroughputMbPerSec` in interface `StorageServiceMBean`

#### getInterDCStreamThroughputMbPerSec

    public int getInterDCStreamThroughputMbPerSec()

Specified by:
  `getInterDCStreamThroughputMbPerSec` in interface `StorageServiceMBean`

#### getCompactionThroughputMbPerSec

    public int getCompactionThroughputMbPerSec()

Specified by:
  `getCompactionThroughputMbPerSec` in interface `StorageServiceMBean`

#### setCompactionThroughputMbPerSec

    public void setCompactionThroughputMbPerSec(int value)

Specified by:
  `setCompactionThroughputMbPerSec` in interface `StorageServiceMBean`

#### isIncrementalBackupsEnabled

    public boolean isIncrementalBackupsEnabled()

Specified by:
  `isIncrementalBackupsEnabled` in interface `StorageServiceMBean`

#### setIncrementalBackupsEnabled

    public void setIncrementalBackupsEnabled(boolean value)

Specified by:
  `setIncrementalBackupsEnabled` in interface `StorageServiceMBean`

#### resumeBootstrap

    public boolean resumeBootstrap()

Description copied from interface: `StorageServiceMBean`
Resume bootstrap streaming when there is failed data streaming.

Specified by:
  `resumeBootstrap` in interface `StorageServiceMBean`
Returns:
  true if the node successfully starts resuming. (this does not mean bootstrap streaming was success.)

#### isBootstrapMode

    public boolean isBootstrapMode()

#### getTokenMetadata

    public TokenMetadata getTokenMetadata()

#### reportSeverity

    public void reportSeverity(double incr)

Increment about the known Compaction severity of the events in this node

#### reportManualSeverity

    public void reportManualSeverity(double incr)

#### getSeverity

    public double getSeverity(java.net.InetAddress endpoint)

#### getRangeToEndpointMap

    public java.util.Map<java.util.List<java.lang.String>,java.util.List<java.lang.String>> getRangeToEndpointMap(java.lang.String keyspace)

for a keyspace, return the ranges and corresponding listen addresses.

Specified by:
  `getRangeToEndpointMap` in interface `StorageServiceMBean`
Parameters:
  `keyspace` -
Returns:
  the endpoint map

#### getRpcaddress

    public java.lang.String getRpcaddress(java.net.InetAddress endpoint)

Return the rpc address associated with an endpoint as a string.

Parameters:
  `endpoint` - The endpoint to get rpc address for
Returns:
  the rpc address

#### getRangeToRpcaddressMap

    public java.util.Map<java.util.List<java.lang.String>,java.util.List<java.lang.String>> getRangeToRpcaddressMap(java.lang.String keyspace)

for a keyspace, return the ranges and corresponding RPC addresses for a given keyspace.

Specified by:
  `getRangeToRpcaddressMap` in interface `StorageServiceMBean`
Parameters:
  `keyspace` -
Returns:
  the endpoint map

#### getPendingRangeToEndpointMap

    public java.util.Map<java.util.List<java.lang.String>,java.util.List<java.lang.String>> getPendingRangeToEndpointMap(java.lang.String keyspace)

Description copied from interface: `StorageServiceMBean`
Retrieve a map of pending ranges to endpoints that describe the ring topology

Specified by:
  `getPendingRangeToEndpointMap` in interface `StorageServiceMBean`
Parameters:
  `keyspace` - the keyspace to get the pending range map for.
Returns:
  a map of pending ranges to endpoints

#### getRangeToAddressMap

    public java.util.Map<Range<Token>,java.util.List<java.net.InetAddress>> getRangeToAddressMap(java.lang.String keyspace)

#### getRangeToAddressMapInLocalDC

    public java.util.Map<Range<Token>,java.util.List<java.net.InetAddress>> getRangeToAddressMapInLocalDC(java.lang.String keyspace)

#### describeRingJMX

    public java.util.List<java.lang.String> describeRingJMX(java.lang.String keyspace)
                                                     throws java.io.IOException

The same as `describeRing(String)` but converts TokenRange to the String for JMX compatibility

Specified by:
  `describeRingJMX` in interface `StorageServiceMBean`
Parameters:
  `keyspace` - The keyspace to fetch information about
Returns:
  a List of TokenRange(s) converted to String for the given keyspace
Throws:
  `java.io.IOException`

#### describeRing

    public java.util.List<TokenRange> describeRing(java.lang.String keyspace)
                                            throws InvalidRequestException

The TokenRange for a given keyspace.

Parameters:
  `keyspace` - The keyspace to fetch information about
Returns:
  a List of TokenRange(s) for the given keyspace
Throws:
  `InvalidRequestException` - if there is no ring information available about keyspace

#### describeLocalRing

    public java.util.List<TokenRange> describeLocalRing(java.lang.String keyspace)
                                                 throws InvalidRequestException

The same as `describeRing(String)` but considers only the part of the ring formed by nodes in the local DC.

Throws:
  `InvalidRequestException`

#### getTokenToEndpointMap

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

Description copied from interface: `StorageServiceMBean`
Retrieve a map of tokens to endpoints, including the bootstrapping ones.

Specified by:
  `getTokenToEndpointMap` in interface `StorageServiceMBean`
Returns:
  a map of tokens to endpoints in ascending order

#### getLocalHostId

    public java.lang.String getLocalHostId()

Description copied from interface: `StorageServiceMBean`
Retrieve this hosts unique ID

Specified by:
  `getLocalHostId` in interface `StorageServiceMBean`

#### getHostIdMap

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

Description copied from interface: `StorageServiceMBean`
`StorageServiceMBean.getEndpointToHostId()`

Specified by:
  `getHostIdMap` in interface `StorageServiceMBean`

#### getEndpointToHostId

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

Description copied from interface: `StorageServiceMBean`
Retrieve the mapping of endpoint to host ID

Specified by:
  `getEndpointToHostId` in interface `StorageServiceMBean`

#### getHostIdToEndpoint

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

Description copied from interface: `StorageServiceMBean`
Retrieve the mapping of host ID to endpoint

Specified by:
  `getHostIdToEndpoint` in interface `StorageServiceMBean`

#### beforeChange

    public void beforeChange(java.net.InetAddress endpoint,
                             EndpointState currentState,
                             ApplicationState newStateKey,
                             VersionedValue newValue)

Specified by:
  `beforeChange` in interface `IEndpointStateChangeSubscriber`

#### onChange

    public void onChange(java.net.InetAddress endpoint,
                         ApplicationState state,
                         VersionedValue value)

Specified by:
  `onChange` in interface `IEndpointStateChangeSubscriber`

#### updateTopology

    public void updateTopology(java.net.InetAddress endpoint)

#### updateTopology

    public void updateTopology()

#### isRpcReady

    public boolean isRpcReady(java.net.InetAddress endpoint)

#### setRpcReady

    public void setRpcReady(boolean value)

#### addExpireTimeIfFound

    protected void addExpireTimeIfFound(java.net.InetAddress endpoint,
                                        long expireTime)

#### extractExpireTime

    protected long extractExpireTime(java.lang.String[] pieces)

#### onJoin

    public void onJoin(java.net.InetAddress endpoint,
                       EndpointState epState)

Description copied from interface: `IEndpointStateChangeSubscriber`
Use to inform interested parties about the change in the state for specified endpoint

Specified by:
  `onJoin` in interface `IEndpointStateChangeSubscriber`
Parameters:
  `endpoint` - endpoint for which the state change occurred.
  `epState` - state that actually changed for the above endpoint.

#### onAlive

    public void onAlive(java.net.InetAddress endpoint,
                        EndpointState state)

Specified by:
  `onAlive` in interface `IEndpointStateChangeSubscriber`

#### onRemove

    public void onRemove(java.net.InetAddress endpoint)

Specified by:
  `onRemove` in interface `IEndpointStateChangeSubscriber`

#### onDead

    public void onDead(java.net.InetAddress endpoint,
                       EndpointState state)

Specified by:
  `onDead` in interface `IEndpointStateChangeSubscriber`

#### onRestart

    public void onRestart(java.net.InetAddress endpoint,
                          EndpointState state)

Description copied from interface: `IEndpointStateChangeSubscriber`
Called whenever a node is restarted. Note that there is no guarantee when that happens that the node was previously marked down. It will have only if `state.isAlive() == false` as `state` is from before the restarted node is marked up.

Specified by:
  `onRestart` in interface `IEndpointStateChangeSubscriber`

#### getLoadString

    public java.lang.String getLoadString()

Description copied from interface: `StorageServiceMBean`
Human-readable load value

Specified by:
  `getLoadString` in interface `StorageServiceMBean`

#### getLoadMap

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

Description copied from interface: `StorageServiceMBean`
Human-readable load value. Keys are IP addresses.

Specified by:
  `getLoadMap` in interface `StorageServiceMBean`

#### deliverHints

    public final void deliverHints(java.lang.String host)
                            throws java.net.UnknownHostException

Specified by:
  `deliverHints` in interface `StorageServiceMBean`
Throws:
  `java.net.UnknownHostException`

#### getLocalTokens

    public java.util.Collection<Token> getLocalTokens()

#### getTokens

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

Description copied from interface: `StorageServiceMBean`
Fetch string representations of the tokens for this node.

Specified by:
  `getTokens` in interface `StorageServiceMBean`
Returns:
  a collection of tokens formatted as strings

#### getTokens

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

Description copied from interface: `StorageServiceMBean`
Fetch string representations of the tokens for a specified node.

Specified by:
  `getTokens` in interface `StorageServiceMBean`
Parameters:
  `endpoint` - string representation of an node
Returns:
  a collection of tokens formatted as strings
Throws:
  `java.net.UnknownHostException`

#### getReleaseVersion

    public java.lang.String getReleaseVersion()

Description copied from interface: `StorageServiceMBean`
Fetch a string representation of the Cassandra version.

Specified by:
  `getReleaseVersion` in interface `StorageServiceMBean`
Returns:
  A string representation of the Cassandra version.

#### getSchemaVersion

    public java.lang.String getSchemaVersion()

Description copied from interface: `StorageServiceMBean`
Fetch a string representation of the current Schema version.

Specified by:
  `getSchemaVersion` in interface `StorageServiceMBean`
Returns:
  A string representation of the Schema version.

#### getLeavingNodes

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

Description copied from interface: `StorageServiceMBean`
Retrieve the list of nodes currently leaving the ring.

Specified by:
  `getLeavingNodes` in interface `StorageServiceMBean`
Returns:
  set of IP addresses, as Strings

#### getMovingNodes

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

Description copied from interface: `StorageServiceMBean`
Retrieve the list of nodes currently moving in the ring.

Specified by:
  `getMovingNodes` in interface `StorageServiceMBean`
Returns:
  set of IP addresses, as Strings

#### getJoiningNodes

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

Description copied from interface: `StorageServiceMBean`
Retrieve the list of nodes currently bootstrapping into the ring.

Specified by:
  `getJoiningNodes` in interface `StorageServiceMBean`
Returns:
  set of IP addresses, as Strings

#### getLiveNodes

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

Description copied from interface: `StorageServiceMBean`
Retrieve the list of live nodes in the cluster, where "liveness" is determined by the failure detector of the node being queried.

Specified by:
  `getLiveNodes` in interface `StorageServiceMBean`
Returns:
  set of IP addresses, as Strings

#### getLiveRingMembers

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

#### getLiveRingMembers

    public java.util.Set<java.net.InetAddress> getLiveRingMembers(boolean excludeDeadStates)

#### getUnreachableNodes

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

Description copied from interface: `StorageServiceMBean`
Retrieve the list of unreachable nodes in the cluster, as determined by this node's failure detector.

Specified by:
  `getUnreachableNodes` in interface `StorageServiceMBean`
Returns:
  set of IP addresses, as Strings

#### getAllDataFileLocations

    public java.lang.String[] getAllDataFileLocations()

Description copied from interface: `StorageServiceMBean`
Get the list of all data file locations from conf

Specified by:
  `getAllDataFileLocations` in interface `StorageServiceMBean`
Returns:
  String array of all locations

#### getCommitLogLocation

    public java.lang.String getCommitLogLocation()

Description copied from interface: `StorageServiceMBean`
Get location of the commit log

Specified by:
  `getCommitLogLocation` in interface `StorageServiceMBean`
Returns:
  a string path

#### getSavedCachesLocation

    public java.lang.String getSavedCachesLocation()

Description copied from interface: `StorageServiceMBean`
Get location of the saved caches dir

Specified by:
  `getSavedCachesLocation` in interface `StorageServiceMBean`
Returns:
  a string path

#### getCurrentGenerationNumber

    public int getCurrentGenerationNumber()

Description copied from interface: `StorageServiceMBean`
Return the generation value for this node.

Specified by:
  `getCurrentGenerationNumber` in interface `StorageServiceMBean`
Returns:
  generation number

#### forceKeyspaceCleanup

    public int forceKeyspaceCleanup(java.lang.String keyspaceName,
                                    java.lang.String... columnFamilies)
                             throws java.io.IOException,
                                    java.util.concurrent.ExecutionException,
                                    java.lang.InterruptedException

Description copied from interface: `StorageServiceMBean`
Trigger a cleanup of keys on a single keyspace

Specified by:
  `forceKeyspaceCleanup` in interface `StorageServiceMBean`
Throws:
  `java.io.IOException`
  `java.util.concurrent.ExecutionException`
  `java.lang.InterruptedException`

#### forceKeyspaceCleanup

    public int forceKeyspaceCleanup(int jobs,
                                    java.lang.String keyspaceName,
                                    java.lang.String... columnFamilies)
                             throws java.io.IOException,
                                    java.util.concurrent.ExecutionException,
                                    java.lang.InterruptedException

Specified by:
  `forceKeyspaceCleanup` in interface `StorageServiceMBean`
Throws:
  `java.io.IOException`
  `java.util.concurrent.ExecutionException`
  `java.lang.InterruptedException`

#### scrub

    public int scrub(boolean disableSnapshot,
                     boolean skipCorrupted,
                     java.lang.String keyspaceName,
                     java.lang.String... columnFamilies)
              throws java.io.IOException,
                     java.util.concurrent.ExecutionException,
                     java.lang.InterruptedException

Description copied from interface: `StorageServiceMBean`
Scrub (deserialize + reserialize at the latest version, skipping bad rows if any) the given keyspace. If columnFamilies array is empty, all CFs are scrubbed. Scrubbed CFs will be snapshotted first, if disableSnapshot is false

Specified by:
  `scrub` in interface `StorageServiceMBean`
Throws:
  `java.io.IOException`
  `java.util.concurrent.ExecutionException`
  `java.lang.InterruptedException`

#### scrub

    public int scrub(boolean disableSnapshot,
                     boolean skipCorrupted,
                     boolean checkData,
                     java.lang.String keyspaceName,
                     java.lang.String... columnFamilies)
              throws java.io.IOException,
                     java.util.concurrent.ExecutionException,
                     java.lang.InterruptedException

Specified by:
  `scrub` in interface `StorageServiceMBean`
Throws:
  `java.io.IOException`
  `java.util.concurrent.ExecutionException`
  `java.lang.InterruptedException`

#### scrub

    public int scrub(boolean disableSnapshot,
                     boolean skipCorrupted,
                     boolean checkData,
                     int jobs,
                     java.lang.String keyspaceName,
                     java.lang.String... columnFamilies)
              throws java.io.IOException,
                     java.util.concurrent.ExecutionException,
                     java.lang.InterruptedException

Specified by:
  `scrub` in interface `StorageServiceMBean`
Throws:
  `java.io.IOException`
  `java.util.concurrent.ExecutionException`
  `java.lang.InterruptedException`

#### scrub

    public int scrub(boolean disableSnapshot,
                     boolean skipCorrupted,
                     boolean checkData,
                     boolean reinsertOverflowedTTLRows,
                     int jobs,
                     java.lang.String keyspaceName,
                     java.lang.String... columnFamilies)
              throws java.io.IOException,
                     java.util.concurrent.ExecutionException,
                     java.lang.InterruptedException

Specified by:
  `scrub` in interface `StorageServiceMBean`
Throws:
  `java.io.IOException`
  `java.util.concurrent.ExecutionException`
  `java.lang.InterruptedException`

#### verify

    public int verify(boolean extendedVerify,
                      java.lang.String keyspaceName,
                      java.lang.String... columnFamilies)
               throws java.io.IOException,
                      java.util.concurrent.ExecutionException,
                      java.lang.InterruptedException

Description copied from interface: `StorageServiceMBean`
Verify (checksums of) the given keyspace. If columnFamilies array is empty, all CFs are verified. The entire sstable will be read to ensure each cell validates if extendedVerify is true

Specified by:
  `verify` in interface `StorageServiceMBean`
Throws:
  `java.io.IOException`
  `java.util.concurrent.ExecutionException`
  `java.lang.InterruptedException`

#### upgradeSSTables

    public int upgradeSSTables(java.lang.String keyspaceName,
                               boolean excludeCurrentVersion,
                               java.lang.String... columnFamilies)
                        throws java.io.IOException,
                               java.util.concurrent.ExecutionException,
                               java.lang.InterruptedException

Description copied from interface: `StorageServiceMBean`
Rewrite all sstables to the latest version. Unlike scrub, it doesn't skip bad rows and do not snapshot sstables first.

Specified by:
  `upgradeSSTables` in interface `StorageServiceMBean`
Throws:
  `java.io.IOException`
  `java.util.concurrent.ExecutionException`
  `java.lang.InterruptedException`

#### upgradeSSTables

    public int upgradeSSTables(java.lang.String keyspaceName,
                               boolean excludeCurrentVersion,
                               int jobs,
                               java.lang.String... columnFamilies)
                        throws java.io.IOException,
                               java.util.concurrent.ExecutionException,
                               java.lang.InterruptedException

Specified by:
  `upgradeSSTables` in interface `StorageServiceMBean`
Throws:
  `java.io.IOException`
  `java.util.concurrent.ExecutionException`
  `java.lang.InterruptedException`

#### forceKeyspaceCompaction

    public void forceKeyspaceCompaction(boolean splitOutput,
                                        java.lang.String keyspaceName,
                                        java.lang.String... columnFamilies)
                                 throws java.io.IOException,
                                        java.util.concurrent.ExecutionException,
                                        java.lang.InterruptedException

Description copied from interface: `StorageServiceMBean`
Forces major compaction of a single keyspace

Specified by:
  `forceKeyspaceCompaction` in interface `StorageServiceMBean`
Throws:
  `java.io.IOException`
  `java.util.concurrent.ExecutionException`
  `java.lang.InterruptedException`

#### takeSnapshot

    public void takeSnapshot(java.lang.String tag,
                             java.lang.String... keyspaceNames)
                      throws java.io.IOException

Takes the snapshot for the given keyspaces. A snapshot name must be specified.

Specified by:
  `takeSnapshot` in interface `StorageServiceMBean`
Parameters:
  `tag` - the tag given to the snapshot; may not be null or empty
  `keyspaceNames` - the names of the keyspaces to snapshot; empty means "all."
Throws:
  `java.io.IOException`

#### takeColumnFamilySnapshot

    public void takeColumnFamilySnapshot(java.lang.String keyspaceName,
                                         java.lang.String columnFamilyName,
                                         java.lang.String tag)
                                  throws java.io.IOException

Takes the snapshot of a specific column family. A snapshot name must be specified.

Specified by:
  `takeColumnFamilySnapshot` in interface `StorageServiceMBean`
Parameters:
  `keyspaceName` - the keyspace which holds the specified column family
  `columnFamilyName` - the column family to snapshot
  `tag` - the tag given to the snapshot; may not be null or empty
Throws:
  `java.io.IOException`

#### takeMultipleColumnFamilySnapshot

    public void takeMultipleColumnFamilySnapshot(java.lang.String tag,
                                                 java.lang.String... columnFamilyList)
                                          throws java.io.IOException

Takes the snapshot of a multiple column family from different keyspaces. A snapshot name must be specified.

Specified by:
  `takeMultipleColumnFamilySnapshot` in interface `StorageServiceMBean`
Parameters:
  `tag` - the tag given to the snapshot; may not be null or empty
  `columnFamilyList` - list of columnfamily from different keyspace in the form of ks1.cf1 ks2.cf2
Throws:
  `java.io.IOException`

#### clearSnapshot

    public void clearSnapshot(java.lang.String tag,
                              java.lang.String... keyspaceNames)
                       throws java.io.IOException

Remove the snapshot with the given name from the given keyspaces. If no tag is specified we will remove all snapshots.

Specified by:
  `clearSnapshot` in interface `StorageServiceMBean`
Throws:
  `java.io.IOException`

#### getSnapshotDetails

    public java.util.Map<java.lang.String,javax.management.openmbean.TabularData> getSnapshotDetails()

Description copied from interface: `StorageServiceMBean`
Get the details of all the snapshot

Specified by:
  `getSnapshotDetails` in interface `StorageServiceMBean`
Returns:
  A map of snapshotName to all its details in Tabular form.

#### trueSnapshotsSize

    public long trueSnapshotsSize()

Description copied from interface: `StorageServiceMBean`
Get the true size taken by all snapshots across all keyspaces.

Specified by:
  `trueSnapshotsSize` in interface `StorageServiceMBean`
Returns:
  True size taken by all the snapshots.

#### refreshSizeEstimates

    public void refreshSizeEstimates()
                              throws java.util.concurrent.ExecutionException

Description copied from interface: `StorageServiceMBean`
Forces refresh of values stored in system.size_estimates of all column families.

Specified by:
  `refreshSizeEstimates` in interface `StorageServiceMBean`
Throws:
  `java.util.concurrent.ExecutionException`

#### getValidColumnFamilies

    public java.lang.Iterable<ColumnFamilyStore> getValidColumnFamilies(boolean allowIndexes,
                                                                        boolean autoAddIndexes,
                                                                        java.lang.String keyspaceName,
                                                                        java.lang.String... cfNames)
                                                                 throws java.io.IOException

Parameters:
  `allowIndexes` - Allow index CF names to be passed in
  `autoAddIndexes` - Automatically add secondary indexes if a CF has them
  `keyspaceName` - keyspace
  `cfNames` - CFs
Throws:
  `java.lang.IllegalArgumentException` - when given CF name does not exist
  `java.io.IOException`

#### forceKeyspaceFlush

    public void forceKeyspaceFlush(java.lang.String keyspaceName,
                                   java.lang.String... columnFamilies)
                            throws java.io.IOException

Flush all memtables for a keyspace and column families.

Specified by:
  `forceKeyspaceFlush` in interface `StorageServiceMBean`
Parameters:
  `keyspaceName` -
  `columnFamilies` -
Throws:
  `java.io.IOException`

#### repairAsync

    public int repairAsync(java.lang.String keyspace,
                           java.util.Map<java.lang.String,java.lang.String> repairSpec)

Description copied from interface: `StorageServiceMBean`
Invoke repair asynchronously. You can track repair progress by subscribing JMX notification sent from this StorageServiceMBean. Notification format is: type: "repair" userObject: int array of length 2, [0]=command number, [1]=ordinal of ActiveRepairService.Status

Specified by:
  `repairAsync` in interface `StorageServiceMBean`
Parameters:
  `keyspace` - Keyspace name to repair. Should not be null.
  `repairSpec` - repair option.
Returns:
  Repair command number, or 0 if nothing to repair

#### forceRepairAsync

    @Deprecated
    public int forceRepairAsync(java.lang.String keyspace,
                                            boolean isSequential,
                                            java.util.Collection<java.lang.String> dataCenters,
                                            java.util.Collection<java.lang.String> hosts,
                                            boolean primaryRange,
                                            boolean fullRepair,
                                            java.lang.String... columnFamilies)

Deprecated.

Specified by:
  `forceRepairAsync` in interface `StorageServiceMBean`

#### forceRepairAsync

    @Deprecated
    public int forceRepairAsync(java.lang.String keyspace,
                                            int parallelismDegree,
                                            java.util.Collection<java.lang.String> dataCenters,
                                            java.util.Collection<java.lang.String> hosts,
                                            boolean primaryRange,
                                            boolean fullRepair,
                                            java.lang.String... columnFamilies)

Deprecated.
Description copied from interface: `StorageServiceMBean`
Invoke repair asynchronously. You can track repair progress by subscribing JMX notification sent from this StorageServiceMBean. Notification format is: type: "repair" userObject: int array of length 2, [0]=command number, [1]=ordinal of ActiveRepairService.Status

Specified by:
  `forceRepairAsync` in interface `StorageServiceMBean`
  `parallelismDegree` - 0: sequential, 1: parallel, 2: DC parallel
Returns:
  Repair command number, or 0 if nothing to repair

#### forceRepairAsync

    @Deprecated
    public int forceRepairAsync(java.lang.String keyspace,
                                            boolean isSequential,
                                            boolean isLocal,
                                            boolean primaryRange,
                                            boolean fullRepair,
                                            java.lang.String... columnFamilies)

Deprecated.

Specified by:
  `forceRepairAsync` in interface `StorageServiceMBean`

#### forceRepairRangeAsync

    @Deprecated
    public int forceRepairRangeAsync(java.lang.String beginToken,
                                                 java.lang.String endToken,
                                                 java.lang.String keyspaceName,
                                                 boolean isSequential,
                                                 java.util.Collection<java.lang.String> dataCenters,
                                                 java.util.Collection<java.lang.String> hosts,
                                                 boolean fullRepair,
                                                 java.lang.String... columnFamilies)

Deprecated.

Specified by:
  `forceRepairRangeAsync` in interface `StorageServiceMBean`

#### forceRepairRangeAsync

    @Deprecated
    public int forceRepairRangeAsync(java.lang.String beginToken,
                                                 java.lang.String endToken,
                                                 java.lang.String keyspaceName,
                                                 int parallelismDegree,
                                                 java.util.Collection<java.lang.String> dataCenters,
                                                 java.util.Collection<java.lang.String> hosts,
                                                 boolean fullRepair,
                                                 java.lang.String... columnFamilies)

Deprecated.
Description copied from interface: `StorageServiceMBean`
Same as forceRepairAsync, but handles a specified range

Specified by:
  `forceRepairRangeAsync` in interface `StorageServiceMBean`
  `parallelismDegree` - 0: sequential, 1: parallel, 2: DC parallel

#### forceRepairRangeAsync

    @Deprecated
    public int forceRepairRangeAsync(java.lang.String beginToken,
                                                 java.lang.String endToken,
                                                 java.lang.String keyspaceName,
                                                 boolean isSequential,
                                                 boolean isLocal,
                                                 boolean fullRepair,
                                                 java.lang.String... columnFamilies)

Deprecated.

Specified by:
  `forceRepairRangeAsync` in interface `StorageServiceMBean`

#### forceRepairAsync

    public int forceRepairAsync(java.lang.String keyspace,
                                RepairOption options,
                                boolean legacy)

#### forceTerminateAllRepairSessions

    public void forceTerminateAllRepairSessions()

Specified by:
  `forceTerminateAllRepairSessions` in interface `StorageServiceMBean`

#### getPrimaryRangesForEndpoint

    public java.util.Collection<Range<Token>> getPrimaryRangesForEndpoint(java.lang.String keyspace,
                                                                          java.net.InetAddress ep)

Get the "primary ranges" for the specified keyspace and endpoint. "Primary ranges" are the ranges that the node is responsible for storing replica primarily. The node that stores replica primarily is defined as the first node returned by `AbstractReplicationStrategy.calculateNaturalEndpoints(org.apache.cassandra.dht.Token, org.apache.cassandra.locator.TokenMetadata)`.

Parameters:
  `keyspace` - Keyspace name to check primary ranges
  `ep` - endpoint we are interested in.
Returns:
  primary ranges for the specified endpoint.

#### getPrimaryRangeForEndpointWithinDC

    public java.util.Collection<Range<Token>> getPrimaryRangeForEndpointWithinDC(java.lang.String keyspace,
                                                                                 java.net.InetAddress referenceEndpoint)

Get the "primary ranges" within local DC for the specified keyspace and endpoint.

Parameters:
  `keyspace` - Keyspace name to check primary ranges
  `referenceEndpoint` - endpoint we are interested in.
Returns:
  primary ranges within local DC for the specified endpoint.
See Also:
  `getPrimaryRangesForEndpoint(String, java.net.InetAddress)`

#### getAllRanges

    public java.util.List<Range<Token>> getAllRanges(java.util.List<Token> sortedTokens)

Get all ranges that span the ring given a set of tokens. All ranges are in sorted order of ranges.

Returns:
  ranges in sorted order

#### getNaturalEndpoints

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

This method returns the N endpoints that are responsible for storing the specified key i.e for replication.

Specified by:
  `getNaturalEndpoints` in interface `StorageServiceMBean`
Parameters:
  `keyspaceName` - keyspace name also known as keyspace
  `cf` - Column family name
  `key` - key for which we need to find the endpoint
Returns:
  the endpoint responsible for this key

#### getNaturalEndpoints

    public java.util.List<java.net.InetAddress> getNaturalEndpoints(java.lang.String keyspaceName,
                                                                    java.nio.ByteBuffer key)

Specified by:
  `getNaturalEndpoints` in interface `StorageServiceMBean`

#### getNaturalEndpoints

    public java.util.List<java.net.InetAddress> getNaturalEndpoints(java.lang.String keyspaceName,
                                                                    RingPosition pos)

This method returns the N endpoints that are responsible for storing the specified key i.e for replication.

Parameters:
  `keyspaceName` - keyspace name also known as keyspace
  `pos` - position for which we need to find the endpoint
Returns:
  the endpoint responsible for this token

#### getLiveNaturalEndpoints

    public java.util.List<java.net.InetAddress> getLiveNaturalEndpoints(Keyspace keyspace,
                                                                        java.nio.ByteBuffer key)

This method attempts to return N endpoints that are responsible for storing the specified key i.e for replication.

Parameters:
  `keyspace` - keyspace name also known as keyspace
  `key` - key for which we need to find the endpoint
Returns:
  the endpoint responsible for this key

#### getLiveNaturalEndpoints

    public java.util.List<java.net.InetAddress> getLiveNaturalEndpoints(Keyspace keyspace,
                                                                        RingPosition pos)

#### setLoggingLevel

    public void setLoggingLevel(java.lang.String classQualifier,
                                java.lang.String rawLevel)
                         throws java.lang.Exception

Description copied from interface: `StorageServiceMBean`
set the logging level at runtime
If both classQualifer and level are empty/null, it will reload the configuration to reset.
If classQualifer is not empty but level is empty/null, it will set the level to null for the defined classQualifer
If level cannot be parsed, then the level will be defaulted to DEBUG
The logback configuration should have < jmxConfigurator /> set

Specified by:
  `setLoggingLevel` in interface `StorageServiceMBean`
Parameters:
  `classQualifier` - The logger's classQualifer
  `rawLevel` - The log level
Throws:
  `java.lang.Exception`
See Also:
  `Level.toLevel(String)`

#### getLoggingLevels

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

Description copied from interface: `StorageServiceMBean`
get the runtime logging levels

Specified by:
  `getLoggingLevels` in interface `StorageServiceMBean`
Returns:
  the runtime logging levels for all the configured loggers

#### getSplits

    public java.util.List<Pair<Range<Token>,java.lang.Long>> getSplits(java.lang.String keyspaceName,
                                                                       java.lang.String cfName,
                                                                       Range<Token> range,
                                                                       int keysPerSplit)

Returns:
  list of Token ranges (_not_ keys!) together with estimated key count, breaking up the data this node is responsible for into pieces of roughly keysPerSplit

#### decommission

    public void decommission()
                      throws java.lang.InterruptedException

Description copied from interface: `StorageServiceMBean`
transfer this node's data to other machines and remove it from service.

Specified by:
  `decommission` in interface `StorageServiceMBean`
Throws:
  `java.lang.InterruptedException`

#### move

    public void move(java.lang.String newToken)
              throws java.io.IOException

Specified by:
  `move` in interface `StorageServiceMBean`
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`

#### getRemovalStatus

    public java.lang.String getRemovalStatus()

Get the status of a token removal.

Specified by:
  `getRemovalStatus` in interface `StorageServiceMBean`

#### forceRemoveCompletion

    public void forceRemoveCompletion()

Force a remove operation to complete. This may be necessary if a remove operation blocks forever due to node/stream failure. removeToken() must be called first, this is a last resort measure. No further attempt will be made to restore replicas.

Specified by:
  `forceRemoveCompletion` in interface `StorageServiceMBean`

#### removeNode

    public void removeNode(java.lang.String hostIdString)

Remove a node that has died, attempting to restore the replica count. If the node is alive, decommission should be attempted. If decommission fails, then removeToken should be called. If we fail while trying to restore the replica count, finally forceRemoveCompleteion should be called to forcibly remove the node without regard to replica count.

Specified by:
  `removeNode` in interface `StorageServiceMBean`
Parameters:
  `hostIdString` - token for the node

#### confirmReplication

    public void confirmReplication(java.net.InetAddress node)

#### getOperationMode

    public java.lang.String getOperationMode()

Description copied from interface: `StorageServiceMBean`
get the operational mode (leaving, joining, normal, decommissioned, client)

Specified by:
  `getOperationMode` in interface `StorageServiceMBean`

#### isStarting

    public boolean isStarting()

Description copied from interface: `StorageServiceMBean`
Returns whether the storage service is starting or not

Specified by:
  `isStarting` in interface `StorageServiceMBean`

#### getDrainProgress

    public java.lang.String getDrainProgress()

Description copied from interface: `StorageServiceMBean`
get the progress of a drain operation

Specified by:
  `getDrainProgress` in interface `StorageServiceMBean`

#### drain

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

Shuts node off to writes, empties memtables and the commit log. There are two differences between drain and the normal shutdown hook: - Drain waits for in-progress streaming to complete - Drain flushes *all* columnfamilies (shutdown hook only flushes non-durable CFs)

Specified by:
  `drain` in interface `StorageServiceMBean`
Throws:
  `java.io.IOException`
  `java.lang.InterruptedException`
  `java.util.concurrent.ExecutionException`

#### truncate

    public void truncate(java.lang.String keyspace,
                         java.lang.String columnFamily)
                  throws java.util.concurrent.TimeoutException,
                         java.io.IOException

Description copied from interface: `StorageServiceMBean`
Truncates (deletes) the given columnFamily from the provided keyspace. Calling truncate results in actual deletion of all data in the cluster under the given columnFamily and it will fail unless all hosts are up. All data in the given column family will be deleted, but its definition will not be affected.

Specified by:
  `truncate` in interface `StorageServiceMBean`
Parameters:
  `keyspace` - The keyspace to delete from
  `columnFamily` - The column family to delete data from.
Throws:
  `java.util.concurrent.TimeoutException`
  `java.io.IOException`

#### getOwnership

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

Description copied from interface: `StorageServiceMBean`
given a list of tokens (representing the nodes in the cluster), returns a mapping from "token -> %age of cluster owned by that token"

Specified by:
  `getOwnership` in interface `StorageServiceMBean`

#### effectiveOwnership

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

Calculates ownership. If there are multiple DC's and the replication strategy is DC aware then ownership will be calculated per dc, i.e. each DC will have total ring ownership divided amongst its nodes. Without replication total ownership will be a multiple of the number of DC's and this value will then go up within each DC depending on the number of replicas within itself. For DC unaware replication strategies, ownership without replication will be 100%.

Specified by:
  `effectiveOwnership` in interface `StorageServiceMBean`
Throws:
  `java.lang.IllegalStateException` - when node is not configured properly.

#### getKeyspaces

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

Specified by:
  `getKeyspaces` in interface `StorageServiceMBean`

#### getNonSystemKeyspaces

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

Specified by:
  `getNonSystemKeyspaces` in interface `StorageServiceMBean`

#### updateSnitch

    public void updateSnitch(java.lang.String epSnitchClassName,
                             java.lang.Boolean dynamic,
                             java.lang.Integer dynamicUpdateInterval,
                             java.lang.Integer dynamicResetInterval,
                             java.lang.Double dynamicBadnessThreshold)
                      throws java.lang.ClassNotFoundException

Description copied from interface: `StorageServiceMBean`
Change endpointsnitch class and dynamic-ness (and dynamic attributes) at runtime

Specified by:
  `updateSnitch` in interface `StorageServiceMBean`
Parameters:
  `epSnitchClassName` - the canonical path name for a class implementing IEndpointSnitch
  `dynamic` - boolean that decides whether dynamicsnitch is used or not
  `dynamicUpdateInterval` - integer, in ms (default 100)
  `dynamicResetInterval` - integer, in ms (default 600,000)
  `dynamicBadnessThreshold` - double, (default 0.0)
Throws:
  `java.lang.ClassNotFoundException`

#### calculateStreamAndFetchRanges

    public Pair<java.util.Set<Range<Token>>,java.util.Set<Range<Token>>> calculateStreamAndFetchRanges(java.util.Collection<Range<Token>> current,
                                                                                                       java.util.Collection<Range<Token>> updated)

Calculate pair of ranges to stream/fetch for given two range collections (current ranges for keyspace and ranges after move to new token)

Parameters:
  `current` - collection of the ranges by current token
  `updated` - collection of the ranges after token is changed
Returns:
  pair of ranges to stream/fetch for given current and updated range collections

#### bulkLoad

    public void bulkLoad(java.lang.String directory)

Description copied from interface: `StorageServiceMBean`
Starts a bulk load and blocks until it completes.

Specified by:
  `bulkLoad` in interface `StorageServiceMBean`

#### bulkLoadAsync

    public java.lang.String bulkLoadAsync(java.lang.String directory)

Description copied from interface: `StorageServiceMBean`
Starts a bulk load asynchronously and returns the String representation of the planID for the new streaming session.

Specified by:
  `bulkLoadAsync` in interface `StorageServiceMBean`

#### rescheduleFailedDeletions

    public void rescheduleFailedDeletions()

Specified by:
  `rescheduleFailedDeletions` in interface `StorageServiceMBean`

#### loadNewSSTables

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

#Load new SSTables to the given keyspace/columnFamily

Specified by:
  `loadNewSSTables` in interface `StorageServiceMBean`
Parameters:
  `ksName` - The parent keyspace name
  `cfName` - The ColumnFamily name where SSTables belong

#### sampleKeyRange

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

#Return a List of Tokens representing a sample of keys across all ColumnFamilyStores. Note: this should be left as an operation, not an attribute (methods starting with "get") to avoid sending potentially multiple MB of data when accessing this mbean by default. See CASSANDRA-4452.

Specified by:
  `sampleKeyRange` in interface `StorageServiceMBean`
Returns:
  set of Tokens as Strings

#### rebuildSecondaryIndex

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

Description copied from interface: `StorageServiceMBean`
rebuild the specified indexes

Specified by:
  `rebuildSecondaryIndex` in interface `StorageServiceMBean`

#### resetLocalSchema

    public void resetLocalSchema()
                          throws java.io.IOException

Specified by:
  `resetLocalSchema` in interface `StorageServiceMBean`
Throws:
  `java.io.IOException`

#### setTraceProbability

    public void setTraceProbability(double probability)

Description copied from interface: `StorageServiceMBean`
Enables/Disables tracing for the whole system. Only thrift requests can start tracing currently.

Specified by:
  `setTraceProbability` in interface `StorageServiceMBean`
Parameters:
  `probability` - ]0,1[ will enable tracing on a partial number of requests with the provided probability. 0 will disable tracing and 1 will enable tracing for all requests (which mich severely cripple the system)

#### getTraceProbability

    public double getTraceProbability()

Description copied from interface: `StorageServiceMBean`
Returns the configured tracing probability.

Specified by:
  `getTraceProbability` in interface `StorageServiceMBean`

#### disableAutoCompaction

    public void disableAutoCompaction(java.lang.String ks,
                                      java.lang.String... columnFamilies)
                               throws java.io.IOException

Specified by:
  `disableAutoCompaction` in interface `StorageServiceMBean`
Throws:
  `java.io.IOException`

#### enableAutoCompaction

    public void enableAutoCompaction(java.lang.String ks,
                                     java.lang.String... columnFamilies)
                              throws java.io.IOException

Specified by:
  `enableAutoCompaction` in interface `StorageServiceMBean`
Throws:
  `java.io.IOException`

#### getClusterName

    public java.lang.String getClusterName()

Returns the name of the cluster

Specified by:
  `getClusterName` in interface `StorageServiceMBean`

#### getPartitionerName

    public java.lang.String getPartitionerName()

Returns the cluster partitioner

Specified by:
  `getPartitionerName` in interface `StorageServiceMBean`

#### getTombstoneWarnThreshold

    public int getTombstoneWarnThreshold()

Description copied from interface: `StorageServiceMBean`
Returns the threshold for warning of queries with many tombstones

Specified by:
  `getTombstoneWarnThreshold` in interface `StorageServiceMBean`

#### setTombstoneWarnThreshold

    public void setTombstoneWarnThreshold(int threshold)

Description copied from interface: `StorageServiceMBean`
Sets the threshold for warning queries with many tombstones

Specified by:
  `setTombstoneWarnThreshold` in interface `StorageServiceMBean`

#### getTombstoneFailureThreshold

    public int getTombstoneFailureThreshold()

Description copied from interface: `StorageServiceMBean`
Returns the threshold for abandoning queries with many tombstones

Specified by:
  `getTombstoneFailureThreshold` in interface `StorageServiceMBean`

#### setTombstoneFailureThreshold

    public void setTombstoneFailureThreshold(int threshold)

Description copied from interface: `StorageServiceMBean`
Sets the threshold for abandoning queries with many tombstones

Specified by:
  `setTombstoneFailureThreshold` in interface `StorageServiceMBean`

#### getBatchSizeFailureThreshold

    public int getBatchSizeFailureThreshold()

Description copied from interface: `StorageServiceMBean`
Returns the threshold for rejecting queries due to a large batch size

Specified by:
  `getBatchSizeFailureThreshold` in interface `StorageServiceMBean`

#### setBatchSizeFailureThreshold

    public void setBatchSizeFailureThreshold(int threshold)

Description copied from interface: `StorageServiceMBean`
Sets the threshold for rejecting queries due to a large batch size

Specified by:
  `setBatchSizeFailureThreshold` in interface `StorageServiceMBean`

#### setHintedHandoffThrottleInKB

    public void setHintedHandoffThrottleInKB(int throttleInKB)

Description copied from interface: `StorageServiceMBean`
Sets the hinted handoff throttle in kb per second, per delivery thread.

Specified by:
  `setHintedHandoffThrottleInKB` in interface `StorageServiceMBean`