|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.cassandra.service.StorageService
public class StorageService
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 | |
|---|---|
static StorageService |
instance
|
static DebuggableScheduledThreadPoolExecutor |
optionalTasks
tasks that do not need to be waited for on shutdown/drain |
static int |
RING_DELAY
|
static DebuggableScheduledThreadPoolExecutor |
scheduledTasks
This pool is used for periodic short (sub-second) tasks. |
static DebuggableScheduledThreadPoolExecutor |
tasks
This pool is used by tasks that can have longer execution times, and usually are non periodic. |
VersionedValue.VersionedValueFactory |
valueFactory
|
| Constructor Summary | |
|---|---|
StorageService()
|
|
| Method Summary | |
|---|---|
protected void |
addExpireTimeIfFound(java.net.InetAddress endpoint,
long expireTime)
|
void |
bulkLoad(java.lang.String directory)
|
static void |
calculatePendingRanges(AbstractReplicationStrategy strategy,
java.lang.String table)
|
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 table and ranges after move to new token) |
void |
clearSnapshot(java.lang.String tag,
java.lang.String... tableNames)
Remove the snapshot with the given name from the given tables. |
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> |
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 |
disableScheduledRangeXfers()
Disable processing of queued range transfers. |
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 |
enableScheduledRangeXfers()
Begin processing of queued range transfers. |
protected long |
extractExpireTime(java.lang.String[] pieces,
int version)
|
void |
finishBootstrapping()
|
void |
flushLargestMemtables()
Flushes the two largest memtables by ops and by throughput |
void |
forceRemoveCompletion()
Force a remove operation to complete. |
void |
forceTableCleanup(java.lang.String tableName,
java.lang.String... columnFamilies)
Trigger a cleanup of keys on a single keyspace |
void |
forceTableCompaction(java.lang.String tableName,
java.lang.String... columnFamilies)
Forces major compaction of a single keyspace |
void |
forceTableFlush(java.lang.String tableName,
java.lang.String... columnFamilies)
Flush all memtables for a table and column families. |
AntiEntropyService.RepairFuture |
forceTableRepair(Range<Token> range,
java.lang.String tableName,
boolean isSequential,
boolean isLocal,
java.lang.String... columnFamilies)
|
void |
forceTableRepair(java.lang.String tableName,
boolean isSequential,
boolean isLocal,
java.lang.String... columnFamilies)
Trigger proactive repair for a table and column families. |
void |
forceTableRepairPrimaryRange(java.lang.String tableName,
boolean isSequential,
boolean isLocal,
java.lang.String... columnFamilies)
Triggers proactive repair but only for the node primary range. |
void |
forceTableRepairRange(java.lang.String tableName,
java.util.Collection<Range<Token>> ranges,
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)
Perform repair of a specific range. |
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. |
Token |
getBootstrapToken()
return a token to which if a node bootstraps it will get about 1/2 of this node's range |
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 |
int |
getExceptionCount()
|
java.util.Map<java.lang.String,java.lang.String> |
getHostIdMap()
Retrieve the mapping of endpoint to host ID |
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(java.lang.String table,
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(java.lang.String table,
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. |
double |
getLoad()
raw 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.lang.String |
getLocalHostId()
Retrieve this hosts unique ID |
Range<Token> |
getLocalPrimaryRange()
Deprecated. |
java.util.Collection<Range<Token>> |
getLocalPrimaryRanges()
|
java.util.Collection<Range<Token>> |
getLocalRanges(java.lang.String table)
|
java.util.Collection<Token> |
getLocalTokens()
|
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 table,
java.nio.ByteBuffer key)
|
java.util.List<java.net.InetAddress> |
getNaturalEndpoints(java.lang.String table,
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 table,
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.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.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.List<java.lang.String> |
getPrimaryRange()
Returns the local node's primary range. |
Range<Token> |
getPrimaryRangeForEndpoint(java.net.InetAddress ep)
Deprecated. |
java.util.Collection<Range<Token>> |
getPrimaryRangesForEndpoint(java.net.InetAddress ep)
Get the primary ranges for the specified endpoint. |
java.util.Map<Range<Token>,java.util.List<java.net.InetAddress>> |
getRangeToAddressMap(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.List<Pair<Range<Token>,java.lang.Long>> |
getSplits(java.lang.String table,
java.lang.String cfName,
Range<Token> range,
int keysPerSplit)
|
int |
getStreamThroughputMbPerSec()
|
java.net.InetAddress |
getSuccessor(Token token)
|
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. |
double |
getTracingProbability()
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(java.lang.String tableName,
java.lang.String... cfNames)
|
void |
gossipSnitchInfo()
|
void |
initClient()
|
void |
initClient(int delay)
|
void |
initServer()
|
void |
initServer(int delay)
|
boolean |
isBootstrapMode()
|
boolean |
isClientMode()
|
boolean |
isIncrementalBackupsEnabled()
|
boolean |
isInitialized()
|
boolean |
isJoined()
|
boolean |
isNativeTransportRunning()
|
boolean |
isRPCServerRunning()
|
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. |
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 |
register(IEndpointLifecycleSubscriber subscriber)
|
void |
registerDaemon(CassandraDaemon daemon)
|
void |
relocate(java.util.Collection<java.lang.String> srcTokens)
|
void |
removeNode(java.lang.String hostIdString)
Remove a node that has died, attempting to restore the replica count. |
boolean |
reportSeverity(double incr)
Gossip about the known severity of the events in this node |
void |
requestGC()
|
void |
rescheduleFailedDeletions()
|
void |
resetLocalSchema()
|
java.util.List<java.lang.String> |
sampleKeyRange()
#Return a List of Tokens representing a sample of keys across all ColumnFamilyStores. |
void |
scrub(java.lang.String tableName,
java.lang.String... columnFamilies)
Scrub (deserialize + reserialize at the latest version, skipping bad rows if any) the given keyspace. |
void |
setCompactionThroughputMbPerSec(int value)
|
void |
setIncrementalBackupsEnabled(boolean value)
|
void |
setLog4jLevel(java.lang.String classQualifier,
java.lang.String rawLevel)
set the logging level at runtime |
void |
setStreamThroughputMbPerSec(int value)
|
void |
setTokens(java.util.Collection<Token> tokens)
This method updates the local token on disk |
void |
setTraceProbability(double probability)
Enables/Disables tracing for the whole system. |
void |
startGossiping()
|
void |
startNativeTransport()
|
void |
startRPCServer()
|
void |
stopClient()
|
void |
stopGossiping()
|
void |
stopNativeTransport()
|
void |
stopRPCServer()
|
void |
takeColumnFamilySnapshot(java.lang.String tableName,
java.lang.String columnFamilyName,
java.lang.String tag)
Takes the snapshot of a specific column family. |
void |
takeSnapshot(java.lang.String tag,
java.lang.String... tableNames)
Takes the snapshot for the given tables. |
void |
truncate(java.lang.String keyspace,
java.lang.String columnFamily)
Truncates (deletes) the given columnFamily from the provided keyspace. |
void |
unregister(IEndpointLifecycleSubscriber subscriber)
|
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 |
upgradeSSTables(java.lang.String tableName,
java.lang.String... columnFamilies)
Rewrite all sstables to the latest version. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int RING_DELAY
public static final DebuggableScheduledThreadPoolExecutor scheduledTasks
public static final DebuggableScheduledThreadPoolExecutor tasks
public static final DebuggableScheduledThreadPoolExecutor optionalTasks
public VersionedValue.VersionedValueFactory valueFactory
public static final StorageService instance
| Constructor Detail |
|---|
public StorageService()
| Method Detail |
|---|
public static IPartitioner getPartitioner()
public java.util.Collection<Range<Token>> getLocalRanges(java.lang.String table)
public java.util.Collection<Range<Token>> getLocalPrimaryRanges()
@Deprecated public Range<Token> getLocalPrimaryRange()
public java.util.List<java.lang.String> getPrimaryRange()
StorageServiceMBean
getPrimaryRange in interface StorageServiceMBeanpublic void finishBootstrapping()
public void setTokens(java.util.Collection<Token> tokens)
public void registerDaemon(CassandraDaemon daemon)
public void register(IEndpointLifecycleSubscriber subscriber)
public void unregister(IEndpointLifecycleSubscriber subscriber)
public void stopGossiping()
stopGossiping in interface StorageServiceMBeanpublic void startGossiping()
startGossiping in interface StorageServiceMBeanpublic void startRPCServer()
startRPCServer in interface StorageServiceMBeanpublic void stopRPCServer()
stopRPCServer in interface StorageServiceMBeanpublic boolean isRPCServerRunning()
isRPCServerRunning in interface StorageServiceMBeanpublic void startNativeTransport()
startNativeTransport in interface StorageServiceMBeanpublic void stopNativeTransport()
stopNativeTransport in interface StorageServiceMBeanpublic boolean isNativeTransportRunning()
isNativeTransportRunning in interface StorageServiceMBeanpublic void stopClient()
public boolean isInitialized()
isInitialized in interface StorageServiceMBean
public void initClient()
throws java.io.IOException,
ConfigurationException
java.io.IOException
ConfigurationException
public void initClient(int delay)
throws java.io.IOException,
ConfigurationException
java.io.IOException
ConfigurationException
public void initServer()
throws ConfigurationException
ConfigurationException
public void initServer(int delay)
throws ConfigurationException
ConfigurationExceptionpublic void gossipSnitchInfo()
public void joinRing()
throws java.io.IOException
joinRing in interface StorageServiceMBeanjava.io.IOExceptionpublic boolean isJoined()
isJoined in interface StorageServiceMBeanpublic void rebuild(java.lang.String sourceDc)
StorageServiceMBean
rebuild in interface StorageServiceMBeansourceDc - Name of DC from which to select sources for streaming or null to pick any nodepublic void setStreamThroughputMbPerSec(int value)
setStreamThroughputMbPerSec in interface StorageServiceMBeanpublic int getStreamThroughputMbPerSec()
getStreamThroughputMbPerSec in interface StorageServiceMBeanpublic int getCompactionThroughputMbPerSec()
getCompactionThroughputMbPerSec in interface StorageServiceMBeanpublic void setCompactionThroughputMbPerSec(int value)
setCompactionThroughputMbPerSec in interface StorageServiceMBeanpublic boolean isIncrementalBackupsEnabled()
isIncrementalBackupsEnabled in interface StorageServiceMBeanpublic void setIncrementalBackupsEnabled(boolean value)
setIncrementalBackupsEnabled in interface StorageServiceMBeanpublic boolean isBootstrapMode()
public TokenMetadata getTokenMetadata()
public boolean reportSeverity(double incr)
public double getSeverity(java.net.InetAddress endpoint)
public java.util.Map<java.util.List<java.lang.String>,java.util.List<java.lang.String>> getRangeToEndpointMap(java.lang.String keyspace)
getRangeToEndpointMap in interface StorageServiceMBeankeyspace -
public java.lang.String getRpcaddress(java.net.InetAddress endpoint)
endpoint - The endpoint to get rpc address for
public java.util.Map<java.util.List<java.lang.String>,java.util.List<java.lang.String>> getRangeToRpcaddressMap(java.lang.String keyspace)
getRangeToRpcaddressMap in interface StorageServiceMBeankeyspace -
public java.util.Map<java.util.List<java.lang.String>,java.util.List<java.lang.String>> getPendingRangeToEndpointMap(java.lang.String keyspace)
StorageServiceMBean
getPendingRangeToEndpointMap in interface StorageServiceMBeankeyspace - the keyspace to get the pending range map for.
public java.util.Map<Range<Token>,java.util.List<java.net.InetAddress>> getRangeToAddressMap(java.lang.String keyspace)
public java.util.List<java.lang.String> describeRingJMX(java.lang.String keyspace)
throws java.io.IOException
describeRing(String) but converts TokenRange to the String for JMX compatibility
describeRingJMX in interface StorageServiceMBeankeyspace - The keyspace to fetch information about
java.io.IOException
public java.util.List<TokenRange> describeRing(java.lang.String keyspace)
throws InvalidRequestException
keyspace - The keyspace to fetch information about
InvalidRequestException - if there is no ring information available about keyspacepublic java.util.Map<java.lang.String,java.lang.String> getTokenToEndpointMap()
StorageServiceMBean
getTokenToEndpointMap in interface StorageServiceMBeanpublic java.lang.String getLocalHostId()
StorageServiceMBean
getLocalHostId in interface StorageServiceMBeanpublic java.util.Map<java.lang.String,java.lang.String> getHostIdMap()
StorageServiceMBean
getHostIdMap in interface StorageServiceMBean
public void onChange(java.net.InetAddress endpoint,
ApplicationState state,
VersionedValue value)
onChange in interface IEndpointStateChangeSubscriber
protected void addExpireTimeIfFound(java.net.InetAddress endpoint,
long expireTime)
protected long extractExpireTime(java.lang.String[] pieces,
int version)
public static void calculatePendingRanges(AbstractReplicationStrategy strategy,
java.lang.String table)
public void onJoin(java.net.InetAddress endpoint,
EndpointState epState)
IEndpointStateChangeSubscriber
onJoin in interface IEndpointStateChangeSubscriberendpoint - endpoint for which the state change occurred.epState - state that actually changed for the above endpoint.
public void onAlive(java.net.InetAddress endpoint,
EndpointState state)
onAlive in interface IEndpointStateChangeSubscriberpublic void onRemove(java.net.InetAddress endpoint)
onRemove in interface IEndpointStateChangeSubscriber
public void onDead(java.net.InetAddress endpoint,
EndpointState state)
onDead in interface IEndpointStateChangeSubscriber
public void onRestart(java.net.InetAddress endpoint,
EndpointState state)
IEndpointStateChangeSubscriberstate.isAlive() == false
as state is from before the restarted node is marked up.
onRestart in interface IEndpointStateChangeSubscriberpublic double getLoad()
getLoad in interface StorageServiceMBeanStorageMetrics.loadpublic java.lang.String getLoadString()
StorageServiceMBean
getLoadString in interface StorageServiceMBeanpublic java.util.Map<java.lang.String,java.lang.String> getLoadMap()
StorageServiceMBean
getLoadMap in interface StorageServiceMBean
public final void deliverHints(java.lang.String host)
throws java.net.UnknownHostException
java.net.UnknownHostExceptionpublic java.util.Collection<Token> getLocalTokens()
public java.util.List<java.lang.String> getTokens()
StorageServiceMBean
getTokens in interface StorageServiceMBean
public java.util.List<java.lang.String> getTokens(java.lang.String endpoint)
throws java.net.UnknownHostException
StorageServiceMBean
getTokens in interface StorageServiceMBeanendpoint - string representation of an node
java.net.UnknownHostExceptionpublic java.lang.String getReleaseVersion()
StorageServiceMBean
getReleaseVersion in interface StorageServiceMBeanpublic java.lang.String getSchemaVersion()
StorageServiceMBean
getSchemaVersion in interface StorageServiceMBeanpublic java.util.List<java.lang.String> getLeavingNodes()
StorageServiceMBean
getLeavingNodes in interface StorageServiceMBeanpublic java.util.List<java.lang.String> getMovingNodes()
StorageServiceMBean
getMovingNodes in interface StorageServiceMBeanpublic java.util.List<java.lang.String> getJoiningNodes()
StorageServiceMBean
getJoiningNodes in interface StorageServiceMBeanpublic java.util.List<java.lang.String> getLiveNodes()
StorageServiceMBean
getLiveNodes in interface StorageServiceMBeanpublic java.util.List<java.lang.String> getUnreachableNodes()
StorageServiceMBean
getUnreachableNodes in interface StorageServiceMBeanpublic java.lang.String[] getAllDataFileLocations()
StorageServiceMBean
getAllDataFileLocations in interface StorageServiceMBeanpublic java.lang.String getCommitLogLocation()
StorageServiceMBean
getCommitLogLocation in interface StorageServiceMBeanpublic java.lang.String getSavedCachesLocation()
StorageServiceMBean
getSavedCachesLocation in interface StorageServiceMBeanpublic int getCurrentGenerationNumber()
StorageServiceMBean
getCurrentGenerationNumber in interface StorageServiceMBean
public void forceTableCleanup(java.lang.String tableName,
java.lang.String... columnFamilies)
throws java.io.IOException,
java.util.concurrent.ExecutionException,
java.lang.InterruptedException
StorageServiceMBean
forceTableCleanup in interface StorageServiceMBeanjava.io.IOException
java.util.concurrent.ExecutionException
java.lang.InterruptedException
public void scrub(java.lang.String tableName,
java.lang.String... columnFamilies)
throws java.io.IOException,
java.util.concurrent.ExecutionException,
java.lang.InterruptedException
StorageServiceMBean
scrub in interface StorageServiceMBeanjava.io.IOException
java.util.concurrent.ExecutionException
java.lang.InterruptedException
public void upgradeSSTables(java.lang.String tableName,
java.lang.String... columnFamilies)
throws java.io.IOException,
java.util.concurrent.ExecutionException,
java.lang.InterruptedException
StorageServiceMBean
upgradeSSTables in interface StorageServiceMBeanjava.io.IOException
java.util.concurrent.ExecutionException
java.lang.InterruptedException
public void forceTableCompaction(java.lang.String tableName,
java.lang.String... columnFamilies)
throws java.io.IOException,
java.util.concurrent.ExecutionException,
java.lang.InterruptedException
StorageServiceMBean
forceTableCompaction in interface StorageServiceMBeanjava.io.IOException
java.util.concurrent.ExecutionException
java.lang.InterruptedException
public void takeSnapshot(java.lang.String tag,
java.lang.String... tableNames)
throws java.io.IOException
takeSnapshot in interface StorageServiceMBeantag - the tag given to the snapshot; may not be null or emptytableNames - the name of the tables to snapshot; empty means "all."
java.io.IOException
public void takeColumnFamilySnapshot(java.lang.String tableName,
java.lang.String columnFamilyName,
java.lang.String tag)
throws java.io.IOException
takeColumnFamilySnapshot in interface StorageServiceMBeantableName - the keyspace which holds the specified column familycolumnFamilyName - the column family to snapshottag - the tag given to the snapshot; may not be null or empty
java.io.IOException
public void clearSnapshot(java.lang.String tag,
java.lang.String... tableNames)
throws java.io.IOException
clearSnapshot in interface StorageServiceMBeanjava.io.IOException
public java.lang.Iterable<ColumnFamilyStore> getValidColumnFamilies(java.lang.String tableName,
java.lang.String... cfNames)
throws java.io.IOException
java.io.IOException
public void forceTableFlush(java.lang.String tableName,
java.lang.String... columnFamilies)
throws java.io.IOException,
java.util.concurrent.ExecutionException,
java.lang.InterruptedException
forceTableFlush in interface StorageServiceMBeantableName - columnFamilies -
java.io.IOException
java.util.concurrent.ExecutionException
java.lang.InterruptedException
public void forceTableRepair(java.lang.String tableName,
boolean isSequential,
boolean isLocal,
java.lang.String... columnFamilies)
throws java.io.IOException
forceTableRepair in interface StorageServiceMBeantableName - columnFamilies -
java.io.IOException
public void forceTableRepairPrimaryRange(java.lang.String tableName,
boolean isSequential,
boolean isLocal,
java.lang.String... columnFamilies)
throws java.io.IOException
StorageServiceMBean
forceTableRepairPrimaryRange in interface StorageServiceMBeanjava.io.IOException
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
StorageServiceMBean
forceTableRepairRange in interface StorageServiceMBeanjava.io.IOException
public void forceTableRepairRange(java.lang.String tableName,
java.util.Collection<Range<Token>> ranges,
boolean isSequential,
boolean isLocal,
java.lang.String... columnFamilies)
throws java.io.IOException
java.io.IOException
public AntiEntropyService.RepairFuture forceTableRepair(Range<Token> range,
java.lang.String tableName,
boolean isSequential,
boolean isLocal,
java.lang.String... columnFamilies)
throws java.io.IOException
java.io.IOExceptionpublic void forceTerminateAllRepairSessions()
forceTerminateAllRepairSessions in interface StorageServiceMBeanpublic java.net.InetAddress getSuccessor(Token token)
public java.util.Collection<Range<Token>> getPrimaryRangesForEndpoint(java.net.InetAddress ep)
ep - endpoint we are interested in.
@Deprecated public Range<Token> getPrimaryRangeForEndpoint(java.net.InetAddress ep)
ep - endpoint we are interested in.
public java.util.List<Range<Token>> getAllRanges(java.util.List<Token> sortedTokens)
public java.util.List<java.net.InetAddress> getNaturalEndpoints(java.lang.String table,
java.lang.String cf,
java.lang.String key)
getNaturalEndpoints in interface StorageServiceMBeantable - keyspace name also known as tablecf - Column family namekey - key for which we need to find the endpoint
public java.util.List<java.net.InetAddress> getNaturalEndpoints(java.lang.String table,
java.nio.ByteBuffer key)
getNaturalEndpoints in interface StorageServiceMBean
public java.util.List<java.net.InetAddress> getNaturalEndpoints(java.lang.String table,
RingPosition pos)
table - keyspace name also known as tablepos - position for which we need to find the endpoint
public java.util.List<java.net.InetAddress> getLiveNaturalEndpoints(java.lang.String table,
java.nio.ByteBuffer key)
table - keyspace name also known as tablekey - key for which we need to find the endpoint
public java.util.List<java.net.InetAddress> getLiveNaturalEndpoints(java.lang.String table,
RingPosition pos)
public void setLog4jLevel(java.lang.String classQualifier,
java.lang.String rawLevel)
StorageServiceMBean
setLog4jLevel in interface StorageServiceMBean
public java.util.List<Pair<Range<Token>,java.lang.Long>> getSplits(java.lang.String table,
java.lang.String cfName,
Range<Token> range,
int keysPerSplit)
public Token getBootstrapToken()
public void decommission()
throws java.lang.InterruptedException
StorageServiceMBean
decommission in interface StorageServiceMBeanjava.lang.InterruptedException
public void move(java.lang.String newToken)
throws java.io.IOException
move in interface StorageServiceMBeannewToken - token to move this node to.
This node will unload its data onto its neighbors, and bootstrap to the new token.
java.io.IOException
public void relocate(java.util.Collection<java.lang.String> srcTokens)
throws java.io.IOException
relocate in interface StorageServiceMBeansrcTokens - tokens to move to this node
java.io.IOExceptionpublic java.lang.String getRemovalStatus()
getRemovalStatus in interface StorageServiceMBeanpublic void forceRemoveCompletion()
forceRemoveCompletion in interface StorageServiceMBeanpublic void removeNode(java.lang.String hostIdString)
removeNode in interface StorageServiceMBeanhostIdString - token for the nodepublic void confirmReplication(java.net.InetAddress node)
public boolean isClientMode()
public void requestGC()
public java.lang.String getOperationMode()
StorageServiceMBean
getOperationMode in interface StorageServiceMBeanpublic java.lang.String getDrainProgress()
StorageServiceMBean
getDrainProgress in interface StorageServiceMBean
public void drain()
throws java.io.IOException,
java.lang.InterruptedException,
java.util.concurrent.ExecutionException
drain in interface StorageServiceMBeanjava.io.IOException
java.lang.InterruptedException
java.util.concurrent.ExecutionException
public void truncate(java.lang.String keyspace,
java.lang.String columnFamily)
throws java.util.concurrent.TimeoutException,
java.io.IOException
StorageServiceMBean
truncate in interface StorageServiceMBeankeyspace - The keyspace to delete fromcolumnFamily - The column family to delete data from.
java.util.concurrent.TimeoutException
java.io.IOExceptionpublic java.util.Map<java.net.InetAddress,java.lang.Float> getOwnership()
StorageServiceMBean
getOwnership in interface StorageServiceMBean
public java.util.LinkedHashMap<java.net.InetAddress,java.lang.Float> effectiveOwnership(java.lang.String keyspace)
throws java.lang.IllegalStateException
effectiveOwnership in interface StorageServiceMBeanjava.lang.IllegalStateException - when node is not configured properly.public java.util.List<java.lang.String> getKeyspaces()
getKeyspaces in interface StorageServiceMBean
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
StorageServiceMBean
updateSnitch in interface StorageServiceMBeanepSnitchClassName - the canonical path name for a class implementing IEndpointSnitchdynamic - boolean that decides whether dynamicsnitch is used or notdynamicUpdateInterval - integer, in ms (default 100)dynamicResetInterval - integer, in ms (default 600,000)dynamicBadnessThreshold - double, (default 0.0)
java.lang.ClassNotFoundExceptionpublic void flushLargestMemtables()
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)
current - collection of the ranges by current tokenupdated - collection of the ranges after token is changed
public void bulkLoad(java.lang.String directory)
bulkLoad in interface StorageServiceMBeanpublic int getExceptionCount()
getExceptionCount in interface StorageServiceMBeanpublic void rescheduleFailedDeletions()
rescheduleFailedDeletions in interface StorageServiceMBean
public void loadNewSSTables(java.lang.String ksName,
java.lang.String cfName)
loadNewSSTables in interface StorageServiceMBeanksName - The parent keyspace namecfName - The ColumnFamily name where SSTables belongpublic java.util.List<java.lang.String> sampleKeyRange()
sampleKeyRange in interface StorageServiceMBean
public void rebuildSecondaryIndex(java.lang.String ksName,
java.lang.String cfName,
java.lang.String... idxNames)
StorageServiceMBean
rebuildSecondaryIndex in interface StorageServiceMBean
public void resetLocalSchema()
throws java.io.IOException
resetLocalSchema in interface StorageServiceMBeanjava.io.IOExceptionpublic void setTraceProbability(double probability)
StorageServiceMBean
setTraceProbability in interface StorageServiceMBeanprobability - ]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)public double getTracingProbability()
StorageServiceMBean
getTracingProbability in interface StorageServiceMBeanpublic void enableScheduledRangeXfers()
StorageServiceMBean
enableScheduledRangeXfers in interface StorageServiceMBeanpublic void disableScheduledRangeXfers()
StorageServiceMBean
disableScheduledRangeXfers in interface StorageServiceMBean
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||