Package 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.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
StorageService.Mode
-
Nested classes/interfaces inherited from interface org.apache.cassandra.service.StorageServiceMBean
StorageServiceMBean.StageConcurrency
-
-
Field Summary
Fields Modifier and Type Field Description static int
INDEFINITE
static StorageService
instance
static int
RING_DELAY_MILLIS
static int
SCHEMA_DELAY_MILLIS
boolean
skipNotificationListeners
SnapshotManager
snapshotManager
SSTablesGlobalTracker
sstablesTracker
static boolean
useStrictConsistency
VersionedValue.VersionedValueFactory
valueFactory
-
Constructor Summary
Constructors Constructor Description StorageService()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description protected void
addExpireTimeIfFound(InetAddressAndPort endpoint, long expireTime)
void
addNotificationListener(javax.management.NotificationListener listener, javax.management.NotificationFilter filter, java.lang.Object handback)
boolean
addPostShutdownHook(java.lang.Runnable hook)
Add a runnable which will be called after shutdown or drain.boolean
addPreShutdownHook(java.lang.Runnable hook)
Add a runnable which will be called before shut down or drain.void
addSnapshot(TableSnapshot snapshot)
boolean
authSetupCalled()
boolean
autoOptimiseFullRepairStreams()
boolean
autoOptimiseIncRepairStreams()
boolean
autoOptimisePreviewRepairStreams()
Future<?>
autoRepairPaxos(TableId tableId)
void
beforeChange(InetAddressAndPort endpoint, EndpointState currentState, ApplicationState newStateKey, VersionedValue newValue)
boolean
bootstrap(java.util.Collection<Token> tokens, long bootstrapTimeoutMillis)
Bootstrap node by fetching data from other nodes.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.void
bypassConcurrentValidatorsLimit()
void
checkForEndpointCollision(java.util.UUID localHostId, java.util.Set<InetAddressAndPort> peers)
void
cleanupSizeEstimates()
Removes extraneous entries in system.size_estimates.void
clearConnectionHistory()
Clears the history of clients that have connected in the pastvoid
clearPaxosRepairs()
void
clearSnapshot(java.lang.String tag, java.lang.String... keyspaceNames)
Remove the snapshot with the given name from the given keyspaces.void
clearSnapshot(java.util.Map<java.lang.String,java.lang.Object> options, java.lang.String tag, java.lang.String... keyspaceNames)
Remove the snapshot with the given name from the given keyspaces.void
completeInitialization()
void
confirmReplication(InetAddressAndPort node)
void
decommission(boolean force)
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 asdescribeRing(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 asdescribeRing(String)
but converts TokenRange to the String for JMX compatibilityjava.util.List<java.lang.String>
describeRingWithPortJMX(java.lang.String keyspace)
void
disableAuditLog()
void
disableAutoCompaction()
void
disableAutoCompaction(java.lang.String ks, java.lang.String... tables)
void
disableNativeTransportOldProtocolVersions()
void
doAuthSetup(boolean setUpSchema)
void
drain()
Shuts node off to writes, empties memtables and the commit log.protected void
drain(boolean isFinalShutdown)
void
dropPreparedStatements(boolean memoryOnly)
java.util.LinkedHashMap<java.net.InetAddress,java.lang.Float>
effectiveOwnership(java.lang.String keyspace)
Effective ownership is % of the data each node owns given the keyspace we calculate the percentage using replication factor.java.util.LinkedHashMap<java.lang.String,java.lang.Float>
effectiveOwnershipWithPort(java.lang.String keyspace)
void
enableAuditLog(java.lang.String loggerName, java.lang.String includedKeyspaces, java.lang.String excludedKeyspaces, java.lang.String includedCategories, java.lang.String excludedCategories, java.lang.String includedUsers, java.lang.String excludedUsers)
Deprecated.See CASSANDRA-16725void
enableAuditLog(java.lang.String loggerName, java.lang.String includedKeyspaces, java.lang.String excludedKeyspaces, java.lang.String includedCategories, java.lang.String excludedCategories, java.lang.String includedUsers, java.lang.String excludedUsers, java.lang.Integer maxArchiveRetries, java.lang.Boolean block, java.lang.String rollCycle, java.lang.Long maxLogSize, java.lang.Integer maxQueueWeight, java.lang.String archiveCommand)
void
enableAuditLog(java.lang.String loggerName, java.util.Map<java.lang.String,java.lang.String> parameters, java.lang.String includedKeyspaces, java.lang.String excludedKeyspaces, java.lang.String includedCategories, java.lang.String excludedCategories, java.lang.String includedUsers, java.lang.String excludedUsers)
Deprecated.See CASSANDRA-16725void
enableAuditLog(java.lang.String loggerName, java.util.Map<java.lang.String,java.lang.String> parameters, java.lang.String includedKeyspaces, java.lang.String excludedKeyspaces, java.lang.String includedCategories, java.lang.String excludedCategories, java.lang.String includedUsers, java.lang.String excludedUsers, java.lang.Integer maxArchiveRetries, java.lang.Boolean block, java.lang.String rollCycle, java.lang.Long maxLogSize, java.lang.Integer maxQueueWeight, java.lang.String archiveCommand)
void
enableAutoCompaction(java.lang.String ks, java.lang.String... tables)
void
enableFullQueryLogger(java.lang.String path, java.lang.String rollCycle, java.lang.Boolean blocking, int maxQueueWeight, long maxLogSize, java.lang.String archiveCommand, int maxArchiveRetries)
Start the fully query logger.void
enableNativeTransportOldProtocolVersions()
void
enforceConcurrentValidatorsLimit()
void
evictHungRepairs()
protected long
extractExpireTime(java.lang.String[] pieces)
void
finishJoiningRing(boolean didBootstrap, java.util.Collection<Token> tokens)
void
forceCompactionKeysIgnoringGcGrace(java.lang.String keyspaceName, java.lang.String tableName, java.lang.String... partitionKeysIgnoreGcGrace)
Forces compaction for a list of partition keys in a table The method will ignore the gc_grace_seconds for the partitionKeysIgnoreGcGrace during the comapction, in order to purge the tombstones and free up space quicker.int
forceKeyspaceCleanup(int jobs, java.lang.String keyspaceName, java.lang.String... tableNames)
int
forceKeyspaceCleanup(java.lang.String keyspaceName, java.lang.String... tables)
Trigger a cleanup of keys on a single keyspacevoid
forceKeyspaceCompaction(boolean splitOutput, java.lang.String keyspaceName, java.lang.String... tableNames)
Forces major compaction of a single keyspacevoid
forceKeyspaceCompactionForPartitionKey(java.lang.String keyspaceName, java.lang.String partitionKey, java.lang.String... tableNames)
Forces major compactions for the range represented by the partition keyvoid
forceKeyspaceCompactionForTokenRange(java.lang.String keyspaceName, java.lang.String startToken, java.lang.String endToken, java.lang.String... tableNames)
Forces major compaction of specified token range in a single keyspace.void
forceKeyspaceFlush(java.lang.String keyspaceName, java.lang.String... tableNames)
Flush all memtables for a keyspace and column families.void
forceKeyspaceFlush(java.lang.String keyspaceName, ColumnFamilyStore.FlushReason reason)
Flush all memtables for a keyspace and column families.void
forceRemoveCompletion()
Force a remove operation to complete.void
forceTerminateAllRepairSessions()
int
garbageCollect(java.lang.String tombstoneOptionString, int jobs, java.lang.String keyspaceName, java.lang.String... tableNames)
Rewrites all sstables from the given tables to remove deleted data.java.lang.String[]
getAllDataFileLocations()
Get the list of all data file locations from confjava.util.List<Range<Token>>
getAllRanges(java.util.List<Token> sortedTokens)
Get all ranges that span the ring given a set of tokens.java.util.Map<java.lang.String,java.lang.Boolean>
getAutoCompactionStatus(java.lang.String ks, java.lang.String... tables)
int
getBatchlogReplayThrottleInKB()
int
getBatchSizeFailureThreshold()
Returns the threshold for rejecting queries due to a large batch sizeint
getBatchSizeWarnThreshold()
Deprecated.See CASSANDRA-17668int
getBatchSizeWarnThresholdInKiB()
Returns the threshold for warning queries due to a large batch sizejava.lang.String
getBootstrapState()
int
getCachedReplicaRowsFailThreshold()
Returns the number of rows cached at the coordinator before filtering/index queries fail outright.int
getCachedReplicaRowsWarnThreshold()
Returns the number of rows cached at the coordinator before filtering/index queries log a warning.long
getCasContentionTimeout()
java.lang.String
getClusterName()
Returns the name of the clusterint
getColumnIndexCacheSize()
Deprecated.See CASSANDRA-17668int
getColumnIndexCacheSizeInKiB()
Returns the threshold for skipping the column index when caching partition infoint
getColumnIndexSizeInKiB()
Returns the granularity of the collation index of rows within a partition.java.lang.String
getCommitLogLocation()
Get location of the commit logint
getCompactionThroughputMbPerSec()
Deprecated.See CASSANDRA-17225long
getCompactionThroughtputBytesPerSec()
double
getCompactionThroughtputMibPerSecAsDouble()
int
getCompactionTombstoneWarningThreshold()
java.util.Map<java.lang.String,java.util.List<java.lang.Integer>>
getConcurrency(java.util.List<java.lang.String> stageNames)
int
getConcurrentCompactors()
int
getConcurrentIndexBuilders()
int
getConcurrentValidators()
int
getConcurrentViewBuilders()
java.lang.String
getCoordinatorLargeReadAbortThreshold()
java.lang.String
getCoordinatorLargeReadWarnThreshold()
java.lang.String
getCorruptedTombstoneStrategy()
long
getCounterWriteRpcTimeout()
int
getCurrentGenerationNumber()
Return the generation value for this node.int
getDefaultKeyspaceReplicationFactor()
java.lang.String
getDrainProgress()
get the progress of a drain operationint
getDynamicUpdateInterval()
InetAddressAndPort
getEndpointForHostId(java.util.UUID hostId)
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>
getEndpointWithPortToHostId()
boolean
getEnforceNativeDeadlineForHints()
double
getEntireSSTableInterDCStreamThroughputMebibytesPerSecAsDouble()
double
getEntireSSTableStreamThroughputMebibytesPerSecAsDouble()
javax.management.openmbean.CompositeData
getFullQueryLoggerOptions()
Returns the current state of FQL.java.lang.String
getGitSHA()
Fetch a string representation of the Cassandra git SHA.java.util.UUID
getHostIdForEndpoint(InetAddressAndPort address)
java.util.Map<java.lang.String,java.lang.String>
getHostIdMap()
java.util.Map<java.lang.String,java.lang.String>
getHostIdToEndpoint()
Retrieve the mapping of host ID to endpoint.java.util.Map<java.lang.String,java.lang.String>
getHostIdToEndpointWithPort()
int
getInitialRangeTombstoneListAllocationSize()
Returns the initial allocation size of backing arrays for new RangeTombstoneList objectsint
getInterDCStreamThroughputMbitPerSec()
Deprecated.See CASSANDRA-17225double
getInterDCStreamThroughputMbitPerSecAsDouble()
int
getInterDCStreamThroughputMbPerSec()
Deprecated.See CASSANDRA-15234int
getInterDCStreamThroughputMebibytesPerSec()
Below method returns Inter_dc_stream_throughput_outbound rounded, for precise number, please, use getInterDCStreamThroughputMebibytesPerSecAsDoubledouble
getInterDCStreamThroughputMebibytesPerSecAsDouble()
int
getInternodeStreamingTcpUserTimeoutInMS()
int
getInternodeTcpConnectTimeoutInMS()
int
getInternodeTcpUserTimeoutInMS()
java.util.List<java.lang.String>
getJoiningNodes()
Deprecated.See CASSANDRA-7544java.util.List<java.lang.String>
getJoiningNodesWithPort()
DecoratedKey
getKeyFromPartition(java.lang.String keyspaceName, java.lang.String table, java.lang.String partitionKey)
int
getKeyspaceCountWarnThreshold()
Deprecated.See CASSANDRA-17195java.lang.String
getKeyspaceReplicationInfo(java.lang.String keyspaceName)
Fetch the replication factor for a given keyspace.java.util.List<java.lang.String>
getKeyspaces()
java.util.List<java.lang.String>
getLeavingNodes()
Deprecated.See CASSANDRA-7544java.util.List<java.lang.String>
getLeavingNodesWithPort()
java.util.List<java.lang.String>
getLiveNodes()
Deprecated.See CASSANDRA-7544java.util.List<java.lang.String>
getLiveNodesWithPort()
java.util.Set<InetAddressAndPort>
getLiveRingMembers()
java.util.Set<InetAddressAndPort>
getLiveRingMembers(boolean excludeDeadStates)
java.util.Map<java.lang.String,java.lang.String>
getLoadMap()
Human-readable load value.java.util.Map<java.lang.String,java.lang.String>
getLoadMapWithPort()
java.lang.String
getLoadString()
Human-readable load valuejava.util.List<Range<Token>>
getLocalAndPendingRanges(java.lang.String ks)
java.lang.String
getLocalHostId()
Retrieve this hosts unique IDjava.util.UUID
getLocalHostUUID()
java.util.Collection<Range<Token>>
getLocalPrimaryRange()
java.util.Collection<Range<Token>>
getLocalPrimaryRangeForEndpoint(InetAddressAndPort referenceEndpoint)
java.util.List<Range<Token>>
getLocalRanges(java.lang.String ks)
java.lang.String
getLocalReadTooLargeAbortThreshold()
java.lang.String
getLocalReadTooLargeWarnThreshold()
RangesAtEndpoint
getLocalReplicas(java.lang.String keyspaceName)
java.lang.String[]
getLocalSystemKeyspacesDataFileLocations()
Returns the locations where the local system keyspaces data should be stored.java.util.Collection<Token>
getLocalTokens()
java.util.Map<java.lang.String,java.lang.String>
getLoggingLevels()
get the runtime logging levelsint
getMaxTopSizePartitionCount()
int
getMaxTopTombstonePartitionCount()
boolean
getMigrateKeycacheOnCompaction()
java.lang.String
getMinTrackedPartitionSize()
long
getMinTrackedPartitionTombstoneCount()
java.util.List<java.lang.String>
getMovingNodes()
Deprecated.See CASSANDRA-7544java.util.List<java.lang.String>
getMovingNodesWithPort()
java.lang.String
getNativeaddress(InetAddressAndPort endpoint, boolean withPort)
Return the native address associated with an endpoint as a string.long
getNativeTransportMaxBackoffOnQueueOverloadInMillis()
long
getNativeTransportMaxConcurrentRequestsInBytes()
long
getNativeTransportMaxConcurrentRequestsInBytesPerIp()
int
getNativeTransportMaxRequestsPerSecond()
long
getNativeTransportMinBackoffOnQueueOverloadInMillis()
double
getNativeTransportQueueMaxItemAgeThreshold()
boolean
getNativeTransportRateLimitingEnabled()
boolean
getNativeTransportThrowOnOverload()
long
getNativeTransportTimeoutMillis()
java.util.List<java.net.InetAddress>
getNaturalEndpoints(java.lang.String keyspaceName, java.lang.String cf, java.lang.String key)
Deprecated.See CASSANDRA-7544java.util.List<java.net.InetAddress>
getNaturalEndpoints(java.lang.String keyspaceName, java.nio.ByteBuffer key)
Deprecated.See CASSANDRA-7544java.util.List<java.lang.String>
getNaturalEndpointsWithPort(java.lang.String keyspaceName, java.lang.String cf, java.lang.String key)
java.util.List<java.lang.String>
getNaturalEndpointsWithPort(java.lang.String keyspaceName, java.nio.ByteBuffer key)
EndpointsForToken
getNaturalReplicasForToken(java.lang.String keyspaceName, java.lang.String cf, java.lang.String key)
EndpointsForToken
getNaturalReplicasForToken(java.lang.String keyspaceName, java.nio.ByteBuffer key)
java.util.List<java.lang.String>
getNonLocalStrategyKeyspaces()
java.lang.String[]
getNonLocalSystemKeyspacesDataFileLocations()
Returns the locations where should be stored the non system keyspaces data.java.util.List<java.lang.String>
getNonSystemKeyspaces()
OwnedRanges
getNormalizedLocalRanges(java.lang.String keyspaceName)
OwnedRanges
getNormalizedRanges(java.lang.String keyspaceName, InetAddressAndPort ep)
java.lang.String
getOperationMode()
get the operational mode (leaving, joining, normal, decommissioned, client)java.util.Map<java.lang.String,long[]>
getOutOfRangeOperationCounts()
Get the per-keyspace counts of operations that the node has received for tokens outside its owned ranges.java.util.Map<java.lang.String,java.util.Set<java.net.InetAddress>>
getOutstandingSchemaVersions()
Returns a map of schema version -> list of endpoints reporting that version that we need schema updates forjava.util.Map<java.lang.String,java.util.Set<java.lang.String>>
getOutstandingSchemaVersionsWithPort()
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"
java.util.Map<java.lang.String,java.lang.Float>
getOwnershipWithPort()
java.util.List<java.lang.String>
getParentRepairStatus(int cmd)
Get the status of a given parent repair session.java.lang.String
getPartitionerName()
Returns the cluster partitionerboolean
getPaxosAutoRepairsEnabled()
java.util.List<java.lang.String>
getPaxosAutoRepairTables()
java.lang.String
getPaxosBallotLowBound(java.lang.String ksName, java.lang.String tblName, java.lang.String key)
boolean
getPaxosDcLocalCommitEnabled()
java.lang.String
getPaxosOnLinearizabilityViolations()
long
getPaxosPurgeGraceSeconds()
boolean
getPaxosRepairEnabled()
boolean
getPaxosStateFlushEnabled()
java.lang.String
getPaxosStatePurging()
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 topologyjava.util.Map<java.util.List<java.lang.String>,java.util.List<java.lang.String>>
getPendingRangeToEndpointWithPortMap(java.lang.String keyspace)
java.util.List<Pair<java.lang.String,java.lang.String>>
getPreparedStatements()
java.util.Collection<Range<Token>>
getPrimaryRangeForEndpointWithinDC(java.lang.String keyspace, InetAddressAndPort 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, InetAddressAndPort ep)
Get the "primary ranges" for the specified keyspace and endpoint.java.util.Collection<Range<Token>>
getPrimaryRangesWithinDC(java.lang.String keyspace)
long
getRangeRpcTimeout()
EndpointsByRange
getRangeToAddressMap(java.lang.String keyspace)
EndpointsByRange
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)
Retrieve a map of range to end points that describe the ring topology of a Cassandra cluster.java.util.Map<java.util.List<java.lang.String>,java.util.List<java.lang.String>>
getRangeToEndpointMap(java.lang.String keyspace, boolean withPort)
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>>
getRangeToEndpointWithPortMap(java.lang.String keyspace)
double
getRangeTombstoneResizeListGrowthFactor()
Returns the resize factor to use when growing/resizing a RangeTombstoneListjava.util.Map<java.util.List<java.lang.String>,java.util.List<java.lang.String>>
getRangeToNativeaddressWithPortMap(java.lang.String keyspace)
java.util.Map<java.util.List<java.lang.String>,java.util.List<java.lang.String>>
getRangeToRpcaddressMap(java.lang.String keyspace)
Retrieve a map of range to rpc addresses that describe the ring topology of a Cassandra cluster.long
getReadRpcTimeout()
boolean
getReadThresholdsEnabled()
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
getRemovalStatusWithPort()
java.lang.Long
getRepairRpcTimeout()
int
getRepairSessionMaximumTreeDepth()
int
getRepairSessionMaxTreeDepth()
Deprecated.See CASSANDRA-17668RangesAtEndpoint
getReplicas(java.lang.String keyspaceName, InetAddressAndPort endpoint)
java.lang.String
getRowIndexReadSizeAbortThreshold()
java.lang.String
getRowIndexReadSizeWarnThreshold()
long
getRpcTimeout()
java.util.List<java.lang.String>
getSampleTasks()
java.lang.String
getSavedCachesLocation()
Get location of the saved caches dirjava.lang.String
getSchemaVersion()
Fetch a string representation of the current Schema version.boolean
getSkipPaxosRepairCompatibilityCheck()
boolean
getSkipPaxosRepairOnTopologyChange()
java.lang.String
getSkipPaxosRepairOnTopologyChangeKeyspaces()
boolean
getSkipStreamDiskSpaceCheck()
java.util.Map<java.lang.String,javax.management.openmbean.TabularData>
getSnapshotDetails()
Deprecated.See CASSANDRA-16789java.util.Map<java.lang.String,javax.management.openmbean.TabularData>
getSnapshotDetails(java.util.Map<java.lang.String,java.lang.String> options)
Get the details of all the snapshotslong
getSnapshotLinksPerSecond()
Get the current hardlink-per-second throttle for snapshots A setting of zero indicates no throttling.java.util.List<Pair<Range<Token>,java.lang.Long>>
getSplits(java.lang.String keyspaceName, java.lang.String cfName, Range<Token> range, int keysPerSplit)
int
getSSTablePreemptiveOpenIntervalInMB()
This method can return negative number for disabledint
getStreamThroughputMbitPerSec()
Deprecated.See CASSANDRA-17225double
getStreamThroughputMbitPerSecAsDouble()
int
getStreamThroughputMbPerSec()
Deprecated.See CASSANDRA-15234int
getStreamThroughputMebibytesPerSec()
Below method returns stream_throughput_outbound rounded, for precise number, please, use getStreamThroughputMebibytesPerSecAsDoubledouble
getStreamThroughputMebibytesPerSecAsDouble()
int
getTableCountWarnThreshold()
Deprecated.See CASSANDRA-17195java.lang.String
getToken(java.lang.String keyspaceName, java.lang.String table, java.lang.String key)
Token.TokenFactory
getTokenFactory()
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.java.util.Map<java.lang.String,java.lang.String>
getTokenToEndpointWithPortMap()
int
getTombstoneFailureThreshold()
Returns the threshold for abandoning queries with many tombstonesint
getTombstoneWarnThreshold()
Returns the threshold for warning of queries with many tombstonesdouble
getTraceProbability()
Returns the configured tracing probability.boolean
getTransferHintsOnDecommission()
long
getTruncateRpcTimeout()
java.lang.String
getUncompressedLoadString()
Human-readable uncompressed load valuejava.util.List<java.lang.String>
getUnreachableNodes()
Deprecated.See CASSANDRA-7544java.util.List<java.lang.String>
getUnreachableNodesWithPort()
java.lang.Iterable<ColumnFamilyStore>
getValidColumnFamilies(boolean allowIndexes, boolean autoAddIndexes, java.lang.String keyspaceName, java.lang.String... cfNames)
java.util.Map<java.lang.String,java.lang.String>
getViewBuildStatuses(java.lang.String keyspace, java.lang.String view)
java.util.Map<java.lang.String,java.lang.String>
getViewBuildStatuses(java.lang.String keyspace, java.lang.String view, boolean withPort)
java.util.Map<java.lang.String,java.lang.String>
getViewBuildStatusesWithPort(java.lang.String keyspace, java.lang.String view)
long
getWriteRpcTimeout()
void
gossipSnitchInfo()
boolean
hasJoined()
void
incOutOfRangeOperationCount()
void
initServer()
void
initServer(int schemaAndRingDelayMillis)
void
initServer(int schemaTimeoutMillis, int ringTimeoutMillis)
boolean
isAuditLogEnabled()
boolean
isAuthSetupComplete()
boolean
isBootstrapFailed()
Returns whether a node has failed to bootstrap.boolean
isBootstrapMode()
Check if currently bootstrapping.boolean
isConcurrentValidatorsLimitEnforced()
boolean
isDaemonSetupCompleted()
boolean
isDecommissioned()
boolean
isDecommissionFailed()
Returns whether a node has failed to decommission.boolean
isDecommissioning()
Returns whether a node is being decommissioned or not.boolean
isDrained()
boolean
isDraining()
boolean
isEndpointValidForWrite(java.lang.String keyspace, Token token)
boolean
isFullQueryLogEnabled()
boolean
isGossipActive()
boolean
isGossipRunning()
boolean
isIncrementalBackupsEnabled()
boolean
isInitialized()
boolean
isInShutdownHook()
Deprecated.See CASSANDRA-12509boolean
isJoined()
boolean
isJoining()
boolean
isMoving()
boolean
isNativeTransportRunning()
boolean
isNormal()
boolean
isOutOfTokenRangeRequestLoggingEnabled()
Toggles to turn on the logging or rejection of operations for token ranges that the node does not own, or is not about to acquire.boolean
isOutOfTokenRangeRequestRejectionEnabled()
boolean
isReplacing()
static boolean
isReplacingSameAddress()
boolean
isReplacingSameHostAddressAndHostId(java.util.UUID hostId)
boolean
isRpcReady(InetAddressAndPort endpoint)
static boolean
isSeed()
boolean
isShutdown()
boolean
isStarting()
Returns whether the storage service is starting or notboolean
isSurveyMode()
void
joinRing()
void
joinTokenRing(boolean finishJoiningRing, boolean shouldBootstrap, long schemaTimeoutMillis, long bootstrapTimeoutMillis, long ringTimeoutMillis)
void
loadNewSSTables(java.lang.String ksName, java.lang.String cfName)
Deprecated.See CASSANDRA-14417void
move(java.lang.String newToken)
void
onAlive(InetAddressAndPort endpoint, EndpointState state)
void
onChange(InetAddressAndPort endpoint, ApplicationState state, VersionedValue value)
void
onDead(InetAddressAndPort endpoint, EndpointState state)
void
onJoin(InetAddressAndPort endpoint, EndpointState epState)
Use to inform interested parties about the change in the state for specified endpointvoid
onRemove(InetAddressAndPort endpoint)
void
onRestart(InetAddressAndPort endpoint, EndpointState state)
Called whenever a node is restarted.void
populateTokenMetadata()
java.util.Collection<InetAddressAndPort>
prepareForBootstrap(long schemaTimeoutMillis, long ringTimeoutMillis)
java.util.function.Supplier<Future<StreamState>>
prepareUnbootstrapStreaming()
void
rebuild(java.lang.String sourceDc)
Initiate a process of streaming data for which we are responsible from other nodes.void
rebuild(java.lang.String sourceDc, java.lang.String keyspace, java.lang.String tokens, java.lang.String specificSources)
Same asStorageServiceMBean.rebuild(String)
, but only for specified keyspace and ranges.void
rebuild(java.lang.String sourceDc, java.lang.String keyspace, java.lang.String tokens, java.lang.String specificSources, boolean excludeLocalDatacenterNodes)
Same asStorageServiceMBean.rebuild(String)
, but only for specified keyspace and ranges.void
rebuildSecondaryIndex(java.lang.String ksName, java.lang.String cfName, java.lang.String... idxNames)
rebuild the specified indexesint
recompressSSTables(java.lang.String keyspaceName, int jobs, java.lang.String... tableNames)
void
refreshSizeEstimates()
Forces refresh of values stored in system.size_estimates of all column families.void
register(IEndpointLifecycleSubscriber subscriber)
void
registerDaemon(CassandraDaemon daemon)
void
reloadLocalSchema()
int
relocateSSTables(int jobs, java.lang.String keyspaceName, java.lang.String... tableNames)
int
relocateSSTables(java.lang.String keyspaceName, java.lang.String... tableNames)
void
removeNode(java.lang.String hostIdString)
Remove a node that has died, attempting to restore the replica count.void
removeNotificationListener(javax.management.NotificationListener listener)
void
removeNotificationListener(javax.management.NotificationListener listener, javax.management.NotificationFilter filter, java.lang.Object handback)
boolean
removePostShutdownHook(java.lang.Runnable hook)
Remove a postshutdownhookboolean
removePreShutdownHook(java.lang.Runnable hook)
Remove a preshutdown hookvoid
removeShutdownHook()
In the event of forceful termination we need to remove the shutdown hook to prevent hanging (OOM for instance)Pair<java.lang.Integer,Future<?>>
repair(java.lang.String keyspace, java.util.Map<java.lang.String,java.lang.String> repairSpec, java.util.List<ProgressListener> listeners)
Pair<java.lang.Integer,Future<?>>
repair(java.lang.String keyspace, RepairOption option, java.util.List<ProgressListener> listeners)
int
repairAsync(java.lang.String keyspace, java.util.Map<java.lang.String,java.lang.String> repairSpec)
Invoke repair asynchronously.void
rescheduleFailedDeletions()
void
resetFullQueryLogger()
Disable the full query logger if it is enabled.void
resetLocalSchema()
boolean
resumeBootstrap()
Resume bootstrap streaming when there is failed data streaming.int
rewriteSSTables(java.lang.String keyspaceName, boolean skipIfCurrentVersion, long skipIfNewerThanTimestamp, boolean skipIfCompressionMatches, int jobs, java.lang.String... tableNames)
java.util.List<java.lang.String>
sampleKeyRange()
#Return a List of Tokens representing a sample of keys across all ColumnFamilyStores.java.util.Map<java.lang.String,java.util.List<javax.management.openmbean.CompositeData>>
samplePartitions(int duration, int capacity, int count, java.util.List<java.lang.String> samplers)
java.util.Map<java.lang.String,java.util.List<javax.management.openmbean.CompositeData>>
samplePartitions(java.lang.String keyspace, int durationMillis, int capacity, int count, java.util.List<java.lang.String> samplers)
int
scrub(boolean disableSnapshot, boolean skipCorrupted, boolean checkData, boolean reinsertOverflowedTTL, int jobs, java.lang.String keyspaceName, java.lang.String... tableNames)
int
scrub(boolean disableSnapshot, IScrubber.Options options, int jobs, java.lang.String keyspaceName, java.lang.String... tableNames)
void
setAutoOptimiseFullRepairStreams(boolean enabled)
void
setAutoOptimiseIncRepairStreams(boolean enabled)
void
setAutoOptimisePreviewRepairStreams(boolean enabled)
void
setBatchlogReplayThrottleInKB(int throttleInKB)
void
setBatchSizeFailureThreshold(int threshold)
Sets the threshold for rejecting queries due to a large batch sizevoid
setBatchSizeWarnThreshold(int threshold)
Deprecated.See CASSANDRA-17668void
setBatchSizeWarnThresholdInKiB(int thresholdInKiB)
Sets the threshold for warning queries due to a large batch sizevoid
setCachedReplicaRowsFailThreshold(int threshold)
Sets the number of rows cached at the coordinator before filtering/index queries fail outright.void
setCachedReplicaRowsWarnThreshold(int threshold)
Sets the number of rows cached at the coordinator before filtering/index queries log a warning.void
setCasContentionTimeout(long value)
void
setColumnIndexCacheSize(int cacheSizeInKB)
Deprecated.See CASSANDRA-17668void
setColumnIndexCacheSizeInKiB(int cacheSizeInKiB)
Sets the threshold for skipping the column index when caching partition infovoid
setColumnIndexSize(int columnIndexSizeInKB)
Deprecated.See CASSANDRA-17668void
setColumnIndexSizeInKiB(int columnIndexSizeInKiB)
Sets the granularity of the collation index of rows within a partition.void
setCompactionThroughputMbPerSec(int value)
void
setCompactionTombstoneWarningThreshold(int count)
void
setConcurrency(java.lang.String threadPoolName, int newCorePoolSize, int newMaximumPoolSize)
Sets the concurrency setting for processing stagesvoid
setConcurrentCompactors(int value)
void
setConcurrentIndexBuilders(int value)
void
setConcurrentValidators(int value)
void
setConcurrentViewBuilders(int value)
void
setCoordinatorLargeReadAbortThreshold(java.lang.String threshold)
void
setCoordinatorLargeReadWarnThreshold(java.lang.String threshold)
void
setCorruptedTombstoneStrategy(java.lang.String strategy)
void
setCounterWriteRpcTimeout(long value)
void
setDefaultKeyspaceReplicationFactor(int value)
void
setDynamicUpdateInterval(int dynamicUpdateInterval)
void
setEnforceNativeDeadlineForHints(boolean value)
void
setEntireSSTableInterDCStreamThroughputMebibytesPerSec(int value)
void
setEntireSSTableStreamThroughputMebibytesPerSec(int value)
void
setGossipTokens(java.util.Collection<Token> tokens)
void
setHintedHandoffThrottleInKB(int throttleInKB)
Sets the hinted handoff throttle in KiB per second, per delivery thread.void
setIncrementalBackupsEnabled(boolean value)
void
setInitialRangeTombstoneListAllocationSize(int size)
Sets the initial allocation size of backing arrays for new RangeTombstoneList objectsvoid
setInterDCStreamThroughputMbitPerSec(int value)
void
setInterDCStreamThroughputMbPerSec(int value)
Deprecated.See CASSANDRA-15234void
setInterDCStreamThroughputMebibytesPerSec(int value)
void
setInternodeStreamingTcpUserTimeoutInMS(int value)
void
setInternodeTcpConnectTimeoutInMS(int value)
void
setInternodeTcpUserTimeoutInMS(int value)
void
setIsShutdownUnsafeForTests(boolean isShutdown)
for in-jvm dtest use - forces isShutdown to be set to whatever passed in.void
setKeyspaceCountWarnThreshold(int value)
Deprecated.See CASSANDRA-17195void
setLocalReadTooLargeAbortThreshold(java.lang.String threshold)
void
setLocalReadTooLargeWarnThreshold(java.lang.String threshold)
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 />
setvoid
setMaxTopSizePartitionCount(int value)
void
setMaxTopTombstonePartitionCount(int value)
void
setMigrateKeycacheOnCompaction(boolean invalidateKeyCacheOnCompaction)
void
setMinTrackedPartitionSize(java.lang.String value)
void
setMinTrackedPartitionTombstoneCount(long value)
void
setMovingModeUnsafe()
void
setNativeTransportBackoffOnQueueOverloadInMillis(long min, long max)
void
setNativeTransportMaxConcurrentRequestsInBytes(long newLimit)
void
setNativeTransportMaxConcurrentRequestsInBytesPerIp(long newLimit)
void
setNativeTransportMaxRequestsPerSecond(int newPerSecond)
void
setNativeTransportQueueMaxItemAgeThreshold(double threshold)
void
setNativeTransportRateLimitingEnabled(boolean enabled)
void
setNativeTransportThrowOnOverload(boolean throwOnOverload)
void
setNativeTransportTimeoutMillis(long deadlineMillis)
void
setNormalModeUnsafe()
Only used in jvm dtest when not using GOSSIP.void
setOutOfTokenRangeRequestLoggingEnabled(boolean enabled)
void
setOutOfTokenRangeRequestRejectionEnabled(boolean enabled)
IPartitioner
setPartitionerUnsafe(IPartitioner newPartitioner)
void
setPaxosAutoRepairsEnabled(boolean enabled)
void
setPaxosDcLocalCommitEnabled(boolean enabled)
void
setPaxosOnLinearizabilityViolations(java.lang.String v)
void
setPaxosPurgeGraceSeconds(long v)
void
setPaxosRepairEnabled(boolean enabled)
void
setPaxosStateFlushEnabled(boolean enabled)
void
setPaxosStatePurging(java.lang.String v)
void
setRangeRpcTimeout(long value)
void
setRangeTombstoneListResizeGrowthFactor(double growthFactor)
Sets the resize factor to use when growing/resizing a RangeTombstoneListvoid
setReadRpcTimeout(long value)
void
setReadThresholdsEnabled(boolean value)
void
setRepairRpcTimeout(java.lang.Long timeoutInMillis)
void
setRepairSessionMaximumTreeDepth(int depth)
void
setRepairSessionMaxTreeDepth(int depth)
Deprecated.See CASSANDRA-17668void
setRowIndexReadSizeAbortThreshold(java.lang.String threshold)
void
setRowIndexReadSizeWarnThreshold(java.lang.String threshold)
void
setRpcReady(boolean value)
Set the RPC status.void
setRpcTimeout(long value)
void
setSkipPaxosRepairCompatibilityCheck(boolean v)
void
setSkipPaxosRepairOnTopologyChange(boolean v)
void
setSkipPaxosRepairOnTopologyChangeKeyspaces(java.lang.String v)
void
setSkipStreamDiskSpaceCheck(boolean value)
void
setSnapshotLinksPerSecond(long throttle)
Set the current hardlink-per-second throttle for snapshots A setting of zero indicates no throttlingvoid
setSSTablePreemptiveOpenIntervalInMB(int intervalInMB)
Negative number for disabledvoid
setStreamThroughputMbitPerSec(int value)
void
setStreamThroughputMbPerSec(int value)
Deprecated.See CASSANDRA-15234void
setStreamThroughputMebibytesPerSec(int value)
void
setTableCountWarnThreshold(int value)
Deprecated.See CASSANDRA-17195void
setTokens(java.util.Collection<Token> tokens)
This method updates the local token on diskvoid
setTombstoneFailureThreshold(int threshold)
Sets the threshold for abandoning queries with many tombstonesvoid
setTombstoneWarnThreshold(int threshold)
Sets the threshold for warning queries with many tombstonesvoid
setTraceProbability(double probability)
Enables/Disables tracing for the whole system.void
setTransferHintsOnDecommission(boolean enabled)
void
setTruncateRpcTimeout(long value)
void
setUpDistributedSystemKeyspaces()
void
setWriteRpcTimeout(long value)
boolean
shouldTraceProbablistically()
void
shutdownServer()
Future<StreamState>
startBootstrap(java.util.Collection<Token> tokens)
Future<StreamState>
startBootstrap(java.util.Collection<Token> tokens, boolean replacing)
void
startGossiping()
void
startNativeTransport()
Future<?>
startRepairPaxosForTopologyChange(java.lang.String reason)
boolean
startSamplingPartitions(java.lang.String ks, java.lang.String table, int duration, int interval, int capacity, int count, java.util.List<java.lang.String> samplers)
Start a scheduled samplingvoid
startSnapshotManager()
void
stopClient()
void
stopDaemon()
void
stopFullQueryLogger()
Stop logging queries but leave any generated files on disk.void
stopGossiping()
void
stopNativeTransport(boolean force)
boolean
stopSamplingPartitions(java.lang.String ks, java.lang.String table)
Stop a scheduled samplingvoid
stopTransports()
void
takeMultipleTableSnapshot(java.lang.String tag, java.lang.String... tableList)
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.void
takeSnapshot(java.lang.String tag, java.util.Map<java.lang.String,java.lang.String> options, java.lang.String... entities)
Takes the snapshot of a multiple column family from different keyspaces.void
takeTableSnapshot(java.lang.String keyspaceName, java.lang.String tableName, java.lang.String tag)
Takes the snapshot of a specific table.boolean
topPartitionsEnabled()
long
trueSnapshotsSize()
Get the true size taken by all snapshots across all keyspaces.void
truncate(java.lang.String keyspace, java.lang.String table)
Truncates (deletes) the given table 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(InetAddressAndPort endpoint)
int
upgradeSSTables(java.lang.String keyspaceName, boolean skipIfCurrentVersion, long skipIfNewerThanTimestamp, int jobs, java.lang.String... tableNames)
int
upgradeSSTables(java.lang.String keyspaceName, boolean excludeCurrentVersion, java.lang.String... tableNames)
Rewrite all sstables to the latest version.int
verify(boolean extendedVerify, boolean checkVersion, boolean diskFailurePolicy, boolean mutateRepairStatus, boolean checkOwnsTokens, boolean quick, java.lang.String keyspaceName, java.lang.String... tableNames)
int
verify(boolean extendedVerify, java.lang.String keyspaceName, java.lang.String... tableNames)
Deprecated.See CASSANDRA-14201void
waitForSchema(long schemaTimeoutMillis, long ringTimeoutMillis)
-
Methods inherited from class javax.management.NotificationBroadcasterSupport
getNotificationInfo, handleNotification, sendNotification
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.cassandra.service.StorageServiceMBean
scrub, scrub, stopNativeTransport, upgradeSSTables
-
-
-
-
Field Detail
-
INDEFINITE
public static final int INDEFINITE
- See Also:
- Constant Field Values
-
RING_DELAY_MILLIS
public static final int RING_DELAY_MILLIS
-
SCHEMA_DELAY_MILLIS
public static final int SCHEMA_DELAY_MILLIS
-
valueFactory
public volatile VersionedValue.VersionedValueFactory valueFactory
-
snapshotManager
public final SnapshotManager snapshotManager
-
instance
public static final StorageService instance
-
skipNotificationListeners
public volatile boolean skipNotificationListeners
-
useStrictConsistency
public static final boolean useStrictConsistency
-
sstablesTracker
public final SSTablesGlobalTracker sstablesTracker
-
-
Method Detail
-
getOutOfRangeOperationCounts
public java.util.Map<java.lang.String,long[]> getOutOfRangeOperationCounts()
Description copied from interface:StorageServiceMBean
Get the per-keyspace counts of operations that the node has received for tokens outside its owned ranges. Represented as aMap<String, long[]>
, keys are keyspace names and the values are the counts for read, write and paxos ops respectivly. e.g. keyspace_name -> [reads, writes, paxos].- Specified by:
getOutOfRangeOperationCounts
in interfaceStorageServiceMBean
-
incOutOfRangeOperationCount
public void incOutOfRangeOperationCount()
-
isInShutdownHook
@Deprecated(since="3.10") public boolean isInShutdownHook()
Deprecated.See CASSANDRA-12509
-
isShutdown
public boolean isShutdown()
-
setIsShutdownUnsafeForTests
public void setIsShutdownUnsafeForTests(boolean isShutdown)
for in-jvm dtest use - forces isShutdown to be set to whatever passed in.
-
getLocalReplicas
public RangesAtEndpoint getLocalReplicas(java.lang.String keyspaceName)
-
getReplicas
public RangesAtEndpoint getReplicas(java.lang.String keyspaceName, InetAddressAndPort endpoint)
-
getLocalAndPendingRanges
public java.util.List<Range<Token>> getLocalAndPendingRanges(java.lang.String ks)
-
getNormalizedRanges
public OwnedRanges getNormalizedRanges(java.lang.String keyspaceName, InetAddressAndPort ep)
-
getNormalizedLocalRanges
public OwnedRanges getNormalizedLocalRanges(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)
-
isSurveyMode
public boolean isSurveyMode()
-
hasJoined
public boolean hasJoined()
-
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 interfaceStorageServiceMBean
-
startGossiping
public void startGossiping()
- Specified by:
startGossiping
in interfaceStorageServiceMBean
-
isGossipRunning
public boolean isGossipRunning()
- Specified by:
isGossipRunning
in interfaceStorageServiceMBean
-
startNativeTransport
public void startNativeTransport()
- Specified by:
startNativeTransport
in interfaceStorageServiceMBean
-
stopNativeTransport
public void stopNativeTransport(boolean force)
- Specified by:
stopNativeTransport
in interfaceStorageServiceMBean
-
isNativeTransportRunning
public boolean isNativeTransportRunning()
- Specified by:
isNativeTransportRunning
in interfaceStorageServiceMBean
-
enableNativeTransportOldProtocolVersions
public void enableNativeTransportOldProtocolVersions()
- Specified by:
enableNativeTransportOldProtocolVersions
in interfaceStorageServiceMBean
-
disableNativeTransportOldProtocolVersions
public void disableNativeTransportOldProtocolVersions()
- Specified by:
disableNativeTransportOldProtocolVersions
in interfaceStorageServiceMBean
-
stopTransports
public void stopTransports()
-
stopClient
public void stopClient()
-
isInitialized
public boolean isInitialized()
- Specified by:
isInitialized
in interfaceStorageServiceMBean
-
isGossipActive
public boolean isGossipActive()
-
isDaemonSetupCompleted
public boolean isDaemonSetupCompleted()
-
stopDaemon
public void stopDaemon()
- Specified by:
stopDaemon
in interfaceStorageServiceMBean
-
checkForEndpointCollision
public void checkForEndpointCollision(java.util.UUID localHostId, java.util.Set<InetAddressAndPort> peers) 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 schemaAndRingDelayMillis) throws ConfigurationException
- Throws:
ConfigurationException
-
initServer
public void initServer(int schemaTimeoutMillis, int ringTimeoutMillis) throws ConfigurationException
- Throws:
ConfigurationException
-
completeInitialization
public void completeInitialization()
-
populateTokenMetadata
public void populateTokenMetadata()
-
isReplacing
public boolean isReplacing()
-
removeShutdownHook
public void removeShutdownHook()
In the event of forceful termination we need to remove the shutdown hook to prevent hanging (OOM for instance)
-
isSeed
public static boolean isSeed()
-
startSnapshotManager
public void startSnapshotManager()
-
waitForSchema
public void waitForSchema(long schemaTimeoutMillis, long ringTimeoutMillis)
-
joinTokenRing
public void joinTokenRing(boolean finishJoiningRing, boolean shouldBootstrap, long schemaTimeoutMillis, long bootstrapTimeoutMillis, long ringTimeoutMillis) throws ConfigurationException
- Throws:
ConfigurationException
-
isReplacingSameAddress
public static boolean isReplacingSameAddress()
-
gossipSnitchInfo
public void gossipSnitchInfo()
-
joinRing
public void joinRing() throws java.io.IOException
- Specified by:
joinRing
in interfaceStorageServiceMBean
- Throws:
java.io.IOException
-
finishJoiningRing
public void finishJoiningRing(boolean didBootstrap, java.util.Collection<Token> tokens)
-
doAuthSetup
public void doAuthSetup(boolean setUpSchema)
-
isAuthSetupComplete
public boolean isAuthSetupComplete()
-
authSetupCalled
public boolean authSetupCalled()
-
setUpDistributedSystemKeyspaces
public void setUpDistributedSystemKeyspaces()
-
isJoined
public boolean isJoined()
- Specified by:
isJoined
in interfaceStorageServiceMBean
-
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 interfaceStorageServiceMBean
- Parameters:
sourceDc
- Name of DC from which to select sources for streaming or null to pick any node
-
rebuild
public void rebuild(java.lang.String sourceDc, java.lang.String keyspace, java.lang.String tokens, java.lang.String specificSources)
Description copied from interface:StorageServiceMBean
Same asStorageServiceMBean.rebuild(String)
, but only for specified keyspace and ranges.- Specified by:
rebuild
in interfaceStorageServiceMBean
- Parameters:
sourceDc
- Name of DC from which to select sources for streaming or null to pick any nodekeyspace
- Name of the keyspace which to rebuild or null to rebuild all keyspaces.tokens
- Range of tokens to rebuild or null to rebuild all token ranges. In the format of: "(start_token_1,end_token_1],(start_token_2,end_token_2],...(start_token_n,end_token_n]"specificSources
- list of sources that can be used for rebuilding. Must be other nodes in the cluster. The format of the string is comma separated values.
-
rebuild
public void rebuild(java.lang.String sourceDc, java.lang.String keyspace, java.lang.String tokens, java.lang.String specificSources, boolean excludeLocalDatacenterNodes)
Description copied from interface:StorageServiceMBean
Same asStorageServiceMBean.rebuild(String)
, but only for specified keyspace and ranges. It excludes local data center nodes- Specified by:
rebuild
in interfaceStorageServiceMBean
- Parameters:
sourceDc
- Name of DC from which to select sources for streaming or null to pick any nodekeyspace
- Name of the keyspace which to rebuild or null to rebuild all keyspaces.tokens
- Range of tokens to rebuild or null to rebuild all token ranges. In the format of: "(start_token_1,end_token_1],(start_token_2,end_token_2],...(start_token_n,end_token_n]"specificSources
- list of sources that can be used for rebuilding. Mostly other nodes in the cluster.excludeLocalDatacenterNodes
- Flag to indicate whether local data center nodes should be excluded as sources for streaming.
-
setRpcTimeout
public void setRpcTimeout(long value)
- Specified by:
setRpcTimeout
in interfaceStorageServiceMBean
-
getRpcTimeout
public long getRpcTimeout()
- Specified by:
getRpcTimeout
in interfaceStorageServiceMBean
-
setReadRpcTimeout
public void setReadRpcTimeout(long value)
- Specified by:
setReadRpcTimeout
in interfaceStorageServiceMBean
-
getReadRpcTimeout
public long getReadRpcTimeout()
- Specified by:
getReadRpcTimeout
in interfaceStorageServiceMBean
-
setRangeRpcTimeout
public void setRangeRpcTimeout(long value)
- Specified by:
setRangeRpcTimeout
in interfaceStorageServiceMBean
-
getRangeRpcTimeout
public long getRangeRpcTimeout()
- Specified by:
getRangeRpcTimeout
in interfaceStorageServiceMBean
-
setWriteRpcTimeout
public void setWriteRpcTimeout(long value)
- Specified by:
setWriteRpcTimeout
in interfaceStorageServiceMBean
-
getWriteRpcTimeout
public long getWriteRpcTimeout()
- Specified by:
getWriteRpcTimeout
in interfaceStorageServiceMBean
-
setInternodeTcpConnectTimeoutInMS
public void setInternodeTcpConnectTimeoutInMS(int value)
- Specified by:
setInternodeTcpConnectTimeoutInMS
in interfaceStorageServiceMBean
-
getInternodeTcpConnectTimeoutInMS
public int getInternodeTcpConnectTimeoutInMS()
- Specified by:
getInternodeTcpConnectTimeoutInMS
in interfaceStorageServiceMBean
-
setInternodeTcpUserTimeoutInMS
public void setInternodeTcpUserTimeoutInMS(int value)
- Specified by:
setInternodeTcpUserTimeoutInMS
in interfaceStorageServiceMBean
-
getInternodeTcpUserTimeoutInMS
public int getInternodeTcpUserTimeoutInMS()
- Specified by:
getInternodeTcpUserTimeoutInMS
in interfaceStorageServiceMBean
-
setInternodeStreamingTcpUserTimeoutInMS
public void setInternodeStreamingTcpUserTimeoutInMS(int value)
- Specified by:
setInternodeStreamingTcpUserTimeoutInMS
in interfaceStorageServiceMBean
-
getInternodeStreamingTcpUserTimeoutInMS
public int getInternodeStreamingTcpUserTimeoutInMS()
- Specified by:
getInternodeStreamingTcpUserTimeoutInMS
in interfaceStorageServiceMBean
-
setCounterWriteRpcTimeout
public void setCounterWriteRpcTimeout(long value)
- Specified by:
setCounterWriteRpcTimeout
in interfaceStorageServiceMBean
-
getCounterWriteRpcTimeout
public long getCounterWriteRpcTimeout()
- Specified by:
getCounterWriteRpcTimeout
in interfaceStorageServiceMBean
-
setCasContentionTimeout
public void setCasContentionTimeout(long value)
- Specified by:
setCasContentionTimeout
in interfaceStorageServiceMBean
-
getCasContentionTimeout
public long getCasContentionTimeout()
- Specified by:
getCasContentionTimeout
in interfaceStorageServiceMBean
-
setTruncateRpcTimeout
public void setTruncateRpcTimeout(long value)
- Specified by:
setTruncateRpcTimeout
in interfaceStorageServiceMBean
-
getTruncateRpcTimeout
public long getTruncateRpcTimeout()
- Specified by:
getTruncateRpcTimeout
in interfaceStorageServiceMBean
-
setStreamThroughputMbPerSec
@Deprecated(since="4.1") public void setStreamThroughputMbPerSec(int value)
Deprecated.See CASSANDRA-15234- Specified by:
setStreamThroughputMbPerSec
in interfaceStorageServiceMBean
-
setStreamThroughputMbitPerSec
public void setStreamThroughputMbitPerSec(int value)
- Specified by:
setStreamThroughputMbitPerSec
in interfaceStorageServiceMBean
-
setStreamThroughputMebibytesPerSec
public void setStreamThroughputMebibytesPerSec(int value)
- Specified by:
setStreamThroughputMebibytesPerSec
in interfaceStorageServiceMBean
-
getStreamThroughputMebibytesPerSecAsDouble
public double getStreamThroughputMebibytesPerSecAsDouble()
- Specified by:
getStreamThroughputMebibytesPerSecAsDouble
in interfaceStorageServiceMBean
-
getStreamThroughputMebibytesPerSec
public int getStreamThroughputMebibytesPerSec()
Description copied from interface:StorageServiceMBean
Below method returns stream_throughput_outbound rounded, for precise number, please, use getStreamThroughputMebibytesPerSecAsDouble- Specified by:
getStreamThroughputMebibytesPerSec
in interfaceStorageServiceMBean
- Returns:
- stream_throughput_outbound in MiB
-
getStreamThroughputMbPerSec
@Deprecated(since="4.1") public int getStreamThroughputMbPerSec()
Deprecated.See CASSANDRA-15234- Specified by:
getStreamThroughputMbPerSec
in interfaceStorageServiceMBean
- Returns:
- stream_throughput_outbound in MiB
-
getStreamThroughputMbitPerSec
@Deprecated(since="4.1") public int getStreamThroughputMbitPerSec()
Deprecated.See CASSANDRA-17225- Specified by:
getStreamThroughputMbitPerSec
in interfaceStorageServiceMBean
- Returns:
- stream_throughput_outbound in megabits
-
getStreamThroughputMbitPerSecAsDouble
public double getStreamThroughputMbitPerSecAsDouble()
- Specified by:
getStreamThroughputMbitPerSecAsDouble
in interfaceStorageServiceMBean
-
setEntireSSTableStreamThroughputMebibytesPerSec
public void setEntireSSTableStreamThroughputMebibytesPerSec(int value)
- Specified by:
setEntireSSTableStreamThroughputMebibytesPerSec
in interfaceStorageServiceMBean
-
getEntireSSTableStreamThroughputMebibytesPerSecAsDouble
public double getEntireSSTableStreamThroughputMebibytesPerSecAsDouble()
- Specified by:
getEntireSSTableStreamThroughputMebibytesPerSecAsDouble
in interfaceStorageServiceMBean
-
setInterDCStreamThroughputMbPerSec
@Deprecated(since="4.1") public void setInterDCStreamThroughputMbPerSec(int value)
Deprecated.See CASSANDRA-15234- Specified by:
setInterDCStreamThroughputMbPerSec
in interfaceStorageServiceMBean
-
setInterDCStreamThroughputMbitPerSec
public void setInterDCStreamThroughputMbitPerSec(int value)
- Specified by:
setInterDCStreamThroughputMbitPerSec
in interfaceStorageServiceMBean
-
getInterDCStreamThroughputMbPerSec
@Deprecated(since="4.1") public int getInterDCStreamThroughputMbPerSec()
Deprecated.See CASSANDRA-15234- Specified by:
getInterDCStreamThroughputMbPerSec
in interfaceStorageServiceMBean
- Returns:
- inter_dc_stream_throughput_outbound in MiB
-
getInterDCStreamThroughputMbitPerSec
@Deprecated(since="4.1") public int getInterDCStreamThroughputMbitPerSec()
Deprecated.See CASSANDRA-17225- Specified by:
getInterDCStreamThroughputMbitPerSec
in interfaceStorageServiceMBean
- Returns:
- inter_dc_stream_throughput_outbound in megabits
-
getInterDCStreamThroughputMbitPerSecAsDouble
public double getInterDCStreamThroughputMbitPerSecAsDouble()
- Specified by:
getInterDCStreamThroughputMbitPerSecAsDouble
in interfaceStorageServiceMBean
-
setInterDCStreamThroughputMebibytesPerSec
public void setInterDCStreamThroughputMebibytesPerSec(int value)
- Specified by:
setInterDCStreamThroughputMebibytesPerSec
in interfaceStorageServiceMBean
-
getInterDCStreamThroughputMebibytesPerSec
public int getInterDCStreamThroughputMebibytesPerSec()
Description copied from interface:StorageServiceMBean
Below method returns Inter_dc_stream_throughput_outbound rounded, for precise number, please, use getInterDCStreamThroughputMebibytesPerSecAsDouble- Specified by:
getInterDCStreamThroughputMebibytesPerSec
in interfaceStorageServiceMBean
- Returns:
- inter_dc_stream_throughput_outbound in MiB
-
getInterDCStreamThroughputMebibytesPerSecAsDouble
public double getInterDCStreamThroughputMebibytesPerSecAsDouble()
- Specified by:
getInterDCStreamThroughputMebibytesPerSecAsDouble
in interfaceStorageServiceMBean
-
setEntireSSTableInterDCStreamThroughputMebibytesPerSec
public void setEntireSSTableInterDCStreamThroughputMebibytesPerSec(int value)
- Specified by:
setEntireSSTableInterDCStreamThroughputMebibytesPerSec
in interfaceStorageServiceMBean
-
getEntireSSTableInterDCStreamThroughputMebibytesPerSecAsDouble
public double getEntireSSTableInterDCStreamThroughputMebibytesPerSecAsDouble()
- Specified by:
getEntireSSTableInterDCStreamThroughputMebibytesPerSecAsDouble
in interfaceStorageServiceMBean
-
getCompactionThroughtputMibPerSecAsDouble
public double getCompactionThroughtputMibPerSecAsDouble()
- Specified by:
getCompactionThroughtputMibPerSecAsDouble
in interfaceStorageServiceMBean
-
getCompactionThroughtputBytesPerSec
public long getCompactionThroughtputBytesPerSec()
- Specified by:
getCompactionThroughtputBytesPerSec
in interfaceStorageServiceMBean
-
getCompactionThroughputMbPerSec
@Deprecated(since="4.1") public int getCompactionThroughputMbPerSec()
Deprecated.See CASSANDRA-17225- Specified by:
getCompactionThroughputMbPerSec
in interfaceStorageServiceMBean
- Returns:
- compaction_throughgput in MiB
-
setCompactionThroughputMbPerSec
public void setCompactionThroughputMbPerSec(int value)
- Specified by:
setCompactionThroughputMbPerSec
in interfaceStorageServiceMBean
-
getBatchlogReplayThrottleInKB
public int getBatchlogReplayThrottleInKB()
- Specified by:
getBatchlogReplayThrottleInKB
in interfaceStorageServiceMBean
-
setBatchlogReplayThrottleInKB
public void setBatchlogReplayThrottleInKB(int throttleInKB)
- Specified by:
setBatchlogReplayThrottleInKB
in interfaceStorageServiceMBean
-
getConcurrentCompactors
public int getConcurrentCompactors()
- Specified by:
getConcurrentCompactors
in interfaceStorageServiceMBean
-
setConcurrentCompactors
public void setConcurrentCompactors(int value)
- Specified by:
setConcurrentCompactors
in interfaceStorageServiceMBean
-
bypassConcurrentValidatorsLimit
public void bypassConcurrentValidatorsLimit()
- Specified by:
bypassConcurrentValidatorsLimit
in interfaceStorageServiceMBean
-
enforceConcurrentValidatorsLimit
public void enforceConcurrentValidatorsLimit()
- Specified by:
enforceConcurrentValidatorsLimit
in interfaceStorageServiceMBean
-
isConcurrentValidatorsLimitEnforced
public boolean isConcurrentValidatorsLimitEnforced()
- Specified by:
isConcurrentValidatorsLimitEnforced
in interfaceStorageServiceMBean
-
getConcurrentIndexBuilders
public int getConcurrentIndexBuilders()
- Specified by:
getConcurrentIndexBuilders
in interfaceStorageServiceMBean
-
setConcurrentIndexBuilders
public void setConcurrentIndexBuilders(int value)
- Specified by:
setConcurrentIndexBuilders
in interfaceStorageServiceMBean
-
getConcurrentValidators
public int getConcurrentValidators()
- Specified by:
getConcurrentValidators
in interfaceStorageServiceMBean
-
setConcurrentValidators
public void setConcurrentValidators(int value)
- Specified by:
setConcurrentValidators
in interfaceStorageServiceMBean
-
getConcurrentViewBuilders
public int getConcurrentViewBuilders()
- Specified by:
getConcurrentViewBuilders
in interfaceStorageServiceMBean
-
setConcurrentViewBuilders
public void setConcurrentViewBuilders(int value)
- Specified by:
setConcurrentViewBuilders
in interfaceStorageServiceMBean
-
isIncrementalBackupsEnabled
public boolean isIncrementalBackupsEnabled()
- Specified by:
isIncrementalBackupsEnabled
in interfaceStorageServiceMBean
-
setIncrementalBackupsEnabled
public void setIncrementalBackupsEnabled(boolean value)
- Specified by:
setIncrementalBackupsEnabled
in interfaceStorageServiceMBean
-
setMovingModeUnsafe
public void setMovingModeUnsafe()
-
setNormalModeUnsafe
public void setNormalModeUnsafe()
Only used in jvm dtest when not using GOSSIP. See org.apache.cassandra.distributed.impl.Instance#startup(org.apache.cassandra.distributed.api.ICluster)
-
prepareForBootstrap
public java.util.Collection<InetAddressAndPort> prepareForBootstrap(long schemaTimeoutMillis, long ringTimeoutMillis)
-
bootstrap
public boolean bootstrap(java.util.Collection<Token> tokens, long bootstrapTimeoutMillis)
Bootstrap node by fetching data from other nodes. If node is bootstrapping as a new node, then this also announces bootstrapping to the cluster. This blocks until streaming is done.- Parameters:
tokens
- bootstrapping tokens- Returns:
- true if bootstrap succeeds.
-
startBootstrap
public Future<StreamState> startBootstrap(java.util.Collection<Token> tokens)
-
startBootstrap
public Future<StreamState> startBootstrap(java.util.Collection<Token> tokens, boolean replacing)
-
getBootstrapState
public java.lang.String getBootstrapState()
- Specified by:
getBootstrapState
in interfaceStorageServiceMBean
-
resumeBootstrap
public boolean resumeBootstrap()
Description copied from interface:StorageServiceMBean
Resume bootstrap streaming when there is failed data streaming.- Specified by:
resumeBootstrap
in interfaceStorageServiceMBean
- Returns:
- true if the node successfully starts resuming. (this does not mean bootstrap streaming was success.)
-
getConcurrency
public java.util.Map<java.lang.String,java.util.List<java.lang.Integer>> getConcurrency(java.util.List<java.lang.String> stageNames)
- Specified by:
getConcurrency
in interfaceStorageServiceMBean
-
setConcurrency
public void setConcurrency(java.lang.String threadPoolName, int newCorePoolSize, int newMaximumPoolSize)
Description copied from interface:StorageServiceMBean
Sets the concurrency setting for processing stages- Specified by:
setConcurrency
in interfaceStorageServiceMBean
-
isBootstrapMode
public boolean isBootstrapMode()
Description copied from interface:StorageServiceMBean
Check if currently bootstrapping. Note this becomes false beforeSystemKeyspace.bootstrapComplete()
is called, as setting bootstrap to complete is called only when the node joins the ring.- Specified by:
isBootstrapMode
in interfaceStorageServiceMBean
- Returns:
- True prior to bootstrap streaming completing. False prior to start of bootstrap and post streaming.
-
getTokenMetadata
public TokenMetadata getTokenMetadata()
-
getRangeToEndpointMap
public java.util.Map<java.util.List<java.lang.String>,java.util.List<java.lang.String>> getRangeToEndpointMap(java.lang.String keyspace)
Description copied from interface:StorageServiceMBean
Retrieve a map of range to end points that describe the ring topology of a Cassandra cluster.- Specified by:
getRangeToEndpointMap
in interfaceStorageServiceMBean
- Returns:
- mapping of ranges to end points
-
getRangeToEndpointWithPortMap
public java.util.Map<java.util.List<java.lang.String>,java.util.List<java.lang.String>> getRangeToEndpointWithPortMap(java.lang.String keyspace)
- Specified by:
getRangeToEndpointWithPortMap
in interfaceStorageServiceMBean
-
getRangeToEndpointMap
public java.util.Map<java.util.List<java.lang.String>,java.util.List<java.lang.String>> getRangeToEndpointMap(java.lang.String keyspace, boolean withPort)
for a keyspace, return the ranges and corresponding listen addresses.- Parameters:
keyspace
-- Returns:
- the endpoint map
-
getNativeaddress
public java.lang.String getNativeaddress(InetAddressAndPort endpoint, boolean withPort)
Return the native address associated with an endpoint as a string.- Parameters:
endpoint
- The endpoint to get rpc address for- Returns:
- the native address
-
getRangeToRpcaddressMap
public java.util.Map<java.util.List<java.lang.String>,java.util.List<java.lang.String>> getRangeToRpcaddressMap(java.lang.String keyspace)
Description copied from interface:StorageServiceMBean
Retrieve a map of range to rpc addresses that describe the ring topology of a Cassandra cluster.- Specified by:
getRangeToRpcaddressMap
in interfaceStorageServiceMBean
- Returns:
- mapping of ranges to rpc addresses
-
getRangeToNativeaddressWithPortMap
public java.util.Map<java.util.List<java.lang.String>,java.util.List<java.lang.String>> getRangeToNativeaddressWithPortMap(java.lang.String keyspace)
- Specified by:
getRangeToNativeaddressWithPortMap
in interfaceStorageServiceMBean
-
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 interfaceStorageServiceMBean
- Parameters:
keyspace
- the keyspace to get the pending range map for.- Returns:
- a map of pending ranges to endpoints
-
getPendingRangeToEndpointWithPortMap
public java.util.Map<java.util.List<java.lang.String>,java.util.List<java.lang.String>> getPendingRangeToEndpointWithPortMap(java.lang.String keyspace)
- Specified by:
getPendingRangeToEndpointWithPortMap
in interfaceStorageServiceMBean
-
getRangeToAddressMap
public EndpointsByRange getRangeToAddressMap(java.lang.String keyspace)
-
getRangeToAddressMapInLocalDC
public EndpointsByRange getRangeToAddressMapInLocalDC(java.lang.String keyspace)
-
describeRingJMX
public java.util.List<java.lang.String> describeRingJMX(java.lang.String keyspace) throws java.io.IOException
Description copied from interface:StorageServiceMBean
The same asdescribeRing(String)
but converts TokenRange to the String for JMX compatibility- Specified by:
describeRingJMX
in interfaceStorageServiceMBean
- 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
-
describeRingWithPortJMX
public java.util.List<java.lang.String> describeRingWithPortJMX(java.lang.String keyspace) throws java.io.IOException
- Specified by:
describeRingWithPortJMX
in interfaceStorageServiceMBean
- 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 asdescribeRing(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 interfaceStorageServiceMBean
- Returns:
- a map of tokens to endpoints in ascending order
-
getTokenToEndpointWithPortMap
public java.util.Map<java.lang.String,java.lang.String> getTokenToEndpointWithPortMap()
- Specified by:
getTokenToEndpointWithPortMap
in interfaceStorageServiceMBean
-
getLocalHostId
public java.lang.String getLocalHostId()
Description copied from interface:StorageServiceMBean
Retrieve this hosts unique ID- Specified by:
getLocalHostId
in interfaceStorageServiceMBean
-
getLocalHostUUID
public java.util.UUID getLocalHostUUID()
-
getHostIdMap
public java.util.Map<java.lang.String,java.lang.String> getHostIdMap()
-
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 interfaceStorageServiceMBean
-
getEndpointWithPortToHostId
public java.util.Map<java.lang.String,java.lang.String> getEndpointWithPortToHostId()
- Specified by:
getEndpointWithPortToHostId
in interfaceStorageServiceMBean
-
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 interfaceStorageServiceMBean
-
getHostIdToEndpointWithPort
public java.util.Map<java.lang.String,java.lang.String> getHostIdToEndpointWithPort()
- Specified by:
getHostIdToEndpointWithPort
in interfaceStorageServiceMBean
-
beforeChange
public void beforeChange(InetAddressAndPort endpoint, EndpointState currentState, ApplicationState newStateKey, VersionedValue newValue)
- Specified by:
beforeChange
in interfaceIEndpointStateChangeSubscriber
-
onChange
public void onChange(InetAddressAndPort endpoint, ApplicationState state, VersionedValue value)
- Specified by:
onChange
in interfaceIEndpointStateChangeSubscriber
-
updateTopology
public void updateTopology(InetAddressAndPort endpoint)
-
updateTopology
public void updateTopology()
-
isRpcReady
public boolean isRpcReady(InetAddressAndPort endpoint)
-
setRpcReady
public void setRpcReady(boolean value)
Set the RPC status. Because when draining a node we need to set the RPC status to not ready, and drain is called by the shutdown hook, it may be that value is false and there is no local endpoint state. In this case it's OK to just do nothing. Therefore, we assert that the local endpoint state is not null only when value is true.- Parameters:
value
- - true indicates that RPC is ready, false indicates the opposite.
-
isReplacingSameHostAddressAndHostId
public boolean isReplacingSameHostAddressAndHostId(java.util.UUID hostId)
-
addExpireTimeIfFound
protected void addExpireTimeIfFound(InetAddressAndPort endpoint, long expireTime)
-
extractExpireTime
protected long extractExpireTime(java.lang.String[] pieces)
-
onJoin
public void onJoin(InetAddressAndPort 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 interfaceIEndpointStateChangeSubscriber
- Parameters:
endpoint
- endpoint for which the state change occurred.epState
- state that actually changed for the above endpoint.
-
onAlive
public void onAlive(InetAddressAndPort endpoint, EndpointState state)
- Specified by:
onAlive
in interfaceIEndpointStateChangeSubscriber
-
onRemove
public void onRemove(InetAddressAndPort endpoint)
- Specified by:
onRemove
in interfaceIEndpointStateChangeSubscriber
-
onDead
public void onDead(InetAddressAndPort endpoint, EndpointState state)
- Specified by:
onDead
in interfaceIEndpointStateChangeSubscriber
-
onRestart
public void onRestart(InetAddressAndPort 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 ifstate.isAlive() == false
asstate
is from before the restarted node is marked up.- Specified by:
onRestart
in interfaceIEndpointStateChangeSubscriber
-
getLoadString
public java.lang.String getLoadString()
Description copied from interface:StorageServiceMBean
Human-readable load value- Specified by:
getLoadString
in interfaceStorageServiceMBean
-
getUncompressedLoadString
public java.lang.String getUncompressedLoadString()
Description copied from interface:StorageServiceMBean
Human-readable uncompressed load value- Specified by:
getUncompressedLoadString
in interfaceStorageServiceMBean
-
getLoadMapWithPort
public java.util.Map<java.lang.String,java.lang.String> getLoadMapWithPort()
- Specified by:
getLoadMapWithPort
in interfaceStorageServiceMBean
-
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 interfaceStorageServiceMBean
-
deliverHints
public final void deliverHints(java.lang.String host)
- Specified by:
deliverHints
in interfaceStorageServiceMBean
-
getLocalTokens
public java.util.Collection<Token> getLocalTokens()
-
getEndpointForHostId
@Nullable public InetAddressAndPort getEndpointForHostId(java.util.UUID hostId)
-
getHostIdForEndpoint
@Nullable public java.util.UUID getHostIdForEndpoint(InetAddressAndPort address)
-
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 interfaceStorageServiceMBean
- 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 interfaceStorageServiceMBean
- 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 interfaceStorageServiceMBean
- Returns:
- A string representation of the Cassandra version.
-
getGitSHA
public java.lang.String getGitSHA()
Description copied from interface:StorageServiceMBean
Fetch a string representation of the Cassandra git SHA.- Specified by:
getGitSHA
in interfaceStorageServiceMBean
- Returns:
- A string representation of the Cassandra git SHA.
-
getSchemaVersion
public java.lang.String getSchemaVersion()
Description copied from interface:StorageServiceMBean
Fetch a string representation of the current Schema version.- Specified by:
getSchemaVersion
in interfaceStorageServiceMBean
- Returns:
- A string representation of the Schema version.
-
getKeyspaceReplicationInfo
public java.lang.String getKeyspaceReplicationInfo(java.lang.String keyspaceName)
Description copied from interface:StorageServiceMBean
Fetch the replication factor for a given keyspace.- Specified by:
getKeyspaceReplicationInfo
in interfaceStorageServiceMBean
- Returns:
- An integer that represents replication factor for the given keyspace.
-
getLeavingNodes
@Deprecated(since="4.0") public java.util.List<java.lang.String> getLeavingNodes()
Deprecated.See CASSANDRA-7544Description copied from interface:StorageServiceMBean
Retrieve the list of nodes currently leaving the ring.- Specified by:
getLeavingNodes
in interfaceStorageServiceMBean
- Returns:
- set of IP addresses, as Strings
-
getLeavingNodesWithPort
public java.util.List<java.lang.String> getLeavingNodesWithPort()
- Specified by:
getLeavingNodesWithPort
in interfaceStorageServiceMBean
-
getMovingNodes
@Deprecated(since="4.0") public java.util.List<java.lang.String> getMovingNodes()
Deprecated.See CASSANDRA-7544Description copied from interface:StorageServiceMBean
Retrieve the list of nodes currently moving in the ring.- Specified by:
getMovingNodes
in interfaceStorageServiceMBean
- Returns:
- set of IP addresses, as Strings
-
getMovingNodesWithPort
public java.util.List<java.lang.String> getMovingNodesWithPort()
- Specified by:
getMovingNodesWithPort
in interfaceStorageServiceMBean
-
getJoiningNodes
@Deprecated(since="4.0") public java.util.List<java.lang.String> getJoiningNodes()
Deprecated.See CASSANDRA-7544Description copied from interface:StorageServiceMBean
Retrieve the list of nodes currently bootstrapping into the ring.- Specified by:
getJoiningNodes
in interfaceStorageServiceMBean
- Returns:
- set of IP addresses, as Strings
-
getJoiningNodesWithPort
public java.util.List<java.lang.String> getJoiningNodesWithPort()
- Specified by:
getJoiningNodesWithPort
in interfaceStorageServiceMBean
-
getLiveNodes
@Deprecated(since="4.0") public java.util.List<java.lang.String> getLiveNodes()
Deprecated.See CASSANDRA-7544Description 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 interfaceStorageServiceMBean
- Returns:
- set of IP addresses, as Strings
-
getLiveNodesWithPort
public java.util.List<java.lang.String> getLiveNodesWithPort()
- Specified by:
getLiveNodesWithPort
in interfaceStorageServiceMBean
-
getLiveRingMembers
public java.util.Set<InetAddressAndPort> getLiveRingMembers()
-
getLiveRingMembers
public java.util.Set<InetAddressAndPort> getLiveRingMembers(boolean excludeDeadStates)
-
getUnreachableNodes
@Deprecated(since="4.0") public java.util.List<java.lang.String> getUnreachableNodes()
Deprecated.See CASSANDRA-7544Description 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 interfaceStorageServiceMBean
- Returns:
- set of IP addresses, as Strings
-
getUnreachableNodesWithPort
public java.util.List<java.lang.String> getUnreachableNodesWithPort()
- Specified by:
getUnreachableNodesWithPort
in interfaceStorageServiceMBean
-
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 interfaceStorageServiceMBean
- Returns:
- String array of all locations
-
getLocalSystemKeyspacesDataFileLocations
public java.lang.String[] getLocalSystemKeyspacesDataFileLocations()
Description copied from interface:StorageServiceMBean
Returns the locations where the local system keyspaces data should be stored.- Specified by:
getLocalSystemKeyspacesDataFileLocations
in interfaceStorageServiceMBean
- Returns:
- the locations where the local system keyspaces data should be stored
-
getNonLocalSystemKeyspacesDataFileLocations
public java.lang.String[] getNonLocalSystemKeyspacesDataFileLocations()
Description copied from interface:StorageServiceMBean
Returns the locations where should be stored the non system keyspaces data.- Specified by:
getNonLocalSystemKeyspacesDataFileLocations
in interfaceStorageServiceMBean
- Returns:
- the locations where should be stored the non system keyspaces data
-
getCommitLogLocation
public java.lang.String getCommitLogLocation()
Description copied from interface:StorageServiceMBean
Get location of the commit log- Specified by:
getCommitLogLocation
in interfaceStorageServiceMBean
- 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 interfaceStorageServiceMBean
- Returns:
- a string path
-
getCurrentGenerationNumber
public int getCurrentGenerationNumber()
Description copied from interface:StorageServiceMBean
Return the generation value for this node.- Specified by:
getCurrentGenerationNumber
in interfaceStorageServiceMBean
- Returns:
- generation number
-
forceKeyspaceCleanup
public int forceKeyspaceCleanup(java.lang.String keyspaceName, java.lang.String... tables) 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 interfaceStorageServiceMBean
- Throws:
java.io.IOException
java.util.concurrent.ExecutionException
java.lang.InterruptedException
-
forceKeyspaceCleanup
public int forceKeyspaceCleanup(int jobs, java.lang.String keyspaceName, java.lang.String... tableNames) throws java.io.IOException, java.util.concurrent.ExecutionException, java.lang.InterruptedException
- Specified by:
forceKeyspaceCleanup
in interfaceStorageServiceMBean
- Throws:
java.io.IOException
java.util.concurrent.ExecutionException
java.lang.InterruptedException
-
scrub
public int scrub(boolean disableSnapshot, boolean skipCorrupted, boolean checkData, boolean reinsertOverflowedTTL, int jobs, java.lang.String keyspaceName, java.lang.String... tableNames) throws java.io.IOException, java.util.concurrent.ExecutionException, java.lang.InterruptedException
- Specified by:
scrub
in interfaceStorageServiceMBean
- Throws:
java.io.IOException
java.util.concurrent.ExecutionException
java.lang.InterruptedException
-
scrub
public int scrub(boolean disableSnapshot, IScrubber.Options options, int jobs, java.lang.String keyspaceName, java.lang.String... tableNames) throws java.io.IOException, java.util.concurrent.ExecutionException, java.lang.InterruptedException
- Throws:
java.io.IOException
java.util.concurrent.ExecutionException
java.lang.InterruptedException
-
verify
@Deprecated(since="4.0") public int verify(boolean extendedVerify, java.lang.String keyspaceName, java.lang.String... tableNames) throws java.io.IOException, java.util.concurrent.ExecutionException, java.lang.InterruptedException
Deprecated.See CASSANDRA-14201Description copied from interface:StorageServiceMBean
Verify (checksums of) the given keyspace. If tableNames 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 interfaceStorageServiceMBean
- Throws:
java.io.IOException
java.util.concurrent.ExecutionException
java.lang.InterruptedException
-
verify
public int verify(boolean extendedVerify, boolean checkVersion, boolean diskFailurePolicy, boolean mutateRepairStatus, boolean checkOwnsTokens, boolean quick, java.lang.String keyspaceName, java.lang.String... tableNames) throws java.io.IOException, java.util.concurrent.ExecutionException, java.lang.InterruptedException
- Specified by:
verify
in interfaceStorageServiceMBean
- Throws:
java.io.IOException
java.util.concurrent.ExecutionException
java.lang.InterruptedException
-
upgradeSSTables
public int upgradeSSTables(java.lang.String keyspaceName, boolean excludeCurrentVersion, java.lang.String... tableNames) 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 interfaceStorageServiceMBean
- Throws:
java.io.IOException
java.util.concurrent.ExecutionException
java.lang.InterruptedException
-
upgradeSSTables
public int upgradeSSTables(java.lang.String keyspaceName, boolean skipIfCurrentVersion, long skipIfNewerThanTimestamp, int jobs, java.lang.String... tableNames) throws java.io.IOException, java.util.concurrent.ExecutionException, java.lang.InterruptedException
- Specified by:
upgradeSSTables
in interfaceStorageServiceMBean
- Throws:
java.io.IOException
java.util.concurrent.ExecutionException
java.lang.InterruptedException
-
recompressSSTables
public int recompressSSTables(java.lang.String keyspaceName, int jobs, java.lang.String... tableNames) throws java.io.IOException, java.util.concurrent.ExecutionException, java.lang.InterruptedException
- Specified by:
recompressSSTables
in interfaceStorageServiceMBean
- Throws:
java.io.IOException
java.util.concurrent.ExecutionException
java.lang.InterruptedException
-
rewriteSSTables
public int rewriteSSTables(java.lang.String keyspaceName, boolean skipIfCurrentVersion, long skipIfNewerThanTimestamp, boolean skipIfCompressionMatches, int jobs, java.lang.String... tableNames) throws java.io.IOException, java.util.concurrent.ExecutionException, java.lang.InterruptedException
- Throws:
java.io.IOException
java.util.concurrent.ExecutionException
java.lang.InterruptedException
-
getPreparedStatements
public java.util.List<Pair<java.lang.String,java.lang.String>> getPreparedStatements()
-
dropPreparedStatements
public void dropPreparedStatements(boolean memoryOnly)
-
forceKeyspaceCompaction
public void forceKeyspaceCompaction(boolean splitOutput, java.lang.String keyspaceName, java.lang.String... tableNames) 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 interfaceStorageServiceMBean
- Throws:
java.io.IOException
java.util.concurrent.ExecutionException
java.lang.InterruptedException
-
relocateSSTables
public int relocateSSTables(java.lang.String keyspaceName, java.lang.String... tableNames) throws java.io.IOException, java.util.concurrent.ExecutionException, java.lang.InterruptedException
- Specified by:
relocateSSTables
in interfaceStorageServiceMBean
- Throws:
java.io.IOException
java.util.concurrent.ExecutionException
java.lang.InterruptedException
-
relocateSSTables
public int relocateSSTables(int jobs, java.lang.String keyspaceName, java.lang.String... tableNames) throws java.io.IOException, java.util.concurrent.ExecutionException, java.lang.InterruptedException
- Specified by:
relocateSSTables
in interfaceStorageServiceMBean
- Throws:
java.io.IOException
java.util.concurrent.ExecutionException
java.lang.InterruptedException
-
garbageCollect
public int garbageCollect(java.lang.String tombstoneOptionString, int jobs, java.lang.String keyspaceName, java.lang.String... tableNames) throws java.io.IOException, java.util.concurrent.ExecutionException, java.lang.InterruptedException
Description copied from interface:StorageServiceMBean
Rewrites all sstables from the given tables to remove deleted data. The tombstone option defines the granularity of the procedure: ROW removes deleted partitions and rows, CELL also removes overwritten or deleted cells.- Specified by:
garbageCollect
in interfaceStorageServiceMBean
- Throws:
java.io.IOException
java.util.concurrent.ExecutionException
java.lang.InterruptedException
-
takeSnapshot
public void takeSnapshot(java.lang.String tag, java.util.Map<java.lang.String,java.lang.String> options, java.lang.String... entities) throws java.io.IOException
Takes the snapshot of a multiple column family from different keyspaces. A snapshot name must be specified.- Specified by:
takeSnapshot
in interfaceStorageServiceMBean
- Parameters:
tag
- the tag given to the snapshot; may not be null or emptyoptions
- Map of options (skipFlush is the only supported option for now)entities
- list of keyspaces / tables in the form of empty | ks1 ks2 ... | ks1.cf1,ks2.cf2,...- Throws:
java.io.IOException
-
takeTableSnapshot
public void takeTableSnapshot(java.lang.String keyspaceName, java.lang.String tableName, java.lang.String tag) throws java.io.IOException
Takes the snapshot of a specific table. A snapshot name must be specified.- Specified by:
takeTableSnapshot
in interfaceStorageServiceMBean
- Parameters:
keyspaceName
- the keyspace which holds the specified tabletableName
- the table to snapshottag
- the tag given to the snapshot; may not be null or empty- Throws:
java.io.IOException
-
forceKeyspaceCompactionForTokenRange
public void forceKeyspaceCompactionForTokenRange(java.lang.String keyspaceName, java.lang.String startToken, java.lang.String endToken, java.lang.String... tableNames) throws java.io.IOException, java.util.concurrent.ExecutionException, java.lang.InterruptedException
Description copied from interface:StorageServiceMBean
Forces major compaction of specified token range in a single keyspace.- Specified by:
forceKeyspaceCompactionForTokenRange
in interfaceStorageServiceMBean
- Parameters:
keyspaceName
- the name of the keyspace to be compactedstartToken
- the token at which the compaction range starts (inclusive)endToken
- the token at which compaction range ends (inclusive)tableNames
- the names of the tables to be compacted- Throws:
java.io.IOException
java.util.concurrent.ExecutionException
java.lang.InterruptedException
-
forceKeyspaceCompactionForPartitionKey
public void forceKeyspaceCompactionForPartitionKey(java.lang.String keyspaceName, java.lang.String partitionKey, java.lang.String... tableNames) throws java.io.IOException, java.util.concurrent.ExecutionException, java.lang.InterruptedException
Description copied from interface:StorageServiceMBean
Forces major compactions for the range represented by the partition key- Specified by:
forceKeyspaceCompactionForPartitionKey
in interfaceStorageServiceMBean
- Throws:
java.io.IOException
java.util.concurrent.ExecutionException
java.lang.InterruptedException
-
forceCompactionKeysIgnoringGcGrace
public void forceCompactionKeysIgnoringGcGrace(java.lang.String keyspaceName, java.lang.String tableName, java.lang.String... partitionKeysIgnoreGcGrace) throws java.io.IOException, java.util.concurrent.ExecutionException, java.lang.InterruptedException
Forces compaction for a list of partition keys in a table The method will ignore the gc_grace_seconds for the partitionKeysIgnoreGcGrace during the comapction, in order to purge the tombstones and free up space quicker.- Specified by:
forceCompactionKeysIgnoringGcGrace
in interfaceStorageServiceMBean
- Parameters:
keyspaceName
- keyspace nametableName
- table namepartitionKeysIgnoreGcGrace
- partition keys ignoring the gc_grace_seconds- Throws:
java.io.IOException
- on any I/O operation errorjava.util.concurrent.ExecutionException
- when attempting to retrieve the result of a task that aborted by throwing an exceptionjava.lang.InterruptedException
- when a thread is waiting, sleeping, or otherwise occupied, and the thread is interrupted, either before or during the activity
-
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 interfaceStorageServiceMBean
- Parameters:
tag
- the tag given to the snapshot; may not be null or emptykeyspaceNames
- the names of the keyspaces to snapshot; empty means "all."- Throws:
java.io.IOException
-
takeMultipleTableSnapshot
public void takeMultipleTableSnapshot(java.lang.String tag, java.lang.String... tableList) throws java.io.IOException
Takes the snapshot of a multiple column family from different keyspaces. A snapshot name must be specified.- Specified by:
takeMultipleTableSnapshot
in interfaceStorageServiceMBean
- Parameters:
tag
- the tag given to the snapshot; may not be null or emptytableList
- list of tables 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)
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 interfaceStorageServiceMBean
- Parameters:
tag
- name of snapshot to clear, if null or empty string, all snapshots of given keyspace will be clearedkeyspaceNames
- name of keyspaces to clear snapshots for
-
clearSnapshot
public void clearSnapshot(java.util.Map<java.lang.String,java.lang.Object> options, java.lang.String tag, java.lang.String... keyspaceNames)
Description copied from interface:StorageServiceMBean
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 interfaceStorageServiceMBean
- Parameters:
options
- map of options for cleanup operation, consult nodetool's ClearSnapshottag
- name of snapshot to clear, if null or empty string, all snapshots of given keyspace will be clearedkeyspaceNames
- name of keyspaces to clear snapshots for
-
getSnapshotDetails
public java.util.Map<java.lang.String,javax.management.openmbean.TabularData> getSnapshotDetails(java.util.Map<java.lang.String,java.lang.String> options)
Description copied from interface:StorageServiceMBean
Get the details of all the snapshots- Specified by:
getSnapshotDetails
in interfaceStorageServiceMBean
- Parameters:
options
- map of options used for filtering of snapshots- Returns:
- A map of snapshotName to all its details in Tabular form.
-
getSnapshotDetails
@Deprecated(since="4.1") public java.util.Map<java.lang.String,javax.management.openmbean.TabularData> getSnapshotDetails()
Deprecated.See CASSANDRA-16789Description copied from interface:StorageServiceMBean
Get the details of all the snapshot- Specified by:
getSnapshotDetails
in interfaceStorageServiceMBean
- 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 interfaceStorageServiceMBean
- Returns:
- True size taken by all the snapshots.
-
setSnapshotLinksPerSecond
public void setSnapshotLinksPerSecond(long throttle)
Description copied from interface:StorageServiceMBean
Set the current hardlink-per-second throttle for snapshots A setting of zero indicates no throttling- Specified by:
setSnapshotLinksPerSecond
in interfaceStorageServiceMBean
-
getSnapshotLinksPerSecond
public long getSnapshotLinksPerSecond()
Description copied from interface:StorageServiceMBean
Get the current hardlink-per-second throttle for snapshots A setting of zero indicates no throttling.- Specified by:
getSnapshotLinksPerSecond
in interfaceStorageServiceMBean
- Returns:
- snapshot links-per-second throttle
-
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 interfaceStorageServiceMBean
- Throws:
java.util.concurrent.ExecutionException
-
cleanupSizeEstimates
public void cleanupSizeEstimates()
Description copied from interface:StorageServiceMBean
Removes extraneous entries in system.size_estimates.- Specified by:
cleanupSizeEstimates
in interfaceStorageServiceMBean
-
getValidColumnFamilies
public java.lang.Iterable<ColumnFamilyStore> getValidColumnFamilies(boolean allowIndexes, boolean autoAddIndexes, java.lang.String keyspaceName, java.lang.String... cfNames)
- Parameters:
allowIndexes
- Allow index CF names to be passed inautoAddIndexes
- Automatically add secondary indexes if a CF has themkeyspaceName
- keyspacecfNames
- CFs- Throws:
java.lang.IllegalArgumentException
- when given CF name does not exist
-
forceKeyspaceFlush
public void forceKeyspaceFlush(java.lang.String keyspaceName, java.lang.String... tableNames) throws java.io.IOException
Flush all memtables for a keyspace and column families.- Specified by:
forceKeyspaceFlush
in interfaceStorageServiceMBean
- Parameters:
keyspaceName
-tableNames
-- Throws:
java.io.IOException
-
forceKeyspaceFlush
public void forceKeyspaceFlush(java.lang.String keyspaceName, ColumnFamilyStore.FlushReason reason) throws java.io.IOException
Flush all memtables for a keyspace and column families.- Parameters:
keyspaceName
-- 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 interfaceStorageServiceMBean
- Parameters:
keyspace
- Keyspace name to repair. Should not be null.repairSpec
- repair option.- Returns:
- Repair command number, or 0 if nothing to repair
-
repair
public Pair<java.lang.Integer,Future<?>> repair(java.lang.String keyspace, java.util.Map<java.lang.String,java.lang.String> repairSpec, java.util.List<ProgressListener> listeners)
-
repair
public Pair<java.lang.Integer,Future<?>> repair(java.lang.String keyspace, RepairOption option, java.util.List<ProgressListener> listeners)
-
getTokenFactory
public Token.TokenFactory getTokenFactory()
-
startRepairPaxosForTopologyChange
public Future<?> startRepairPaxosForTopologyChange(java.lang.String reason)
-
forceTerminateAllRepairSessions
public void forceTerminateAllRepairSessions()
- Specified by:
forceTerminateAllRepairSessions
in interfaceStorageServiceMBean
-
getParentRepairStatus
@Nullable public java.util.List<java.lang.String> getParentRepairStatus(int cmd)
Description copied from interface:StorageServiceMBean
Get the status of a given parent repair session.- Specified by:
getParentRepairStatus
in interfaceStorageServiceMBean
- Parameters:
cmd
- the int reference returned when issuing the repair- Returns:
- status of parent repair from enum
ActiveRepairService.ParentRepairStatus
followed by final message or messages of the session
-
setRepairSessionMaxTreeDepth
@Deprecated(since="5.0") public void setRepairSessionMaxTreeDepth(int depth)
Deprecated.See CASSANDRA-17668- Specified by:
setRepairSessionMaxTreeDepth
in interfaceStorageServiceMBean
-
getRepairSessionMaxTreeDepth
@Deprecated(since="5.0") public int getRepairSessionMaxTreeDepth()
Deprecated.See CASSANDRA-17668- Specified by:
getRepairSessionMaxTreeDepth
in interfaceStorageServiceMBean
-
setRepairSessionMaximumTreeDepth
public void setRepairSessionMaximumTreeDepth(int depth)
- Specified by:
setRepairSessionMaximumTreeDepth
in interfaceStorageServiceMBean
-
getRepairSessionMaximumTreeDepth
public int getRepairSessionMaximumTreeDepth()
- Specified by:
getRepairSessionMaximumTreeDepth
in interfaceStorageServiceMBean
-
getPrimaryRangesForEndpoint
public java.util.Collection<Range<Token>> getPrimaryRangesForEndpoint(java.lang.String keyspace, InetAddressAndPort 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 byAbstractReplicationStrategy.calculateNaturalReplicas(org.apache.cassandra.dht.Token, org.apache.cassandra.locator.TokenMetadata)
.- Parameters:
keyspace
- Keyspace name to check primary rangesep
- endpoint we are interested in.- Returns:
- primary ranges for the specified endpoint.
-
getPrimaryRangeForEndpointWithinDC
public java.util.Collection<Range<Token>> getPrimaryRangeForEndpointWithinDC(java.lang.String keyspace, InetAddressAndPort referenceEndpoint)
Get the "primary ranges" within local DC for the specified keyspace and endpoint.- Parameters:
keyspace
- Keyspace name to check primary rangesreferenceEndpoint
- endpoint we are interested in.- Returns:
- primary ranges within local DC for the specified endpoint.
- See Also:
getPrimaryRangesForEndpoint(String, InetAddressAndPort)
-
getLocalPrimaryRangeForEndpoint
public java.util.Collection<Range<Token>> getLocalPrimaryRangeForEndpoint(InetAddressAndPort referenceEndpoint)
-
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
@Deprecated(since="4.0") public java.util.List<java.net.InetAddress> getNaturalEndpoints(java.lang.String keyspaceName, java.lang.String cf, java.lang.String key)
Deprecated.See CASSANDRA-7544This method returns the N endpoints that are responsible for storing the specified key i.e for replication.- Specified by:
getNaturalEndpoints
in interfaceStorageServiceMBean
- Parameters:
keyspaceName
- keyspace name also known as keyspacecf
- Column family namekey
- key for which we need to find the endpoint- Returns:
- the endpoint responsible for this key
-
getNaturalEndpointsWithPort
public java.util.List<java.lang.String> getNaturalEndpointsWithPort(java.lang.String keyspaceName, java.lang.String cf, java.lang.String key)
- Specified by:
getNaturalEndpointsWithPort
in interfaceStorageServiceMBean
-
getNaturalEndpoints
@Deprecated(since="4.0") public java.util.List<java.net.InetAddress> getNaturalEndpoints(java.lang.String keyspaceName, java.nio.ByteBuffer key)
Deprecated.See CASSANDRA-7544- Specified by:
getNaturalEndpoints
in interfaceStorageServiceMBean
-
getNaturalEndpointsWithPort
public java.util.List<java.lang.String> getNaturalEndpointsWithPort(java.lang.String keyspaceName, java.nio.ByteBuffer key)
- Specified by:
getNaturalEndpointsWithPort
in interfaceStorageServiceMBean
-
getNaturalReplicasForToken
public EndpointsForToken getNaturalReplicasForToken(java.lang.String keyspaceName, java.lang.String cf, java.lang.String key)
-
getNaturalReplicasForToken
public EndpointsForToken getNaturalReplicasForToken(java.lang.String keyspaceName, java.nio.ByteBuffer key)
-
getKeyFromPartition
public DecoratedKey getKeyFromPartition(java.lang.String keyspaceName, java.lang.String table, java.lang.String partitionKey)
-
getToken
public java.lang.String getToken(java.lang.String keyspaceName, java.lang.String table, java.lang.String key)
- Specified by:
getToken
in interfaceStorageServiceMBean
-
isEndpointValidForWrite
public boolean isEndpointValidForWrite(java.lang.String keyspace, Token token)
-
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 interfaceStorageServiceMBean
- Parameters:
classQualifier
- The logger's classQualiferrawLevel
- 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 interfaceStorageServiceMBean
- 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(boolean force) 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 interfaceStorageServiceMBean
- Parameters:
force
- Decommission even if this will reduce N to be less than RF.- Throws:
java.lang.InterruptedException
-
prepareUnbootstrapStreaming
public java.util.function.Supplier<Future<StreamState>> prepareUnbootstrapStreaming()
-
move
public void move(java.lang.String newToken) throws java.io.IOException
- Specified by:
move
in interfaceStorageServiceMBean
- 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()
Description copied from interface:StorageServiceMBean
Get the status of a token removal.- Specified by:
getRemovalStatus
in interfaceStorageServiceMBean
-
getRemovalStatusWithPort
public java.lang.String getRemovalStatusWithPort()
- Specified by:
getRemovalStatusWithPort
in interfaceStorageServiceMBean
-
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. removeNode() must be called first, this is a last resort measure. No further attempt will be made to restore replicas.- Specified by:
forceRemoveCompletion
in interfaceStorageServiceMBean
-
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 removeNode 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 interfaceStorageServiceMBean
- Parameters:
hostIdString
- Host ID for the node
-
confirmReplication
public void confirmReplication(InetAddressAndPort 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 interfaceStorageServiceMBean
-
isStarting
public boolean isStarting()
Description copied from interface:StorageServiceMBean
Returns whether the storage service is starting or not- Specified by:
isStarting
in interfaceStorageServiceMBean
-
isMoving
public boolean isMoving()
-
isJoining
public boolean isJoining()
-
isDrained
public boolean isDrained()
- Specified by:
isDrained
in interfaceStorageServiceMBean
-
isDraining
public boolean isDraining()
- Specified by:
isDraining
in interfaceStorageServiceMBean
-
isNormal
public boolean isNormal()
-
isDecommissioned
public boolean isDecommissioned()
-
isDecommissionFailed
public boolean isDecommissionFailed()
Description copied from interface:StorageServiceMBean
Returns whether a node has failed to decommission. The fact that this method returns false does not mean that there was an attempt to decommission this node which was successful.- Specified by:
isDecommissionFailed
in interfaceStorageServiceMBean
- Returns:
- true if decommission of this node has failed, false otherwise
-
isDecommissioning
public boolean isDecommissioning()
Description copied from interface:StorageServiceMBean
Returns whether a node is being decommissioned or not.- Specified by:
isDecommissioning
in interfaceStorageServiceMBean
- Returns:
- true if this node is decommissioning, false otherwise
-
isBootstrapFailed
public boolean isBootstrapFailed()
Description copied from interface:StorageServiceMBean
Returns whether a node has failed to bootstrap. The fact that this method returns false does not mean that there was an attempt to bootstrap this node which was successful.- Specified by:
isBootstrapFailed
in interfaceStorageServiceMBean
- Returns:
- true if bootstrap of this node has failed, false otherwise
-
getDrainProgress
public java.lang.String getDrainProgress()
Description copied from interface:StorageServiceMBean
get the progress of a drain operation- Specified by:
getDrainProgress
in interfaceStorageServiceMBean
-
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.- Specified by:
drain
in interfaceStorageServiceMBean
- Throws:
java.io.IOException
java.lang.InterruptedException
java.util.concurrent.ExecutionException
-
drain
protected void drain(boolean isFinalShutdown) throws java.io.IOException, java.lang.InterruptedException, java.util.concurrent.ExecutionException
- Throws:
java.io.IOException
java.lang.InterruptedException
java.util.concurrent.ExecutionException
-
disableAutoCompaction
public void disableAutoCompaction()
-
addPreShutdownHook
public boolean addPreShutdownHook(java.lang.Runnable hook)
Add a runnable which will be called before shut down or drain. This is useful for other applications running in the same JVM which may want to shut down first rather than time out attempting to use Cassandra calls which will no longer work.- Parameters:
hook
- the code to run- Returns:
- true on success, false if Cassandra is already shutting down, in which case the runnable has NOT been added.
-
removePreShutdownHook
public boolean removePreShutdownHook(java.lang.Runnable hook)
Remove a preshutdown hook
-
addPostShutdownHook
public boolean addPostShutdownHook(java.lang.Runnable hook)
Add a runnable which will be called after shutdown or drain. This is useful for other applications running in the same JVM that Cassandra needs to work and should shut down later.- Parameters:
hook
- the code to run- Returns:
- true on success, false if Cassandra is already shutting down, in which case the runnable has NOT been added.
-
removePostShutdownHook
public boolean removePostShutdownHook(java.lang.Runnable hook)
Remove a postshutdownhook
-
setPartitionerUnsafe
public IPartitioner setPartitionerUnsafe(IPartitioner newPartitioner)
-
truncate
public void truncate(java.lang.String keyspace, java.lang.String table) throws java.util.concurrent.TimeoutException, java.io.IOException
Description copied from interface:StorageServiceMBean
Truncates (deletes) the given table from the provided keyspace. Calling truncate results in actual deletion of all data in the cluster under the given table 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 interfaceStorageServiceMBean
- Parameters:
keyspace
- The keyspace to delete fromtable
- 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 interfaceStorageServiceMBean
-
getOwnershipWithPort
public java.util.Map<java.lang.String,java.lang.Float> getOwnershipWithPort()
- Specified by:
getOwnershipWithPort
in interfaceStorageServiceMBean
-
effectiveOwnership
public java.util.LinkedHashMap<java.net.InetAddress,java.lang.Float> effectiveOwnership(java.lang.String keyspace) throws java.lang.IllegalStateException
Description copied from interface:StorageServiceMBean
Effective ownership is % of the data each node owns given the keyspace we calculate the percentage using replication factor. If Keyspace == null, this method will try to verify if all the keyspaces in the cluster have the same replication strategies and if yes then we will use the first else a empty Map is returned.- Specified by:
effectiveOwnership
in interfaceStorageServiceMBean
- Throws:
java.lang.IllegalStateException
-
effectiveOwnershipWithPort
public java.util.LinkedHashMap<java.lang.String,java.lang.Float> effectiveOwnershipWithPort(java.lang.String keyspace) throws java.lang.IllegalStateException
- Specified by:
effectiveOwnershipWithPort
in interfaceStorageServiceMBean
- Throws:
java.lang.IllegalStateException
-
getKeyspaces
public java.util.List<java.lang.String> getKeyspaces()
- Specified by:
getKeyspaces
in interfaceStorageServiceMBean
-
getNonSystemKeyspaces
public java.util.List<java.lang.String> getNonSystemKeyspaces()
- Specified by:
getNonSystemKeyspaces
in interfaceStorageServiceMBean
-
getNonLocalStrategyKeyspaces
public java.util.List<java.lang.String> getNonLocalStrategyKeyspaces()
- Specified by:
getNonLocalStrategyKeyspaces
in interfaceStorageServiceMBean
-
getViewBuildStatuses
public java.util.Map<java.lang.String,java.lang.String> getViewBuildStatuses(java.lang.String keyspace, java.lang.String view, boolean withPort)
-
getViewBuildStatuses
public java.util.Map<java.lang.String,java.lang.String> getViewBuildStatuses(java.lang.String keyspace, java.lang.String view)
- Specified by:
getViewBuildStatuses
in interfaceStorageServiceMBean
-
getViewBuildStatusesWithPort
public java.util.Map<java.lang.String,java.lang.String> getViewBuildStatusesWithPort(java.lang.String keyspace, java.lang.String view)
- Specified by:
getViewBuildStatusesWithPort
in interfaceStorageServiceMBean
-
setDynamicUpdateInterval
public void setDynamicUpdateInterval(int dynamicUpdateInterval)
- Specified by:
setDynamicUpdateInterval
in interfaceStorageServiceMBean
-
getDynamicUpdateInterval
public int getDynamicUpdateInterval()
- Specified by:
getDynamicUpdateInterval
in interfaceStorageServiceMBean
-
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. This method is used to change the snitch implementation and/or dynamic snitch parameters. IfepSnitchClassName
is specified, it will configure a new snitch instance and make it a 'dynamic snitch' ifdynamic
is specified andtrue
. The parametersdynamicUpdateInterval
,dynamicResetInterval
anddynamicBadnessThreshold
can be specified individually to update the parameters of the dynamic snitch during runtime.- Specified by:
updateSnitch
in interfaceStorageServiceMBean
- Parameters:
epSnitchClassName
- the canonical path name for a class implementing IEndpointSnitchdynamic
- boolean that decides whether dynamicsnitch is used or not - only valid, ifepSnitchClassName
is specifieddynamicUpdateInterval
- integer, in ms (defaults to the value configured in cassandra.yaml, which defaults to 100)dynamicResetInterval
- integer, in ms (defaults to the value configured in cassandra.yaml, which defaults to 600,000)dynamicBadnessThreshold
- double, (defaults to the value configured in cassandra.yaml, which defaults to 0.0)- Throws:
java.lang.ClassNotFoundException
-
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 interfaceStorageServiceMBean
-
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 interfaceStorageServiceMBean
-
rescheduleFailedDeletions
public void rescheduleFailedDeletions()
- Specified by:
rescheduleFailedDeletions
in interfaceStorageServiceMBean
-
loadNewSSTables
@Deprecated(since="4.0") public void loadNewSSTables(java.lang.String ksName, java.lang.String cfName)
Deprecated.See CASSANDRA-14417Description copied from interface:StorageServiceMBean
Load new SSTables to the given keyspace/table- Specified by:
loadNewSSTables
in interfaceStorageServiceMBean
- Parameters:
ksName
- The parent keyspace namecfName
- The ColumnFamily name where SSTables belong- See Also:
ColumnFamilyStoreMBean.loadNewSSTables()
-
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 interfaceStorageServiceMBean
- Returns:
- set of Tokens as Strings
-
samplePartitions
public java.util.Map<java.lang.String,java.util.List<javax.management.openmbean.CompositeData>> samplePartitions(int duration, int capacity, int count, java.util.List<java.lang.String> samplers) throws javax.management.openmbean.OpenDataException
- Specified by:
samplePartitions
in interfaceStorageServiceMBean
- Throws:
javax.management.openmbean.OpenDataException
-
samplePartitions
public java.util.Map<java.lang.String,java.util.List<javax.management.openmbean.CompositeData>> samplePartitions(java.lang.String keyspace, int durationMillis, int capacity, int count, java.util.List<java.lang.String> samplers) throws javax.management.openmbean.OpenDataException
- Specified by:
samplePartitions
in interfaceStorageServiceMBean
- Throws:
javax.management.openmbean.OpenDataException
-
startSamplingPartitions
public boolean startSamplingPartitions(java.lang.String ks, java.lang.String table, int duration, int interval, int capacity, int count, java.util.List<java.lang.String> samplers)
Description copied from interface:StorageServiceMBean
Start a scheduled sampling- Specified by:
startSamplingPartitions
in interfaceStorageServiceMBean
- Parameters:
ks
- Keyspace. Nullable. If null, the scheduled sampling is on all keyspaces and tablestable
- Nullable. If null, the scheduled sampling is on all tables of the specified keyspaceduration
- Duration of each scheduled sampling job in millisecondsinterval
- Interval of each scheduled sampling job in millisecondscapacity
- Capacity of the sampler, higher for more accuracycount
- Number of the top samples to listsamplers
- a list of samplers to enable- Returns:
- true if the scheduled sampling is started successfully. Otherwise return false
-
stopSamplingPartitions
public boolean stopSamplingPartitions(java.lang.String ks, java.lang.String table)
Description copied from interface:StorageServiceMBean
Stop a scheduled sampling- Specified by:
stopSamplingPartitions
in interfaceStorageServiceMBean
- Parameters:
ks
- Keyspace. Nullable. If null, the scheduled sampling is on all keysapces and tablestable
- Nullable. If null, the scheduled sampling is on all tables of the specified keyspace- Returns:
- true if the scheduled sampling is stopped. False is returned if the sampling task is not found
-
getSampleTasks
public java.util.List<java.lang.String> getSampleTasks()
- Specified by:
getSampleTasks
in interfaceStorageServiceMBean
- Returns:
- a list of qualified table names that have active scheduled sampling tasks. The format of the name is `KEYSPACE.TABLE` The wild card symbol (*) indicates all keyspace/table. For example, "*.*" indicates all tables in all keyspaces. "foo.*" indicates all tables under keyspace 'foo'. "foo.bar" indicates the scheduled sampling is enabled for the table 'bar'
-
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 interfaceStorageServiceMBean
-
resetLocalSchema
public void resetLocalSchema() throws java.io.IOException
- Specified by:
resetLocalSchema
in interfaceStorageServiceMBean
- Throws:
java.io.IOException
-
reloadLocalSchema
public void reloadLocalSchema()
- Specified by:
reloadLocalSchema
in interfaceStorageServiceMBean
-
setTraceProbability
public void setTraceProbability(double probability)
Description copied from interface:StorageServiceMBean
Enables/Disables tracing for the whole system.- Specified by:
setTraceProbability
in interfaceStorageServiceMBean
- 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 interfaceStorageServiceMBean
-
shouldTraceProbablistically
public boolean shouldTraceProbablistically()
-
disableAutoCompaction
public void disableAutoCompaction(java.lang.String ks, java.lang.String... tables) throws java.io.IOException
- Specified by:
disableAutoCompaction
in interfaceStorageServiceMBean
- Throws:
java.io.IOException
-
enableAutoCompaction
public void enableAutoCompaction(java.lang.String ks, java.lang.String... tables) throws java.io.IOException
- Specified by:
enableAutoCompaction
in interfaceStorageServiceMBean
- Throws:
java.io.IOException
-
getAutoCompactionStatus
public java.util.Map<java.lang.String,java.lang.Boolean> getAutoCompactionStatus(java.lang.String ks, java.lang.String... tables) throws java.io.IOException
- Specified by:
getAutoCompactionStatus
in interfaceStorageServiceMBean
- Throws:
java.io.IOException
-
getClusterName
public java.lang.String getClusterName()
Returns the name of the cluster- Specified by:
getClusterName
in interfaceStorageServiceMBean
-
getPartitionerName
public java.lang.String getPartitionerName()
Returns the cluster partitioner- Specified by:
getPartitionerName
in interfaceStorageServiceMBean
-
setSSTablePreemptiveOpenIntervalInMB
public void setSSTablePreemptiveOpenIntervalInMB(int intervalInMB)
Negative number for disabled- Specified by:
setSSTablePreemptiveOpenIntervalInMB
in interfaceStorageServiceMBean
-
getSSTablePreemptiveOpenIntervalInMB
public int getSSTablePreemptiveOpenIntervalInMB()
This method can return negative number for disabled- Specified by:
getSSTablePreemptiveOpenIntervalInMB
in interfaceStorageServiceMBean
-
getMigrateKeycacheOnCompaction
public boolean getMigrateKeycacheOnCompaction()
- Specified by:
getMigrateKeycacheOnCompaction
in interfaceStorageServiceMBean
-
setMigrateKeycacheOnCompaction
public void setMigrateKeycacheOnCompaction(boolean invalidateKeyCacheOnCompaction)
- Specified by:
setMigrateKeycacheOnCompaction
in interfaceStorageServiceMBean
-
getTombstoneWarnThreshold
public int getTombstoneWarnThreshold()
Description copied from interface:StorageServiceMBean
Returns the threshold for warning of queries with many tombstones- Specified by:
getTombstoneWarnThreshold
in interfaceStorageServiceMBean
-
setTombstoneWarnThreshold
public void setTombstoneWarnThreshold(int threshold)
Description copied from interface:StorageServiceMBean
Sets the threshold for warning queries with many tombstones- Specified by:
setTombstoneWarnThreshold
in interfaceStorageServiceMBean
-
getTombstoneFailureThreshold
public int getTombstoneFailureThreshold()
Description copied from interface:StorageServiceMBean
Returns the threshold for abandoning queries with many tombstones- Specified by:
getTombstoneFailureThreshold
in interfaceStorageServiceMBean
-
setTombstoneFailureThreshold
public void setTombstoneFailureThreshold(int threshold)
Description copied from interface:StorageServiceMBean
Sets the threshold for abandoning queries with many tombstones- Specified by:
setTombstoneFailureThreshold
in interfaceStorageServiceMBean
-
getCachedReplicaRowsWarnThreshold
public int getCachedReplicaRowsWarnThreshold()
Description copied from interface:StorageServiceMBean
Returns the number of rows cached at the coordinator before filtering/index queries log a warning.- Specified by:
getCachedReplicaRowsWarnThreshold
in interfaceStorageServiceMBean
-
setCachedReplicaRowsWarnThreshold
public void setCachedReplicaRowsWarnThreshold(int threshold)
Description copied from interface:StorageServiceMBean
Sets the number of rows cached at the coordinator before filtering/index queries log a warning.- Specified by:
setCachedReplicaRowsWarnThreshold
in interfaceStorageServiceMBean
-
getCachedReplicaRowsFailThreshold
public int getCachedReplicaRowsFailThreshold()
Description copied from interface:StorageServiceMBean
Returns the number of rows cached at the coordinator before filtering/index queries fail outright.- Specified by:
getCachedReplicaRowsFailThreshold
in interfaceStorageServiceMBean
-
setCachedReplicaRowsFailThreshold
public void setCachedReplicaRowsFailThreshold(int threshold)
Description copied from interface:StorageServiceMBean
Sets the number of rows cached at the coordinator before filtering/index queries fail outright.- Specified by:
setCachedReplicaRowsFailThreshold
in interfaceStorageServiceMBean
-
getColumnIndexSizeInKiB
public int getColumnIndexSizeInKiB()
Description copied from interface:StorageServiceMBean
Returns the granularity of the collation index of rows within a partition. -1 stands for the SSTable format's default.- Specified by:
getColumnIndexSizeInKiB
in interfaceStorageServiceMBean
-
setColumnIndexSizeInKiB
public void setColumnIndexSizeInKiB(int columnIndexSizeInKiB)
Description copied from interface:StorageServiceMBean
Sets the granularity of the collation index of rows within a partition. Use -1 to select the SSTable format's default.- Specified by:
setColumnIndexSizeInKiB
in interfaceStorageServiceMBean
-
setColumnIndexSize
@Deprecated(since="5.0") public void setColumnIndexSize(int columnIndexSizeInKB)
Deprecated.See CASSANDRA-17668Description copied from interface:StorageServiceMBean
Sets the granularity of the collation index of rows within a partition- Specified by:
setColumnIndexSize
in interfaceStorageServiceMBean
-
getColumnIndexCacheSize
@Deprecated(since="5.0") public int getColumnIndexCacheSize()
Deprecated.See CASSANDRA-17668Description copied from interface:StorageServiceMBean
Returns the threshold for skipping the column index when caching partition info- Specified by:
getColumnIndexCacheSize
in interfaceStorageServiceMBean
-
setColumnIndexCacheSize
@Deprecated(since="5.0") public void setColumnIndexCacheSize(int cacheSizeInKB)
Deprecated.See CASSANDRA-17668Description copied from interface:StorageServiceMBean
Sets the threshold for skipping the column index when caching partition info- Specified by:
setColumnIndexCacheSize
in interfaceStorageServiceMBean
-
getColumnIndexCacheSizeInKiB
public int getColumnIndexCacheSizeInKiB()
Description copied from interface:StorageServiceMBean
Returns the threshold for skipping the column index when caching partition info- Specified by:
getColumnIndexCacheSizeInKiB
in interfaceStorageServiceMBean
-
setColumnIndexCacheSizeInKiB
public void setColumnIndexCacheSizeInKiB(int cacheSizeInKiB)
Description copied from interface:StorageServiceMBean
Sets the threshold for skipping the column index when caching partition info- Specified by:
setColumnIndexCacheSizeInKiB
in interfaceStorageServiceMBean
-
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 interfaceStorageServiceMBean
-
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 interfaceStorageServiceMBean
-
getBatchSizeWarnThreshold
@Deprecated(since="5.0") public int getBatchSizeWarnThreshold()
Deprecated.See CASSANDRA-17668Description copied from interface:StorageServiceMBean
Returns the threshold for warning queries due to a large batch size- Specified by:
getBatchSizeWarnThreshold
in interfaceStorageServiceMBean
-
setBatchSizeWarnThreshold
@Deprecated(since="5.0") public void setBatchSizeWarnThreshold(int threshold)
Deprecated.See CASSANDRA-17668Description copied from interface:StorageServiceMBean
Sets the threshold for warning queries due to a large batch size- Specified by:
setBatchSizeWarnThreshold
in interfaceStorageServiceMBean
-
getBatchSizeWarnThresholdInKiB
public int getBatchSizeWarnThresholdInKiB()
Description copied from interface:StorageServiceMBean
Returns the threshold for warning queries due to a large batch size- Specified by:
getBatchSizeWarnThresholdInKiB
in interfaceStorageServiceMBean
-
setBatchSizeWarnThresholdInKiB
public void setBatchSizeWarnThresholdInKiB(int thresholdInKiB)
Description copied from interface:StorageServiceMBean
Sets the threshold for warning queries due to a large batch size- Specified by:
setBatchSizeWarnThresholdInKiB
in interfaceStorageServiceMBean
-
getInitialRangeTombstoneListAllocationSize
public int getInitialRangeTombstoneListAllocationSize()
Description copied from interface:StorageServiceMBean
Returns the initial allocation size of backing arrays for new RangeTombstoneList objects- Specified by:
getInitialRangeTombstoneListAllocationSize
in interfaceStorageServiceMBean
-
setInitialRangeTombstoneListAllocationSize
public void setInitialRangeTombstoneListAllocationSize(int size)
Description copied from interface:StorageServiceMBean
Sets the initial allocation size of backing arrays for new RangeTombstoneList objects- Specified by:
setInitialRangeTombstoneListAllocationSize
in interfaceStorageServiceMBean
-
getRangeTombstoneResizeListGrowthFactor
public double getRangeTombstoneResizeListGrowthFactor()
Description copied from interface:StorageServiceMBean
Returns the resize factor to use when growing/resizing a RangeTombstoneList- Specified by:
getRangeTombstoneResizeListGrowthFactor
in interfaceStorageServiceMBean
-
setRangeTombstoneListResizeGrowthFactor
public void setRangeTombstoneListResizeGrowthFactor(double growthFactor) throws java.lang.IllegalStateException
Description copied from interface:StorageServiceMBean
Sets the resize factor to use when growing/resizing a RangeTombstoneList- Specified by:
setRangeTombstoneListResizeGrowthFactor
in interfaceStorageServiceMBean
- Throws:
java.lang.IllegalStateException
-
setHintedHandoffThrottleInKB
public void setHintedHandoffThrottleInKB(int throttleInKB)
Description copied from interface:StorageServiceMBean
Sets the hinted handoff throttle in KiB per second, per delivery thread.- Specified by:
setHintedHandoffThrottleInKB
in interfaceStorageServiceMBean
-
getTransferHintsOnDecommission
public boolean getTransferHintsOnDecommission()
- Specified by:
getTransferHintsOnDecommission
in interfaceStorageServiceMBean
-
setTransferHintsOnDecommission
public void setTransferHintsOnDecommission(boolean enabled)
- Specified by:
setTransferHintsOnDecommission
in interfaceStorageServiceMBean
-
clearConnectionHistory
public void clearConnectionHistory()
Description copied from interface:StorageServiceMBean
Clears the history of clients that have connected in the past- Specified by:
clearConnectionHistory
in interfaceStorageServiceMBean
-
disableAuditLog
public void disableAuditLog()
- Specified by:
disableAuditLog
in interfaceStorageServiceMBean
-
enableAuditLog
@Deprecated(since="4.1") public void enableAuditLog(java.lang.String loggerName, java.lang.String includedKeyspaces, java.lang.String excludedKeyspaces, java.lang.String includedCategories, java.lang.String excludedCategories, java.lang.String includedUsers, java.lang.String excludedUsers) throws ConfigurationException, java.lang.IllegalStateException
Deprecated.See CASSANDRA-16725- Specified by:
enableAuditLog
in interfaceStorageServiceMBean
- Throws:
ConfigurationException
java.lang.IllegalStateException
-
enableAuditLog
public void enableAuditLog(java.lang.String loggerName, java.lang.String includedKeyspaces, java.lang.String excludedKeyspaces, java.lang.String includedCategories, java.lang.String excludedCategories, java.lang.String includedUsers, java.lang.String excludedUsers, java.lang.Integer maxArchiveRetries, java.lang.Boolean block, java.lang.String rollCycle, java.lang.Long maxLogSize, java.lang.Integer maxQueueWeight, java.lang.String archiveCommand) throws java.lang.IllegalStateException
- Specified by:
enableAuditLog
in interfaceStorageServiceMBean
- Throws:
java.lang.IllegalStateException
-
enableAuditLog
@Deprecated(since="4.1") public void enableAuditLog(java.lang.String loggerName, java.util.Map<java.lang.String,java.lang.String> parameters, java.lang.String includedKeyspaces, java.lang.String excludedKeyspaces, java.lang.String includedCategories, java.lang.String excludedCategories, java.lang.String includedUsers, java.lang.String excludedUsers) throws ConfigurationException, java.lang.IllegalStateException
Deprecated.See CASSANDRA-16725- Specified by:
enableAuditLog
in interfaceStorageServiceMBean
- Throws:
ConfigurationException
java.lang.IllegalStateException
-
enableAuditLog
public void enableAuditLog(java.lang.String loggerName, java.util.Map<java.lang.String,java.lang.String> parameters, java.lang.String includedKeyspaces, java.lang.String excludedKeyspaces, java.lang.String includedCategories, java.lang.String excludedCategories, java.lang.String includedUsers, java.lang.String excludedUsers, java.lang.Integer maxArchiveRetries, java.lang.Boolean block, java.lang.String rollCycle, java.lang.Long maxLogSize, java.lang.Integer maxQueueWeight, java.lang.String archiveCommand) throws java.lang.IllegalStateException
- Specified by:
enableAuditLog
in interfaceStorageServiceMBean
- Throws:
java.lang.IllegalStateException
-
isAuditLogEnabled
public boolean isAuditLogEnabled()
- Specified by:
isAuditLogEnabled
in interfaceStorageServiceMBean
-
getCorruptedTombstoneStrategy
public java.lang.String getCorruptedTombstoneStrategy()
- Specified by:
getCorruptedTombstoneStrategy
in interfaceStorageServiceMBean
-
setCorruptedTombstoneStrategy
public void setCorruptedTombstoneStrategy(java.lang.String strategy)
- Specified by:
setCorruptedTombstoneStrategy
in interfaceStorageServiceMBean
-
getNativeTransportMaxConcurrentRequestsInBytes
public long getNativeTransportMaxConcurrentRequestsInBytes()
- Specified by:
getNativeTransportMaxConcurrentRequestsInBytes
in interfaceStorageServiceMBean
-
setNativeTransportMaxConcurrentRequestsInBytes
public void setNativeTransportMaxConcurrentRequestsInBytes(long newLimit)
- Specified by:
setNativeTransportMaxConcurrentRequestsInBytes
in interfaceStorageServiceMBean
-
getNativeTransportMaxConcurrentRequestsInBytesPerIp
public long getNativeTransportMaxConcurrentRequestsInBytesPerIp()
- Specified by:
getNativeTransportMaxConcurrentRequestsInBytesPerIp
in interfaceStorageServiceMBean
-
setNativeTransportMaxConcurrentRequestsInBytesPerIp
public void setNativeTransportMaxConcurrentRequestsInBytesPerIp(long newLimit)
- Specified by:
setNativeTransportMaxConcurrentRequestsInBytesPerIp
in interfaceStorageServiceMBean
-
getNativeTransportMaxRequestsPerSecond
public int getNativeTransportMaxRequestsPerSecond()
- Specified by:
getNativeTransportMaxRequestsPerSecond
in interfaceStorageServiceMBean
-
setNativeTransportMaxRequestsPerSecond
public void setNativeTransportMaxRequestsPerSecond(int newPerSecond)
- Specified by:
setNativeTransportMaxRequestsPerSecond
in interfaceStorageServiceMBean
-
setNativeTransportRateLimitingEnabled
public void setNativeTransportRateLimitingEnabled(boolean enabled)
- Specified by:
setNativeTransportRateLimitingEnabled
in interfaceStorageServiceMBean
-
getNativeTransportRateLimitingEnabled
public boolean getNativeTransportRateLimitingEnabled()
- Specified by:
getNativeTransportRateLimitingEnabled
in interfaceStorageServiceMBean
-
isOutOfTokenRangeRequestLoggingEnabled
public boolean isOutOfTokenRangeRequestLoggingEnabled()
Description copied from interface:StorageServiceMBean
Toggles to turn on the logging or rejection of operations for token ranges that the node does not own, or is not about to acquire.- Specified by:
isOutOfTokenRangeRequestLoggingEnabled
in interfaceStorageServiceMBean
-
setOutOfTokenRangeRequestLoggingEnabled
public void setOutOfTokenRangeRequestLoggingEnabled(boolean enabled)
- Specified by:
setOutOfTokenRangeRequestLoggingEnabled
in interfaceStorageServiceMBean
-
isOutOfTokenRangeRequestRejectionEnabled
public boolean isOutOfTokenRangeRequestRejectionEnabled()
- Specified by:
isOutOfTokenRangeRequestRejectionEnabled
in interfaceStorageServiceMBean
-
setOutOfTokenRangeRequestRejectionEnabled
public void setOutOfTokenRangeRequestRejectionEnabled(boolean enabled)
- Specified by:
setOutOfTokenRangeRequestRejectionEnabled
in interfaceStorageServiceMBean
-
shutdownServer
public void shutdownServer()
-
enableFullQueryLogger
public void enableFullQueryLogger(java.lang.String path, java.lang.String rollCycle, java.lang.Boolean blocking, int maxQueueWeight, long maxLogSize, java.lang.String archiveCommand, int maxArchiveRetries)
Description copied from interface:StorageServiceMBean
Start the fully query logger.- Specified by:
enableFullQueryLogger
in interfaceStorageServiceMBean
- Parameters:
path
- Path where the full query log will be stored. If null cassandra.yaml value is used.rollCycle
- How often to create a new file for query data (MINUTELY, DAILY, HOURLY)blocking
- Whether threads submitting queries to the query log should block if they can't be drained to the filesystem or alternatively drops samples and logmaxQueueWeight
- How many bytes of query data to queue before blocking or dropping samplesmaxLogSize
- How many bytes of log data to store before dropping segments. Might not be respected if a log file hasn't rolled so it can be deleted.archiveCommand
- executable archiving the rolled log files,maxArchiveRetries
- max number of times to retry a failing archive command
-
resetFullQueryLogger
public void resetFullQueryLogger()
Description copied from interface:StorageServiceMBean
Disable the full query logger if it is enabled. Also delete any generated files in the last used full query log path as well as the one configure in cassandra.yaml- Specified by:
resetFullQueryLogger
in interfaceStorageServiceMBean
-
stopFullQueryLogger
public void stopFullQueryLogger()
Description copied from interface:StorageServiceMBean
Stop logging queries but leave any generated files on disk.- Specified by:
stopFullQueryLogger
in interfaceStorageServiceMBean
-
isFullQueryLogEnabled
public boolean isFullQueryLogEnabled()
- Specified by:
isFullQueryLogEnabled
in interfaceStorageServiceMBean
-
getFullQueryLoggerOptions
public javax.management.openmbean.CompositeData getFullQueryLoggerOptions()
Description copied from interface:StorageServiceMBean
Returns the current state of FQL.- Specified by:
getFullQueryLoggerOptions
in interfaceStorageServiceMBean
-
getOutstandingSchemaVersions
public java.util.Map<java.lang.String,java.util.Set<java.net.InetAddress>> getOutstandingSchemaVersions()
Description copied from interface:StorageServiceMBean
Returns a map of schema version -> list of endpoints reporting that version that we need schema updates for- Specified by:
getOutstandingSchemaVersions
in interfaceStorageServiceMBean
-
getOutstandingSchemaVersionsWithPort
public java.util.Map<java.lang.String,java.util.Set<java.lang.String>> getOutstandingSchemaVersionsWithPort()
- Specified by:
getOutstandingSchemaVersionsWithPort
in interfaceStorageServiceMBean
-
autoOptimiseIncRepairStreams
public boolean autoOptimiseIncRepairStreams()
- Specified by:
autoOptimiseIncRepairStreams
in interfaceStorageServiceMBean
-
setAutoOptimiseIncRepairStreams
public void setAutoOptimiseIncRepairStreams(boolean enabled)
- Specified by:
setAutoOptimiseIncRepairStreams
in interfaceStorageServiceMBean
-
autoOptimiseFullRepairStreams
public boolean autoOptimiseFullRepairStreams()
- Specified by:
autoOptimiseFullRepairStreams
in interfaceStorageServiceMBean
-
setAutoOptimiseFullRepairStreams
public void setAutoOptimiseFullRepairStreams(boolean enabled)
- Specified by:
setAutoOptimiseFullRepairStreams
in interfaceStorageServiceMBean
-
autoOptimisePreviewRepairStreams
public boolean autoOptimisePreviewRepairStreams()
- Specified by:
autoOptimisePreviewRepairStreams
in interfaceStorageServiceMBean
-
setAutoOptimisePreviewRepairStreams
public void setAutoOptimisePreviewRepairStreams(boolean enabled)
- Specified by:
setAutoOptimisePreviewRepairStreams
in interfaceStorageServiceMBean
-
getTableCountWarnThreshold
@Deprecated(since="4.1") public int getTableCountWarnThreshold()
Deprecated.See CASSANDRA-17195- Specified by:
getTableCountWarnThreshold
in interfaceStorageServiceMBean
-
setTableCountWarnThreshold
@Deprecated(since="4.1") public void setTableCountWarnThreshold(int value)
Deprecated.See CASSANDRA-17195- Specified by:
setTableCountWarnThreshold
in interfaceStorageServiceMBean
-
getKeyspaceCountWarnThreshold
@Deprecated(since="4.1") public int getKeyspaceCountWarnThreshold()
Deprecated.See CASSANDRA-17195- Specified by:
getKeyspaceCountWarnThreshold
in interfaceStorageServiceMBean
-
setKeyspaceCountWarnThreshold
@Deprecated(since="4.1") public void setKeyspaceCountWarnThreshold(int value)
Deprecated.See CASSANDRA-17195- Specified by:
setKeyspaceCountWarnThreshold
in interfaceStorageServiceMBean
-
setCompactionTombstoneWarningThreshold
public void setCompactionTombstoneWarningThreshold(int count)
- Specified by:
setCompactionTombstoneWarningThreshold
in interfaceStorageServiceMBean
-
getCompactionTombstoneWarningThreshold
public int getCompactionTombstoneWarningThreshold()
- Specified by:
getCompactionTombstoneWarningThreshold
in interfaceStorageServiceMBean
-
addSnapshot
public void addSnapshot(TableSnapshot snapshot)
-
getReadThresholdsEnabled
public boolean getReadThresholdsEnabled()
- Specified by:
getReadThresholdsEnabled
in interfaceStorageServiceMBean
-
setReadThresholdsEnabled
public void setReadThresholdsEnabled(boolean value)
- Specified by:
setReadThresholdsEnabled
in interfaceStorageServiceMBean
-
getCoordinatorLargeReadWarnThreshold
public java.lang.String getCoordinatorLargeReadWarnThreshold()
- Specified by:
getCoordinatorLargeReadWarnThreshold
in interfaceStorageServiceMBean
-
setCoordinatorLargeReadWarnThreshold
public void setCoordinatorLargeReadWarnThreshold(java.lang.String threshold)
- Specified by:
setCoordinatorLargeReadWarnThreshold
in interfaceStorageServiceMBean
-
getCoordinatorLargeReadAbortThreshold
public java.lang.String getCoordinatorLargeReadAbortThreshold()
- Specified by:
getCoordinatorLargeReadAbortThreshold
in interfaceStorageServiceMBean
-
setCoordinatorLargeReadAbortThreshold
public void setCoordinatorLargeReadAbortThreshold(java.lang.String threshold)
- Specified by:
setCoordinatorLargeReadAbortThreshold
in interfaceStorageServiceMBean
-
getLocalReadTooLargeWarnThreshold
public java.lang.String getLocalReadTooLargeWarnThreshold()
- Specified by:
getLocalReadTooLargeWarnThreshold
in interfaceStorageServiceMBean
-
setLocalReadTooLargeWarnThreshold
public void setLocalReadTooLargeWarnThreshold(java.lang.String threshold)
- Specified by:
setLocalReadTooLargeWarnThreshold
in interfaceStorageServiceMBean
-
getLocalReadTooLargeAbortThreshold
public java.lang.String getLocalReadTooLargeAbortThreshold()
- Specified by:
getLocalReadTooLargeAbortThreshold
in interfaceStorageServiceMBean
-
setLocalReadTooLargeAbortThreshold
public void setLocalReadTooLargeAbortThreshold(java.lang.String threshold)
- Specified by:
setLocalReadTooLargeAbortThreshold
in interfaceStorageServiceMBean
-
getRowIndexReadSizeWarnThreshold
public java.lang.String getRowIndexReadSizeWarnThreshold()
- Specified by:
getRowIndexReadSizeWarnThreshold
in interfaceStorageServiceMBean
-
setRowIndexReadSizeWarnThreshold
public void setRowIndexReadSizeWarnThreshold(java.lang.String threshold)
- Specified by:
setRowIndexReadSizeWarnThreshold
in interfaceStorageServiceMBean
-
getRowIndexReadSizeAbortThreshold
public java.lang.String getRowIndexReadSizeAbortThreshold()
- Specified by:
getRowIndexReadSizeAbortThreshold
in interfaceStorageServiceMBean
-
setRowIndexReadSizeAbortThreshold
public void setRowIndexReadSizeAbortThreshold(java.lang.String threshold)
- Specified by:
setRowIndexReadSizeAbortThreshold
in interfaceStorageServiceMBean
-
setDefaultKeyspaceReplicationFactor
public void setDefaultKeyspaceReplicationFactor(int value)
- Specified by:
setDefaultKeyspaceReplicationFactor
in interfaceStorageServiceMBean
-
getDefaultKeyspaceReplicationFactor
public int getDefaultKeyspaceReplicationFactor()
- Specified by:
getDefaultKeyspaceReplicationFactor
in interfaceStorageServiceMBean
-
getSkipPaxosRepairOnTopologyChange
public boolean getSkipPaxosRepairOnTopologyChange()
- Specified by:
getSkipPaxosRepairOnTopologyChange
in interfaceStorageServiceMBean
-
setSkipPaxosRepairOnTopologyChange
public void setSkipPaxosRepairOnTopologyChange(boolean v)
- Specified by:
setSkipPaxosRepairOnTopologyChange
in interfaceStorageServiceMBean
-
getSkipPaxosRepairOnTopologyChangeKeyspaces
public java.lang.String getSkipPaxosRepairOnTopologyChangeKeyspaces()
- Specified by:
getSkipPaxosRepairOnTopologyChangeKeyspaces
in interfaceStorageServiceMBean
-
setSkipPaxosRepairOnTopologyChangeKeyspaces
public void setSkipPaxosRepairOnTopologyChangeKeyspaces(java.lang.String v)
- Specified by:
setSkipPaxosRepairOnTopologyChangeKeyspaces
in interfaceStorageServiceMBean
-
getPaxosAutoRepairsEnabled
public boolean getPaxosAutoRepairsEnabled()
- Specified by:
getPaxosAutoRepairsEnabled
in interfaceStorageServiceMBean
-
setPaxosAutoRepairsEnabled
public void setPaxosAutoRepairsEnabled(boolean enabled)
- Specified by:
setPaxosAutoRepairsEnabled
in interfaceStorageServiceMBean
-
getPaxosStateFlushEnabled
public boolean getPaxosStateFlushEnabled()
- Specified by:
getPaxosStateFlushEnabled
in interfaceStorageServiceMBean
-
setPaxosStateFlushEnabled
public void setPaxosStateFlushEnabled(boolean enabled)
- Specified by:
setPaxosStateFlushEnabled
in interfaceStorageServiceMBean
-
getPaxosAutoRepairTables
public java.util.List<java.lang.String> getPaxosAutoRepairTables()
- Specified by:
getPaxosAutoRepairTables
in interfaceStorageServiceMBean
-
getPaxosPurgeGraceSeconds
public long getPaxosPurgeGraceSeconds()
- Specified by:
getPaxosPurgeGraceSeconds
in interfaceStorageServiceMBean
-
setPaxosPurgeGraceSeconds
public void setPaxosPurgeGraceSeconds(long v)
- Specified by:
setPaxosPurgeGraceSeconds
in interfaceStorageServiceMBean
-
getPaxosOnLinearizabilityViolations
public java.lang.String getPaxosOnLinearizabilityViolations()
- Specified by:
getPaxosOnLinearizabilityViolations
in interfaceStorageServiceMBean
-
setPaxosOnLinearizabilityViolations
public void setPaxosOnLinearizabilityViolations(java.lang.String v)
- Specified by:
setPaxosOnLinearizabilityViolations
in interfaceStorageServiceMBean
-
getPaxosStatePurging
public java.lang.String getPaxosStatePurging()
- Specified by:
getPaxosStatePurging
in interfaceStorageServiceMBean
-
setPaxosStatePurging
public void setPaxosStatePurging(java.lang.String v)
- Specified by:
setPaxosStatePurging
in interfaceStorageServiceMBean
-
getPaxosRepairEnabled
public boolean getPaxosRepairEnabled()
- Specified by:
getPaxosRepairEnabled
in interfaceStorageServiceMBean
-
setPaxosRepairEnabled
public void setPaxosRepairEnabled(boolean enabled)
- Specified by:
setPaxosRepairEnabled
in interfaceStorageServiceMBean
-
getPaxosDcLocalCommitEnabled
public boolean getPaxosDcLocalCommitEnabled()
- Specified by:
getPaxosDcLocalCommitEnabled
in interfaceStorageServiceMBean
-
setPaxosDcLocalCommitEnabled
public void setPaxosDcLocalCommitEnabled(boolean enabled)
- Specified by:
setPaxosDcLocalCommitEnabled
in interfaceStorageServiceMBean
-
getPaxosBallotLowBound
public java.lang.String getPaxosBallotLowBound(java.lang.String ksName, java.lang.String tblName, java.lang.String key)
- Specified by:
getPaxosBallotLowBound
in interfaceStorageServiceMBean
-
getRepairRpcTimeout
public java.lang.Long getRepairRpcTimeout()
- Specified by:
getRepairRpcTimeout
in interfaceStorageServiceMBean
-
setRepairRpcTimeout
public void setRepairRpcTimeout(java.lang.Long timeoutInMillis)
- Specified by:
setRepairRpcTimeout
in interfaceStorageServiceMBean
-
evictHungRepairs
public void evictHungRepairs()
- Specified by:
evictHungRepairs
in interfaceStorageServiceMBean
-
clearPaxosRepairs
public void clearPaxosRepairs()
- Specified by:
clearPaxosRepairs
in interfaceStorageServiceMBean
-
setSkipPaxosRepairCompatibilityCheck
public void setSkipPaxosRepairCompatibilityCheck(boolean v)
- Specified by:
setSkipPaxosRepairCompatibilityCheck
in interfaceStorageServiceMBean
-
getSkipPaxosRepairCompatibilityCheck
public boolean getSkipPaxosRepairCompatibilityCheck()
- Specified by:
getSkipPaxosRepairCompatibilityCheck
in interfaceStorageServiceMBean
-
topPartitionsEnabled
public boolean topPartitionsEnabled()
- Specified by:
topPartitionsEnabled
in interfaceStorageServiceMBean
-
getMaxTopSizePartitionCount
public int getMaxTopSizePartitionCount()
- Specified by:
getMaxTopSizePartitionCount
in interfaceStorageServiceMBean
-
setMaxTopSizePartitionCount
public void setMaxTopSizePartitionCount(int value)
- Specified by:
setMaxTopSizePartitionCount
in interfaceStorageServiceMBean
-
getMaxTopTombstonePartitionCount
public int getMaxTopTombstonePartitionCount()
- Specified by:
getMaxTopTombstonePartitionCount
in interfaceStorageServiceMBean
-
setMaxTopTombstonePartitionCount
public void setMaxTopTombstonePartitionCount(int value)
- Specified by:
setMaxTopTombstonePartitionCount
in interfaceStorageServiceMBean
-
getMinTrackedPartitionSize
public java.lang.String getMinTrackedPartitionSize()
- Specified by:
getMinTrackedPartitionSize
in interfaceStorageServiceMBean
-
setMinTrackedPartitionSize
public void setMinTrackedPartitionSize(java.lang.String value)
- Specified by:
setMinTrackedPartitionSize
in interfaceStorageServiceMBean
-
getMinTrackedPartitionTombstoneCount
public long getMinTrackedPartitionTombstoneCount()
- Specified by:
getMinTrackedPartitionTombstoneCount
in interfaceStorageServiceMBean
-
setMinTrackedPartitionTombstoneCount
public void setMinTrackedPartitionTombstoneCount(long value)
- Specified by:
setMinTrackedPartitionTombstoneCount
in interfaceStorageServiceMBean
-
setSkipStreamDiskSpaceCheck
public void setSkipStreamDiskSpaceCheck(boolean value)
- Specified by:
setSkipStreamDiskSpaceCheck
in interfaceStorageServiceMBean
-
getSkipStreamDiskSpaceCheck
public boolean getSkipStreamDiskSpaceCheck()
- Specified by:
getSkipStreamDiskSpaceCheck
in interfaceStorageServiceMBean
-
removeNotificationListener
public void removeNotificationListener(javax.management.NotificationListener listener) throws javax.management.ListenerNotFoundException
- Specified by:
removeNotificationListener
in interfacejavax.management.NotificationBroadcaster
- Overrides:
removeNotificationListener
in classjavax.management.NotificationBroadcasterSupport
- Throws:
javax.management.ListenerNotFoundException
-
removeNotificationListener
public void removeNotificationListener(javax.management.NotificationListener listener, javax.management.NotificationFilter filter, java.lang.Object handback) throws javax.management.ListenerNotFoundException
- Specified by:
removeNotificationListener
in interfacejavax.management.NotificationEmitter
- Overrides:
removeNotificationListener
in classjavax.management.NotificationBroadcasterSupport
- Throws:
javax.management.ListenerNotFoundException
-
addNotificationListener
public void addNotificationListener(javax.management.NotificationListener listener, javax.management.NotificationFilter filter, java.lang.Object handback) throws java.lang.IllegalArgumentException
- Specified by:
addNotificationListener
in interfacejavax.management.NotificationBroadcaster
- Overrides:
addNotificationListener
in classjavax.management.NotificationBroadcasterSupport
- Throws:
java.lang.IllegalArgumentException
-
getNativeTransportQueueMaxItemAgeThreshold
public double getNativeTransportQueueMaxItemAgeThreshold()
- Specified by:
getNativeTransportQueueMaxItemAgeThreshold
in interfaceStorageServiceMBean
-
setNativeTransportQueueMaxItemAgeThreshold
public void setNativeTransportQueueMaxItemAgeThreshold(double threshold)
- Specified by:
setNativeTransportQueueMaxItemAgeThreshold
in interfaceStorageServiceMBean
-
getNativeTransportMinBackoffOnQueueOverloadInMillis
public long getNativeTransportMinBackoffOnQueueOverloadInMillis()
- Specified by:
getNativeTransportMinBackoffOnQueueOverloadInMillis
in interfaceStorageServiceMBean
-
getNativeTransportMaxBackoffOnQueueOverloadInMillis
public long getNativeTransportMaxBackoffOnQueueOverloadInMillis()
- Specified by:
getNativeTransportMaxBackoffOnQueueOverloadInMillis
in interfaceStorageServiceMBean
-
setNativeTransportBackoffOnQueueOverloadInMillis
public void setNativeTransportBackoffOnQueueOverloadInMillis(long min, long max)
- Specified by:
setNativeTransportBackoffOnQueueOverloadInMillis
in interfaceStorageServiceMBean
-
getNativeTransportThrowOnOverload
public boolean getNativeTransportThrowOnOverload()
- Specified by:
getNativeTransportThrowOnOverload
in interfaceStorageServiceMBean
-
setNativeTransportThrowOnOverload
public void setNativeTransportThrowOnOverload(boolean throwOnOverload)
- Specified by:
setNativeTransportThrowOnOverload
in interfaceStorageServiceMBean
-
getNativeTransportTimeoutMillis
public long getNativeTransportTimeoutMillis()
- Specified by:
getNativeTransportTimeoutMillis
in interfaceStorageServiceMBean
-
setNativeTransportTimeoutMillis
public void setNativeTransportTimeoutMillis(long deadlineMillis)
- Specified by:
setNativeTransportTimeoutMillis
in interfaceStorageServiceMBean
-
getEnforceNativeDeadlineForHints
public boolean getEnforceNativeDeadlineForHints()
- Specified by:
getEnforceNativeDeadlineForHints
in interfaceStorageServiceMBean
-
setEnforceNativeDeadlineForHints
public void setEnforceNativeDeadlineForHints(boolean value)
- Specified by:
setEnforceNativeDeadlineForHints
in interfaceStorageServiceMBean
-
-