Package org.apache.cassandra.service
Interface StorageServiceMBean
- All Superinterfaces:
NotificationBroadcaster,NotificationEmitter
- All Known Implementing Classes:
StorageService
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic classGets the concurrency settings for processing stages -
Method Summary
Modifier and TypeMethodDescriptionbooleanbooleanbooleanvoidStarts a bulk load and blocks until it completes.bulkLoadAsync(String directory) Starts a bulk load asynchronously and returns the String representation of the planID for the new streaming session.voidvoidRemoves extraneous entries in system.size_estimates.voidClears the history of clients that have connected in the pastvoidvoidclearSnapshot(String tag, String... keyspaceNames) Deprecated.See CASSANDRA-16860voidRemove the snapshot with the given name from the given keyspaces.voiddecommission(boolean force) transfer this node's data to other machines and remove it from service.voiddeliverHints(String host) describeRingJMX(String keyspace) Deprecated.See CASSANDRA-7544describeRingWithPortJMX(String keyspace) voidvoiddisableAutoCompaction(String ks, String... tables) voidvoiddrain()makes node unavailable for writes, flushes memtables and replays commitlog.voiddropPreparedStatements(boolean memoryOnly) effectiveOwnership(String keyspace) Deprecated.See CASSANDRA-7544effectiveOwnershipWithPort(String keyspace) voidenableAuditLog(String loggerName, String includedKeyspaces, String excludedKeyspaces, String includedCategories, String excludedCategories, String includedUsers, String excludedUsers) Deprecated.See CASSANDRA-16725voidenableAuditLog(String loggerName, String includedKeyspaces, String excludedKeyspaces, String includedCategories, String excludedCategories, String includedUsers, String excludedUsers, Integer maxArchiveRetries, Boolean block, String rollCycle, Long maxLogSize, Integer maxQueueWeight, String archiveCommand) voidenableAuditLog(String loggerName, Map<String, String> parameters, String includedKeyspaces, String excludedKeyspaces, String includedCategories, String excludedCategories, String includedUsers, String excludedUsers) Deprecated.See CASSANDRA-16725voidenableAuditLog(String loggerName, Map<String, String> parameters, String includedKeyspaces, String excludedKeyspaces, String includedCategories, String excludedCategories, String includedUsers, String excludedUsers, Integer maxArchiveRetries, Boolean block, String rollCycle, Long maxLogSize, Integer maxQueueWeight, String archiveCommand) voidenableAutoCompaction(String ks, String... tables) voidenableFullQueryLogger(String path, String rollCycle, Boolean blocking, int maxQueueWeight, long maxLogSize, String archiveCommand, int maxArchiveRetries) Start the fully query logger.voidvoidvoidvoidforceCompactionKeysIgnoringGcGrace(String keyspaceName, String tableName, String... partitionKeysIgnoreGcGrace) Forces compaction for a list of partition keys on a table.intforceKeyspaceCleanup(int jobs, String keyspaceName, String... tables) intforceKeyspaceCleanup(String keyspaceName, String... tables) Deprecated.See CASSANDRA-11179voidforceKeyspaceCompaction(boolean splitOutput, String keyspaceName, String... tableNames) Forces major compaction of a single keyspacevoidforceKeyspaceCompactionForPartitionKey(String keyspaceName, String partitionKey, String... tableNames) Forces major compactions for the range represented by the partition keyvoidforceKeyspaceCompactionForTokenRange(String keyspaceName, String startToken, String endToken, String... tableNames) Forces major compaction of specified token range in a single keyspace.voidforceKeyspaceFlush(String keyspaceName, String... tableNames) Flush all memtables for the given column families, or all columnfamilies for the given keyspace if none are explicitly listed.voidForce a remove operation to finish.voidintgarbageCollect(String tombstoneOption, int jobs, String keyspaceName, String... tableNames) Rewrites all sstables from the given tables to remove deleted data.String[]Get the list of all data file locations from confgetAutoCompactionStatus(String ks, String... tables) intintReturns the threshold for rejecting queries due to a large batch sizeintDeprecated.use getBatchSizeWarnThresholdInKiB instead.intReturns the threshold for warning queries due to a large batch sizeintReturns the number of rows cached at the coordinator before filtering/index queries fail outright.intReturns the number of rows cached at the coordinator before filtering/index queries log a warning.longReturns the name of the clusterintDeprecated.use getColumnIndexCacheSizeInKiB.intReturns the threshold for skipping the column index when caching partition infointReturns the granularity of the collation index of rows within a partition.Get location of the commit logintDeprecated.Use getCompactionThroughtputMibPerSecAsDouble instead as this one will provide a rounded value.longdoubleintDeprecated.See CASSANDRA-17194intgetConcurrency(List<String> stageNames) intintintintlongintReturn the generation value for this node.intget the progress of a drain operationintDeprecated.See CASSANDRA-7544booleandoubledoublebooleanReturns the current state of FQL.Fetch a string representation of the Cassandra git SHA.Deprecated.See CASSANDRA-7544intReturns the initial allocation size of backing arrays for new RangeTombstoneList objectsintDeprecated.Use getInterDCStreamThroughputMbitPerSecAsDouble instead as this one will provide a rounded value.doubleintDeprecated.Use getInterDCStreamThroughputMebibytesPerSecAsDouble instead as this one will provide a rounded value.intBelow method returns Inter_dc_stream_throughput_outbound rounded, for precise number, please, use getInterDCStreamThroughputMebibytesPerSecAsDoubledoubleintintintbooleanDeprecated.See CASSANDRA-7544intDeprecated.See CASSANDRA-17195getKeyspaceReplicationInfo(String keyspaceName) Fetch the replication factor for a given keyspace.Deprecated.See CASSANDRA-7544Deprecated.See CASSANDRA-7544Deprecated.See CASSANDRA-7544Human-readable load valueRetrieve this hosts unique IDString[]Returns the locations where the local system keyspaces data should be stored.get the runtime logging levelsintReturns upper bound on the hint ttlintintbooleanlongDeprecated.See CASSANDRA-7544longlonglongintlongdoublebooleanbooleanlonggetNaturalEndpoints(String keyspaceName, String cf, String key) Deprecated.See CASSANDRA-7544getNaturalEndpoints(String keyspaceName, ByteBuffer key) Deprecated.See CASSANDRA-7544getNaturalEndpointsWithPort(String keyspaceName, String cf, String key) getNaturalEndpointsWithPort(String keysapceName, ByteBuffer key) String[]Returns the locations where should be stored the non system keyspaces data.get the operational mode (leaving, joining, normal, decommissioned, client)Get the per-keyspace counts of operations that the node has received for tokens outside its owned ranges.Deprecated.See CASSANDRA-17668Deprecated.See CASSANDRA-7544getParentRepairStatus(int cmd) Get the status of a given parent repair session.Returns the cluster partitionerbooleangetPaxosBallotLowBound(String keyspace, String table, String key) booleanlongbooleanbooleanbooleangetPendingRangeToEndpointMap(String keyspace) Deprecated.See CASSANDRA-7544getPendingRangeToEndpointWithPortMap(String keyspace) booleanlonggetRangeToEndpointMap(String keyspace) Deprecated.See CASSANDRA-7544getRangeToEndpointWithPortMap(String keyspace) doubleReturns the resize factor to use when growing/resizing a RangeTombstoneListgetRangeToNativeaddressWithPortMap(String keyspace) getRangeToRpcaddressMap(String keyspace) Deprecated.See CASSANDRA-7544longbooleanFetch a string representation of the Cassandra version.Deprecated.See CASSANDRA-7544intintDeprecated.use getRepairSessionMaximumTreeDepth instead.longGet location of the saved caches dirFetch a string representation of the current Schema version.booleanbooleanbooleanDeprecated.See CASSANDRA-16789getSnapshotDetails(Map<String, String> options) Get the details of all the snapshotslongGet the current hardlink-per-second throttle for snapshots A setting of zero indicates no throttling.intintDeprecated.Use getStreamThroughputMbitPerSecAsDouble instead as this one will provide a rounded value.doubleintDeprecated.Use getStreamThroughputMebibytesPerSecAsDouble instead as this one will provide a rounded value.intBelow method returns stream_throughput_outbound rounded, for precise number, please, use getStreamThroughputMebibytesPerSecAsDoubledoubleintDeprecated.See CASSANDRA-17195getTablesForKeyspace(String keyspace) Gets the names of all tables for the given keyspaceFetch string representations of the tokens for this node.Fetch string representations of the tokens for a specified node.Deprecated.See CASSANDRA-7544intReturns the threshold for abandoning queries with many tombstonesintReturns the threshold for warning of queries with many tombstonesdoubleReturns the configured tracing probability.booleanlongHuman-readable uncompressed load valueDeprecated.See CASSANDRA-7544getViewBuildStatuses(String keyspace, String view) Deprecated.See CASSANDRA-7544getViewBuildStatusesWithPort(String keyspace, String view) longbooleanbooleanReturns whether a node has failed to bootstrap.booleanCheck if currently bootstrapping.booleanbooleanReturns whether a node has failed to decommission.booleanReturns whether a node is being decommissioned or not.booleanbooleanbooleanbooleanbooleanReturns whether we are using the creation time of the mutation for determining hint ttlbooleanbooleanbooleanisJoined()booleanbooleanToggles to turn on the logging or rejection of operations for token ranges that the node does not own, or is not about to acquire.booleanbooleanReturns whether the storage service is starting or notvoidjoinRing()voidloadNewSSTables(String ksName, String tableName) Deprecated.See CASSANDRA-14417voidmutateSSTableRepairedState(boolean repaired, boolean preview, String keyspace, List<String> tables) Mutates the repaired state of all SSTables for the given SSTablesvoidInitiate a process of streaming data for which we are responsible from other nodes.voidSame asrebuild(String), but only for specified keyspace and ranges.voidrebuild(String sourceDc, String keyspace, String tokens, String specificSources, boolean excludeLocalDatacenterNodes) Same asrebuild(String), but only for specified keyspace and ranges.voidrebuildSecondaryIndex(String ksName, String cfName, String... idxNames) rebuild the specified indexesintrecompressSSTables(String keyspaceName, int jobs, String... tableNames) voidForces refresh of values stored in system.size_estimates of all column families.voidintrelocateSSTables(int jobs, String keyspace, String... cfnames) intrelocateSSTables(String keyspace, String... cfnames) Deprecated.See CASSANDRA-11179voidremoveNode(String token) removeToken removes token (and all data associated with enpoint that had it) from the ringintrepairAsync(String keyspace, Map<String, String> options) Invoke repair asynchronously.voidvoidDisable the full query logger if it is enabled.voidbooleanResume bootstrap streaming when there is failed data streaming.Return a List of Tokens representing a sample of keys across all ColumnFamilyStores.samplePartitions(int duration, int capacity, int count, List<String> samplers) samplePartitions(String keyspace, int duration, int capacity, int count, List<String> samplers) intscrub(boolean disableSnapshot, boolean skipCorrupted, boolean checkData, boolean reinsertOverflowedTTL, int jobs, String keyspaceName, String... columnFamilies) default intscrub(boolean disableSnapshot, boolean skipCorrupted, boolean checkData, int jobs, String keyspaceName, String... columnFamilies) Deprecated.See CASSANDRA-14092default intscrub(boolean disableSnapshot, boolean skipCorrupted, boolean checkData, String keyspaceName, String... tableNames) Deprecated.See CASSANDRA-11179voidsetAutoOptimiseFullRepairStreams(boolean enabled) voidsetAutoOptimiseIncRepairStreams(boolean enabled) voidsetAutoOptimisePreviewRepairStreams(boolean enabled) voidsetBatchlogEndpointStrategy(String batchlogEndpointStrategy) SeeConfig.BatchlogEndpointStrategyfor valid values.voidsetBatchlogReplayThrottleInKB(int value) voidsetBatchSizeFailureThreshold(int batchSizeDebugThreshold) Sets the threshold for rejecting queries due to a large batch sizevoidsetBatchSizeWarnThreshold(int batchSizeDebugThreshold) Deprecated.use setBatchSizeWarnThresholdInKiB instead as it will not throw non-standard exceptions.voidsetBatchSizeWarnThresholdInKiB(int batchSizeDebugThreshold) Sets the threshold for warning queries due to a large batch sizevoidsetCachedReplicaRowsFailThreshold(int threshold) Sets the number of rows cached at the coordinator before filtering/index queries fail outright.voidsetCachedReplicaRowsWarnThreshold(int threshold) Sets the number of rows cached at the coordinator before filtering/index queries log a warning.voidsetCasContentionTimeout(long value) voidsetColumnIndexCacheSize(int cacheSizeInKB) Deprecated.use setColumnIndexCacheSizeInKiB instead as it will not throw non-standard exceptions.voidsetColumnIndexCacheSizeInKiB(int cacheSizeInKiB) Sets the threshold for skipping the column index when caching partition infovoidsetColumnIndexSize(int columnIndexSizeInKB) Deprecated.use setColumnIndexSizeInKiB instead as it will not throw non-standard exceptions.voidsetColumnIndexSizeInKiB(int columnIndexSizeInKiB) Sets the granularity of the collation index of rows within a partition.voidsetCompactionThroughputMbPerSec(int value) voidsetCompactionTombstoneWarningThreshold(int count) Deprecated.See CASSANDRA-17194voidsetCompressedReadAheadBufferInKB(int sizeInKb) voidsetConcurrency(String threadPoolName, int newCorePoolSize, int newMaximumPoolSize) Sets the concurrency setting for processing stagesvoidsetConcurrentCompactors(int value) voidsetConcurrentIndexBuilders(int value) voidsetConcurrentValidators(int value) voidsetConcurrentViewBuilders(int value) voidsetCoordinatorLargeReadAbortThreshold(String threshold) voidsetCoordinatorLargeReadWarnThreshold(String threshold) voidsetCorruptedTombstoneStrategy(String strategy) voidsetCounterWriteRpcTimeout(long value) voidsetDefaultKeyspaceReplicationFactor(int value) voidsetDynamicUpdateInterval(int dynamicUpdateInterval) voidsetEnforceNativeDeadlineForHints(boolean value) voidvoidvoidsetForceOptimizedIndexStatusFormat(boolean value) voidsetHintedHandoffThrottleInKB(int throttleInKB) Sets the hinted handoff throttle in KiB per second, per delivery thread.voidsetIncrementalBackupsEnabled(boolean value) voidSets the initial allocation size of backing arrays for new RangeTombstoneList objectsvoidsetInterDCStreamThroughputMbitPerSec(int value) voidsetInterDCStreamThroughputMbPerSec(int value) Deprecated.See CASSANDRA-15234voidsetInterDCStreamThroughputMebibytesPerSec(int value) voidsetInternodeStreamingTcpUserTimeoutInMS(int value) voidsetInternodeTcpConnectTimeoutInMS(int value) voidsetInternodeTcpUserTimeoutInMS(int value) voidsetInvalidateKeycacheOnSSTableDeletion(boolean invalidate) voidsetKeyspaceCountWarnThreshold(int value) Deprecated.See CASSANDRA-17195voidvoidvoidsetLoggingLevel(String classQualifier, String level) 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
voidsetMaxHintTTL(int maxHintTTL) Sets the upper bound on the hint ttlvoidsetMaxTopSizePartitionCount(int value) voidsetMaxTopTombstonePartitionCount(int value) voidsetMigrateKeycacheOnCompaction(boolean invalidateKeyCacheOnCompaction) voidsetMinTrackedPartitionSize(String value) voidsetMinTrackedPartitionTombstoneCount(long value) voidsetNativeTransportBackoffOnQueueOverloadInMillis(long min, long max) voidsetNativeTransportMaxConcurrentRequestsInBytes(long newLimit) voidsetNativeTransportMaxConcurrentRequestsInBytesPerIp(long newLimit) voidsetNativeTransportMaxRequestsPerSecond(int newPerSecond) voidsetNativeTransportQueueMaxItemAgeThreshold(double threshold) voidsetNativeTransportRateLimitingEnabled(boolean enabled) voidsetNativeTransportThrowOnOverload(boolean throwOnOverload) voidsetNativeTransportTimeoutMillis(long deadlineMillis) voidsetOutOfTokenRangeRequestLoggingEnabled(boolean enabled) voidsetOutOfTokenRangeRequestRejectionEnabled(boolean enabled) voidsetPaxosAutoRepairsEnabled(boolean enabled) voidsetPaxosDcLocalCommitEnabled(boolean v) voidvoidsetPaxosPurgeGraceSeconds(long v) voidsetPaxosRepairEnabled(boolean v) voidsetPaxosRepairRaceWait(boolean paxosRepairCoordinatorWait) voidsetPaxosStateFlushEnabled(boolean enabled) voidvoidsetPrioritizeSAIOverLegacyIndex(boolean value) voidsetRangeRpcTimeout(long value) voidsetRangeTombstoneListResizeGrowthFactor(double growthFactor) Sets the resize factor to use when growing/resizing a RangeTombstoneListvoidsetReadRpcTimeout(long value) voidsetReadThresholdsEnabled(boolean value) voidsetRepairRpcTimeout(Long timeoutInMillis) voidsetRepairSessionMaximumTreeDepth(int depth) voidsetRepairSessionMaxTreeDepth(int depth) Deprecated.use setRepairSessionMaximumTreeDepth instead as it will not throw non-standard exceptions.voidvoidvoidsetRpcTimeout(long value) voidsetSkipPaxosRepairCompatibilityCheck(boolean v) voidsetSkipPaxosRepairOnTopologyChange(boolean v) voidvoidsetSkipStreamDiskSpaceCheck(boolean value) voidsetSnapshotLinksPerSecond(long throttle) Set the current hardlink-per-second throttle for snapshots A setting of zero indicates no throttlingvoidsetSSTablePreemptiveOpenIntervalInMB(int intervalInMB) voidsetStreamThroughputMbitPerSec(int value) voidsetStreamThroughputMbPerSec(int value) Deprecated.See CASSANDRA-15234voidsetStreamThroughputMebibytesPerSec(int value) voidsetTableCountWarnThreshold(int value) Deprecated.See CASSANDRA-17195voidsetTombstoneFailureThreshold(int tombstoneDebugThreshold) Sets the threshold for abandoning queries with many tombstonesvoidsetTombstoneWarnThreshold(int tombstoneDebugThreshold) Sets the threshold for warning queries with many tombstonesvoidsetTraceProbability(double probability) Enables/Disables tracing for the whole system.voidsetTransferHintsOnDecommission(boolean enabled) voidsetTruncateRpcTimeout(long value) voidsetUseCreationTimeForHintTtl(boolean enabled) Sets whether we are using the creation time of the mutation for determining hint ttlvoidsetWriteRpcTimeout(long value) voidvoidbooleanstartSamplingPartitions(String ks, String table, int duration, int interval, int capacity, int count, List<String> samplers) Start a scheduled samplingvoidvoidStop logging queries but leave any generated files on disk.voiddefault voidDeprecated.voidstopNativeTransport(boolean force) booleanstopSamplingPartitions(String ks, String table) Stop a scheduled samplingvoidtakeMultipleTableSnapshot(String tag, String... tableList) Deprecated.voidtakeSnapshot(String tag, String... keyspaceNames) Deprecated.voidTakes the snapshot of a multiple column family from different keyspaces.voidtakeTableSnapshot(String keyspaceName, String tableName, String tag) Deprecated.booleanlongGet the true size taken by all snapshots across all keyspaces.voidTruncates (deletes) the given table from the provided keyspace.voidupdateSnitch(String epSnitchClassName, Boolean dynamic, Integer dynamicUpdateInterval, Integer dynamicResetInterval, Double dynamicBadnessThreshold) Change endpointsnitch class and dynamic-ness (and dynamic attributes) at runtime.default intupgradeSSTables(String keyspaceName, boolean excludeCurrentVersion, int jobs, String... tableNames) Deprecated.See CASSANDRA-16837intupgradeSSTables(String keyspaceName, boolean excludeCurrentVersion, long maxSSTableTimestamp, int jobs, String... tableNames) intupgradeSSTables(String keyspaceName, boolean excludeCurrentVersion, String... tableNames) Deprecated.See CASSANDRA-11179intverify(boolean extendedVerify, boolean checkVersion, boolean diskFailurePolicy, boolean mutateRepairStatus, boolean checkOwnsTokens, boolean quick, String keyspaceName, String... tableNames) intVerify (checksums of) the given keyspace.Methods inherited from interface javax.management.NotificationBroadcaster
addNotificationListener, getNotificationInfo, removeNotificationListenerMethods inherited from interface javax.management.NotificationEmitter
removeNotificationListener
-
Method Details
-
getLiveNodes
Deprecated.See CASSANDRA-7544Retrieve the list of live nodes in the cluster, where "liveness" is determined by the failure detector of the node being queried.- Returns:
- set of IP addresses, as Strings
-
getLiveNodesWithPort
-
getUnreachableNodes
Deprecated.See CASSANDRA-7544Retrieve the list of unreachable nodes in the cluster, as determined by this node's failure detector.- Returns:
- set of IP addresses, as Strings
-
getUnreachableNodesWithPort
-
getJoiningNodes
Deprecated.See CASSANDRA-7544Retrieve the list of nodes currently bootstrapping into the ring.- Returns:
- set of IP addresses, as Strings
-
getJoiningNodesWithPort
-
getLeavingNodes
Deprecated.See CASSANDRA-7544Retrieve the list of nodes currently leaving the ring.- Returns:
- set of IP addresses, as Strings
-
getLeavingNodesWithPort
-
getMovingNodes
Deprecated.See CASSANDRA-7544Retrieve the list of nodes currently moving in the ring.- Returns:
- set of IP addresses, as Strings
-
getMovingNodesWithPort
-
getTokens
Fetch string representations of the tokens for this node.- Returns:
- a collection of tokens formatted as strings
-
getTokens
Fetch string representations of the tokens for a specified node.- Parameters:
endpoint- string representation of an node- Returns:
- a collection of tokens formatted as strings
- Throws:
UnknownHostException
-
getReleaseVersion
String getReleaseVersion()Fetch a string representation of the Cassandra version.- Returns:
- A string representation of the Cassandra version.
-
getGitSHA
String getGitSHA()Fetch a string representation of the Cassandra git SHA.- Returns:
- A string representation of the Cassandra git SHA.
-
getSchemaVersion
String getSchemaVersion()Fetch a string representation of the current Schema version.- Returns:
- A string representation of the Schema version.
-
getKeyspaceReplicationInfo
Fetch the replication factor for a given keyspace.- Returns:
- An integer that represents replication factor for the given keyspace.
-
getAllDataFileLocations
String[] getAllDataFileLocations()Get the list of all data file locations from conf- Returns:
- String array of all locations
-
getLocalSystemKeyspacesDataFileLocations
String[] getLocalSystemKeyspacesDataFileLocations()Returns the locations where the local system keyspaces data should be stored.- Returns:
- the locations where the local system keyspaces data should be stored
-
getNonLocalSystemKeyspacesDataFileLocations
String[] getNonLocalSystemKeyspacesDataFileLocations()Returns the locations where should be stored the non system keyspaces data.- Returns:
- the locations where should be stored the non system keyspaces data
-
getCommitLogLocation
String getCommitLogLocation()Get location of the commit log- Returns:
- a string path
-
getSavedCachesLocation
String getSavedCachesLocation()Get location of the saved caches dir- Returns:
- a string path
-
getRangeToEndpointMap
Deprecated.See CASSANDRA-7544Retrieve a map of range to end points that describe the ring topology of a Cassandra cluster.- Returns:
- mapping of ranges to end points
-
getRangeToEndpointWithPortMap
-
getRangeToRpcaddressMap
Deprecated.See CASSANDRA-7544Retrieve a map of range to rpc addresses that describe the ring topology of a Cassandra cluster.- Returns:
- mapping of ranges to rpc addresses
-
getRangeToNativeaddressWithPortMap
-
describeRingJMX
Deprecated.See CASSANDRA-7544The same asdescribeRing(String)but converts TokenRange to the String for JMX compatibility- Parameters:
keyspace- The keyspace to fetch information about- Returns:
- a List of TokenRange(s) converted to String for the given keyspace
- Throws:
IOException
-
describeRingWithPortJMX
- Throws:
IOException
-
getPendingRangeToEndpointMap
@Deprecated(since="4.0") Map<List<String>,List<String>> getPendingRangeToEndpointMap(String keyspace) Deprecated.See CASSANDRA-7544Retrieve a map of pending ranges to endpoints that describe the ring topology- Parameters:
keyspace- the keyspace to get the pending range map for.- Returns:
- a map of pending ranges to endpoints
-
getPendingRangeToEndpointWithPortMap
-
getTokenToEndpointMap
Deprecated.See CASSANDRA-7544Retrieve a map of tokens to endpoints, including the bootstrapping ones.- Returns:
- a map of tokens to endpoints in ascending order
-
getTokenToEndpointWithPortMap
-
getLocalHostId
String getLocalHostId()Retrieve this hosts unique ID -
getEndpointToHostId
Deprecated.See CASSANDRA-7544Retrieve the mapping of endpoint to host ID. -
getEndpointWithPortToHostId
-
getHostIdToEndpoint
Deprecated.See CASSANDRA-7544Retrieve the mapping of host ID to endpoint. -
getHostIdToEndpointWithPort
-
getLoadString
String getLoadString()Human-readable load value -
getUncompressedLoadString
String getUncompressedLoadString()Human-readable uncompressed load value -
getLoadMap
Deprecated.See CASSANDRA-7544Human-readable load value. Keys are IP addresses. -
getLoadMapWithPort
-
getCurrentGenerationNumber
int getCurrentGenerationNumber()Return the generation value for this node.- Returns:
- generation number
-
getNaturalEndpoints
@Deprecated(since="4.0") List<InetAddress> getNaturalEndpoints(String keyspaceName, String cf, String key) Deprecated.See CASSANDRA-7544This method returns the N endpoints that are responsible for storing the specified key i.e for replication.- Parameters:
keyspaceName- keyspace namecf- Column family namekey- - key for which we need to find the endpoint return value - the endpoint responsible for this key
-
getNaturalEndpointsWithPort
-
getNaturalEndpoints
Deprecated.See CASSANDRA-7544 -
getNaturalEndpointsWithPort
-
takeSnapshot
Deprecated.usetakeSnapshot(String tag, Map options, String...entities)instead. See CASSANDRA-10907- Throws:
IOException
-
takeTableSnapshot
@Deprecated(since="3.4") void takeTableSnapshot(String keyspaceName, String tableName, String tag) throws IOException Deprecated.usetakeSnapshot(String tag, Map options, String...entities)instead. See CASSANDRA-10907- Throws:
IOException
-
takeMultipleTableSnapshot
@Deprecated(since="3.4") void takeMultipleTableSnapshot(String tag, String... tableList) throws IOException Deprecated.usetakeSnapshot(String tag, Map options, String...entities)instead. See CASSANDRA-10907- Throws:
IOException
-
takeSnapshot
Takes the snapshot of a multiple column family from different keyspaces. A snapshot name must be specified.- 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:
IOException
-
clearSnapshot
Deprecated.See CASSANDRA-16860Remove the snapshot with the given name from the given keyspaces. If no tag is specified we will remove all snapshots.- 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- Throws:
IOException
-
clearSnapshot
void clearSnapshot(Map<String, Object> options, String tag, String... keyspaceNames) throws IOExceptionRemove the snapshot with the given name from the given keyspaces. If no tag is specified we will remove all snapshots.- 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- Throws:
IOException
-
getSnapshotDetails
Deprecated.See CASSANDRA-16789Get the details of all the snapshot- Returns:
- A map of snapshotName to all its details in Tabular form.
-
getSnapshotDetails
Get the details of all the snapshots- Parameters:
options- map of options used for filtering of snapshots- Returns:
- A map of snapshotName to all its details in Tabular form.
-
trueSnapshotsSize
long trueSnapshotsSize()Get the true size taken by all snapshots across all keyspaces.- Returns:
- True size taken by all the snapshots.
-
setSnapshotLinksPerSecond
void setSnapshotLinksPerSecond(long throttle) Set the current hardlink-per-second throttle for snapshots A setting of zero indicates no throttling- Parameters:
throttle-
-
getSnapshotLinksPerSecond
long getSnapshotLinksPerSecond()Get the current hardlink-per-second throttle for snapshots A setting of zero indicates no throttling.- Returns:
- snapshot links-per-second throttle
-
refreshSizeEstimates
Forces refresh of values stored in system.size_estimates of all column families.- Throws:
ExecutionException
-
cleanupSizeEstimates
void cleanupSizeEstimates()Removes extraneous entries in system.size_estimates. -
forceKeyspaceCompaction
void forceKeyspaceCompaction(boolean splitOutput, String keyspaceName, String... tableNames) throws IOException, ExecutionException, InterruptedException Forces major compaction of a single keyspace -
relocateSSTables
@Deprecated(since="3.5") int relocateSSTables(String keyspace, String... cfnames) throws IOException, ExecutionException, InterruptedException Deprecated.See CASSANDRA-11179 -
relocateSSTables
int relocateSSTables(int jobs, String keyspace, String... cfnames) throws IOException, ExecutionException, InterruptedException -
forceKeyspaceCompactionForTokenRange
void forceKeyspaceCompactionForTokenRange(String keyspaceName, String startToken, String endToken, String... tableNames) throws IOException, ExecutionException, InterruptedException Forces major compaction of specified token range in a single keyspace.- 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:
IOExceptionExecutionExceptionInterruptedException
-
forceKeyspaceCompactionForPartitionKey
void forceKeyspaceCompactionForPartitionKey(String keyspaceName, String partitionKey, String... tableNames) throws IOException, ExecutionException, InterruptedException Forces major compactions for the range represented by the partition key -
forceCompactionKeysIgnoringGcGrace
void forceCompactionKeysIgnoringGcGrace(String keyspaceName, String tableName, String... partitionKeysIgnoreGcGrace) throws IOException, ExecutionException, InterruptedException Forces compaction for a list of partition keys on 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. -
forceKeyspaceCleanup
@Deprecated(since="3.5") int forceKeyspaceCleanup(String keyspaceName, String... tables) throws IOException, ExecutionException, InterruptedException Deprecated.See CASSANDRA-11179Trigger a cleanup of keys on a single keyspace -
forceKeyspaceCleanup
int forceKeyspaceCleanup(int jobs, String keyspaceName, String... tables) throws IOException, ExecutionException, InterruptedException -
scrub
@Deprecated(since="3.5") default int scrub(boolean disableSnapshot, boolean skipCorrupted, boolean checkData, String keyspaceName, String... tableNames) throws IOException, ExecutionException, InterruptedException Deprecated.See CASSANDRA-11179Scrub (deserialize + reserialize at the latest version, skipping bad rows if any) the given keyspace. If tableNames array is empty, all CFs are scrubbed. Scrubbed CFs will be snapshotted first, if disableSnapshot is false -
scrub
@Deprecated(since="3.11") default int scrub(boolean disableSnapshot, boolean skipCorrupted, boolean checkData, int jobs, String keyspaceName, String... columnFamilies) throws IOException, ExecutionException, InterruptedException Deprecated.See CASSANDRA-14092 -
scrub
int scrub(boolean disableSnapshot, boolean skipCorrupted, boolean checkData, boolean reinsertOverflowedTTL, int jobs, String keyspaceName, String... columnFamilies) throws IOException, ExecutionException, InterruptedException -
verify
int verify(boolean extendedVerify, String keyspaceName, String... tableNames) throws IOException, ExecutionException, InterruptedException 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 -
verify
int verify(boolean extendedVerify, boolean checkVersion, boolean diskFailurePolicy, boolean mutateRepairStatus, boolean checkOwnsTokens, boolean quick, String keyspaceName, String... tableNames) throws IOException, ExecutionException, InterruptedException -
upgradeSSTables
@Deprecated(since="3.5") int upgradeSSTables(String keyspaceName, boolean excludeCurrentVersion, String... tableNames) throws IOException, ExecutionException, InterruptedException Deprecated.See CASSANDRA-11179Rewrite all sstables to the latest version. Unlike scrub, it doesn't skip bad rows and do not snapshot sstables first. -
upgradeSSTables
@Deprecated(since="4.1") default int upgradeSSTables(String keyspaceName, boolean excludeCurrentVersion, int jobs, String... tableNames) throws IOException, ExecutionException, InterruptedException Deprecated.See CASSANDRA-16837 -
upgradeSSTables
int upgradeSSTables(String keyspaceName, boolean excludeCurrentVersion, long maxSSTableTimestamp, int jobs, String... tableNames) throws IOException, ExecutionException, InterruptedException -
recompressSSTables
int recompressSSTables(String keyspaceName, int jobs, String... tableNames) throws IOException, ExecutionException, InterruptedException -
garbageCollect
int garbageCollect(String tombstoneOption, int jobs, String keyspaceName, String... tableNames) throws IOException, ExecutionException, InterruptedException 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. -
forceKeyspaceFlush
void forceKeyspaceFlush(String keyspaceName, String... tableNames) throws IOException, ExecutionException, InterruptedException Flush all memtables for the given column families, or all columnfamilies for the given keyspace if none are explicitly listed.- Parameters:
keyspaceName-tableNames-- Throws:
IOExceptionExecutionExceptionInterruptedException
-
repairAsync
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- Parameters:
keyspace- Keyspace name to repair. Should not be null.options- repair option.- Returns:
- Repair command number, or 0 if nothing to repair
-
forceTerminateAllRepairSessions
void forceTerminateAllRepairSessions() -
setRepairSessionMaxTreeDepth
Deprecated.use setRepairSessionMaximumTreeDepth instead as it will not throw non-standard exceptions. See CASSANDRA-17668 -
getRepairSessionMaxTreeDepth
Deprecated.use getRepairSessionMaximumTreeDepth instead. See CASSANDRA-17668 -
setRepairSessionMaximumTreeDepth
void setRepairSessionMaximumTreeDepth(int depth) -
getRepairSessionMaximumTreeDepth
int getRepairSessionMaximumTreeDepth() -
getParentRepairStatus
Get the status of a given parent repair session.- Parameters:
cmd- the int reference returned when issuing the repair- Returns:
- status of parent repair from enum
ActiveRepairService.ParentRepairStatusfollowed by final message or messages of the session
-
decommission
transfer this node's data to other machines and remove it from service.- Parameters:
force- Decommission even if this will reduce N to be less than RF.- Throws:
InterruptedException
-
isDecommissionFailed
boolean isDecommissionFailed()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.- Returns:
- true if decommission of this node has failed, false otherwise
-
isDecommissioning
boolean isDecommissioning()Returns whether a node is being decommissioned or not.- Returns:
- true if this node is decommissioning, false otherwise
-
move
- Parameters:
newToken- token to move this node to. This node will unload its data onto its neighbors, and bootstrap to the new token.- Throws:
IOException
-
removeNode
removeToken removes token (and all data associated with enpoint that had it) from the ring -
getRemovalStatus
Deprecated.See CASSANDRA-7544Get the status of a token removal. -
getRemovalStatusWithPort
String getRemovalStatusWithPort() -
forceRemoveCompletion
void forceRemoveCompletion()Force a remove operation to finish. -
setLoggingLevel
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
- Parameters:
classQualifier- The logger's classQualiferlevel- The log level- Throws:
Exception- See Also:
-
Level.toLevel(String)
-
getLoggingLevels
get the runtime logging levels -
getOperationMode
String getOperationMode()get the operational mode (leaving, joining, normal, decommissioned, client) -
isStarting
boolean isStarting()Returns whether the storage service is starting or not -
getDrainProgress
String getDrainProgress()get the progress of a drain operation -
drain
makes node unavailable for writes, flushes memtables and replays commitlog. -
truncate
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.- Parameters:
keyspace- The keyspace to delete fromtable- The column family to delete data from.- Throws:
TimeoutExceptionIOException
-
getOwnership
Deprecated.See CASSANDRA-7544given a list of tokens (representing the nodes in the cluster), returns a mapping from"token -> %age of cluster owned by that token" -
getOwnershipWithPort
-
effectiveOwnership
@Deprecated(since="4.0") Map<InetAddress,Float> effectiveOwnership(String keyspace) throws IllegalStateException Deprecated.See CASSANDRA-7544Effective 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.- Throws:
IllegalStateException
-
effectiveOwnershipWithPort
- Throws:
IllegalStateException
-
getKeyspaces
-
getNonSystemKeyspaces
-
getNonLocalStrategyKeyspaces
-
getViewBuildStatuses
Deprecated.See CASSANDRA-7544 -
getViewBuildStatusesWithPort
-
updateSnitch
void updateSnitch(String epSnitchClassName, Boolean dynamic, Integer dynamicUpdateInterval, Integer dynamicResetInterval, Double dynamicBadnessThreshold) throws ClassNotFoundException 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. IfepSnitchClassNameis specified, it will configure a new snitch instance and make it a 'dynamic snitch' ifdynamicis specified andtrue. The parametersdynamicUpdateInterval,dynamicResetIntervalanddynamicBadnessThresholdcan be specified individually to update the parameters of the dynamic snitch during runtime.- Parameters:
epSnitchClassName- the canonical path name for a class implementing IEndpointSnitchdynamic- boolean that decides whether dynamicsnitch is used or not - only valid, ifepSnitchClassNameis 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:
ClassNotFoundException
-
setDynamicUpdateInterval
void setDynamicUpdateInterval(int dynamicUpdateInterval) -
getDynamicUpdateInterval
int getDynamicUpdateInterval() -
getBatchlogEndpointStrategy
String getBatchlogEndpointStrategy() -
setBatchlogEndpointStrategy
SeeConfig.BatchlogEndpointStrategyfor valid values. -
stopGossiping
void stopGossiping() -
startGossiping
void startGossiping() -
isGossipRunning
boolean isGossipRunning() -
stopDaemon
void stopDaemon() -
isInitialized
boolean isInitialized() -
stopNativeTransport
Deprecated. -
stopNativeTransport
void stopNativeTransport(boolean force) -
startNativeTransport
void startNativeTransport() -
isNativeTransportRunning
boolean isNativeTransportRunning() -
enableNativeTransportOldProtocolVersions
void enableNativeTransportOldProtocolVersions() -
disableNativeTransportOldProtocolVersions
void disableNativeTransportOldProtocolVersions() -
getNativeTransportMaxConcurrentRequestsInBytes
long getNativeTransportMaxConcurrentRequestsInBytes() -
setNativeTransportMaxConcurrentRequestsInBytes
void setNativeTransportMaxConcurrentRequestsInBytes(long newLimit) -
getNativeTransportMaxConcurrentRequestsInBytesPerIp
long getNativeTransportMaxConcurrentRequestsInBytesPerIp() -
setNativeTransportMaxConcurrentRequestsInBytesPerIp
void setNativeTransportMaxConcurrentRequestsInBytesPerIp(long newLimit) -
getNativeTransportMaxRequestsPerSecond
int getNativeTransportMaxRequestsPerSecond() -
setNativeTransportMaxRequestsPerSecond
void setNativeTransportMaxRequestsPerSecond(int newPerSecond) -
setNativeTransportRateLimitingEnabled
void setNativeTransportRateLimitingEnabled(boolean enabled) -
getNativeTransportRateLimitingEnabled
boolean getNativeTransportRateLimitingEnabled() -
joinRing
- Throws:
IOException
-
isJoined
boolean isJoined() -
isDrained
boolean isDrained() -
isDraining
boolean isDraining() -
isBootstrapMode
boolean isBootstrapMode()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.- Returns:
- True prior to bootstrap streaming completing. False prior to start of bootstrap and post streaming.
-
isBootstrapFailed
boolean isBootstrapFailed()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.- Returns:
- true if bootstrap of this node has failed, false otherwise
-
setRpcTimeout
void setRpcTimeout(long value) -
getRpcTimeout
long getRpcTimeout() -
setReadRpcTimeout
void setReadRpcTimeout(long value) -
getReadRpcTimeout
long getReadRpcTimeout() -
setRangeRpcTimeout
void setRangeRpcTimeout(long value) -
getRangeRpcTimeout
long getRangeRpcTimeout() -
setWriteRpcTimeout
void setWriteRpcTimeout(long value) -
getWriteRpcTimeout
long getWriteRpcTimeout() -
setInternodeTcpConnectTimeoutInMS
void setInternodeTcpConnectTimeoutInMS(int value) -
getInternodeTcpConnectTimeoutInMS
int getInternodeTcpConnectTimeoutInMS() -
setInternodeTcpUserTimeoutInMS
void setInternodeTcpUserTimeoutInMS(int value) -
getInternodeTcpUserTimeoutInMS
int getInternodeTcpUserTimeoutInMS() -
setInternodeStreamingTcpUserTimeoutInMS
void setInternodeStreamingTcpUserTimeoutInMS(int value) -
getInternodeStreamingTcpUserTimeoutInMS
int getInternodeStreamingTcpUserTimeoutInMS() -
setCounterWriteRpcTimeout
void setCounterWriteRpcTimeout(long value) -
getCounterWriteRpcTimeout
long getCounterWriteRpcTimeout() -
setCasContentionTimeout
void setCasContentionTimeout(long value) -
getCasContentionTimeout
long getCasContentionTimeout() -
setTruncateRpcTimeout
void setTruncateRpcTimeout(long value) -
getTruncateRpcTimeout
long getTruncateRpcTimeout() -
setStreamThroughputMbitPerSec
void setStreamThroughputMbitPerSec(int value) -
getStreamThroughputMbitPerSec
Deprecated.Use getStreamThroughputMbitPerSecAsDouble instead as this one will provide a rounded value. See CASSANDRA-17225- Returns:
- stream_throughput_outbound in megabits
-
getStreamThroughputMbitPerSecAsDouble
double getStreamThroughputMbitPerSecAsDouble() -
setStreamThroughputMbPerSec
Deprecated.See CASSANDRA-15234 -
getStreamThroughputMbPerSec
Deprecated.Use getStreamThroughputMebibytesPerSecAsDouble instead as this one will provide a rounded value. See CASSANDRA-15234- Returns:
- stream_throughput_outbound in MiB
-
setStreamThroughputMebibytesPerSec
void setStreamThroughputMebibytesPerSec(int value) -
getStreamThroughputMebibytesPerSec
int getStreamThroughputMebibytesPerSec()Below method returns stream_throughput_outbound rounded, for precise number, please, use getStreamThroughputMebibytesPerSecAsDouble- Returns:
- stream_throughput_outbound in MiB
-
getStreamThroughputMebibytesPerSecAsDouble
double getStreamThroughputMebibytesPerSecAsDouble() -
setInterDCStreamThroughputMbitPerSec
void setInterDCStreamThroughputMbitPerSec(int value) -
getInterDCStreamThroughputMbitPerSec
Deprecated.Use getInterDCStreamThroughputMbitPerSecAsDouble instead as this one will provide a rounded value. See CASSANDRA-17225- Returns:
- inter_dc_stream_throughput_outbound in megabits
-
getInterDCStreamThroughputMbitPerSecAsDouble
double getInterDCStreamThroughputMbitPerSecAsDouble() -
setInterDCStreamThroughputMbPerSec
Deprecated.See CASSANDRA-15234 -
getInterDCStreamThroughputMbPerSec
Deprecated.Use getInterDCStreamThroughputMebibytesPerSecAsDouble instead as this one will provide a rounded value. See CASSANDRA-15234- Returns:
- inter_dc_stream_throughput_outbound in MiB
-
setInterDCStreamThroughputMebibytesPerSec
void setInterDCStreamThroughputMebibytesPerSec(int value) -
getInterDCStreamThroughputMebibytesPerSec
int getInterDCStreamThroughputMebibytesPerSec()Below method returns Inter_dc_stream_throughput_outbound rounded, for precise number, please, use getInterDCStreamThroughputMebibytesPerSecAsDouble- Returns:
- inter_dc_stream_throughput_outbound in MiB
-
getInterDCStreamThroughputMebibytesPerSecAsDouble
double getInterDCStreamThroughputMebibytesPerSecAsDouble() -
setEntireSSTableStreamThroughputMebibytesPerSec
void setEntireSSTableStreamThroughputMebibytesPerSec(int value) -
getEntireSSTableStreamThroughputMebibytesPerSecAsDouble
double getEntireSSTableStreamThroughputMebibytesPerSecAsDouble() -
setEntireSSTableInterDCStreamThroughputMebibytesPerSec
void setEntireSSTableInterDCStreamThroughputMebibytesPerSec(int value) -
getEntireSSTableInterDCStreamThroughputMebibytesPerSecAsDouble
double getEntireSSTableInterDCStreamThroughputMebibytesPerSecAsDouble() -
getCompactionThroughtputMibPerSecAsDouble
double getCompactionThroughtputMibPerSecAsDouble() -
getCompactionThroughtputBytesPerSec
long getCompactionThroughtputBytesPerSec() -
getCompactionThroughputMbPerSec
Deprecated.Use getCompactionThroughtputMibPerSecAsDouble instead as this one will provide a rounded value. See CASSANDRA-17225- Returns:
- compaction_throughgput in MiB
-
setCompactionThroughputMbPerSec
void setCompactionThroughputMbPerSec(int value) -
getCompressedReadAheadBufferInKB
int getCompressedReadAheadBufferInKB() -
setCompressedReadAheadBufferInKB
void setCompressedReadAheadBufferInKB(int sizeInKb) -
getBatchlogReplayThrottleInKB
int getBatchlogReplayThrottleInKB() -
setBatchlogReplayThrottleInKB
void setBatchlogReplayThrottleInKB(int value) -
getConcurrentCompactors
int getConcurrentCompactors() -
setConcurrentCompactors
void setConcurrentCompactors(int value) -
bypassConcurrentValidatorsLimit
void bypassConcurrentValidatorsLimit() -
enforceConcurrentValidatorsLimit
void enforceConcurrentValidatorsLimit() -
isConcurrentValidatorsLimitEnforced
boolean isConcurrentValidatorsLimitEnforced() -
getConcurrentIndexBuilders
int getConcurrentIndexBuilders() -
setConcurrentIndexBuilders
void setConcurrentIndexBuilders(int value) -
getConcurrentValidators
int getConcurrentValidators() -
setConcurrentValidators
void setConcurrentValidators(int value) -
getSSTablePreemptiveOpenIntervalInMB
int getSSTablePreemptiveOpenIntervalInMB() -
setSSTablePreemptiveOpenIntervalInMB
void setSSTablePreemptiveOpenIntervalInMB(int intervalInMB) -
getMigrateKeycacheOnCompaction
boolean getMigrateKeycacheOnCompaction() -
setMigrateKeycacheOnCompaction
void setMigrateKeycacheOnCompaction(boolean invalidateKeyCacheOnCompaction) -
getInvalidateKeycacheOnSSTableDeletion
boolean getInvalidateKeycacheOnSSTableDeletion() -
setInvalidateKeycacheOnSSTableDeletion
void setInvalidateKeycacheOnSSTableDeletion(boolean invalidate) -
getConcurrentViewBuilders
int getConcurrentViewBuilders() -
setConcurrentViewBuilders
void setConcurrentViewBuilders(int value) -
isIncrementalBackupsEnabled
boolean isIncrementalBackupsEnabled() -
setIncrementalBackupsEnabled
void setIncrementalBackupsEnabled(boolean value) -
rebuild
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.- Parameters:
sourceDc- Name of DC from which to select sources for streaming or null to pick any node
-
rebuild
Same asrebuild(String), but only for specified keyspace and ranges.- 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
void rebuild(String sourceDc, String keyspace, String tokens, String specificSources, boolean excludeLocalDatacenterNodes) Same asrebuild(String), but only for specified keyspace and ranges. It excludes local data center nodes- 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.
-
bulkLoad
Starts a bulk load and blocks until it completes. -
bulkLoadAsync
Starts a bulk load asynchronously and returns the String representation of the planID for the new streaming session. -
rescheduleFailedDeletions
void rescheduleFailedDeletions() -
loadNewSSTables
Deprecated.See CASSANDRA-14417Load new SSTables to the given keyspace/table- Parameters:
ksName- The parent keyspace nametableName- The ColumnFamily name where SSTables belong- See Also:
-
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.- Returns:
- set of Tokens as Strings
-
rebuildSecondaryIndex
rebuild the specified indexes -
resetLocalSchema
- Throws:
IOException
-
reloadLocalSchema
void reloadLocalSchema() -
setTraceProbability
void setTraceProbability(double probability) Enables/Disables tracing for the whole system.- 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)
-
samplePartitions
Map<String,List<CompositeData>> samplePartitions(int duration, int capacity, int count, List<String> samplers) throws OpenDataException - Throws:
OpenDataException
-
samplePartitions
Map<String,List<CompositeData>> samplePartitions(String keyspace, int duration, int capacity, int count, List<String> samplers) throws OpenDataException - Throws:
OpenDataException
-
startSamplingPartitions
boolean startSamplingPartitions(String ks, String table, int duration, int interval, int capacity, int count, List<String> samplers) throws OpenDataException Start a scheduled sampling- 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
- Throws:
OpenDataException
-
stopSamplingPartitions
Stop a scheduled sampling- 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
- Throws:
OpenDataException
-
getSampleTasks
- 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'
-
getTraceProbability
double getTraceProbability()Returns the configured tracing probability. -
disableAutoCompaction
- Throws:
IOException
-
enableAutoCompaction
- Throws:
IOException
-
getAutoCompactionStatus
- Throws:
IOException
-
deliverHints
- Throws:
UnknownHostException
-
getClusterName
String getClusterName()Returns the name of the cluster -
getPartitionerName
String getPartitionerName()Returns the cluster partitioner -
getTombstoneWarnThreshold
int getTombstoneWarnThreshold()Returns the threshold for warning of queries with many tombstones -
setTombstoneWarnThreshold
void setTombstoneWarnThreshold(int tombstoneDebugThreshold) Sets the threshold for warning queries with many tombstones -
getTombstoneFailureThreshold
int getTombstoneFailureThreshold()Returns the threshold for abandoning queries with many tombstones -
setTombstoneFailureThreshold
void setTombstoneFailureThreshold(int tombstoneDebugThreshold) Sets the threshold for abandoning queries with many tombstones -
getCachedReplicaRowsWarnThreshold
int getCachedReplicaRowsWarnThreshold()Returns the number of rows cached at the coordinator before filtering/index queries log a warning. -
setCachedReplicaRowsWarnThreshold
void setCachedReplicaRowsWarnThreshold(int threshold) Sets the number of rows cached at the coordinator before filtering/index queries log a warning. -
getCachedReplicaRowsFailThreshold
int getCachedReplicaRowsFailThreshold()Returns the number of rows cached at the coordinator before filtering/index queries fail outright. -
setCachedReplicaRowsFailThreshold
void setCachedReplicaRowsFailThreshold(int threshold) Sets the number of rows cached at the coordinator before filtering/index queries fail outright. -
getColumnIndexSizeInKiB
int getColumnIndexSizeInKiB()Returns the granularity of the collation index of rows within a partition. -1 stands for the SSTable format's default. -
setColumnIndexSizeInKiB
void setColumnIndexSizeInKiB(int columnIndexSizeInKiB) Sets the granularity of the collation index of rows within a partition. Use -1 to select the SSTable format's default. -
setColumnIndexSize
Deprecated.use setColumnIndexSizeInKiB instead as it will not throw non-standard exceptions. See CASSANDRA-17668Sets the granularity of the collation index of rows within a partition -
getColumnIndexCacheSize
Deprecated.use getColumnIndexCacheSizeInKiB. See CASSANDRA-17668Returns the threshold for skipping the column index when caching partition info -
setColumnIndexCacheSize
Deprecated.use setColumnIndexCacheSizeInKiB instead as it will not throw non-standard exceptions. See CASSANDRA-17668Sets the threshold for skipping the column index when caching partition info -
getColumnIndexCacheSizeInKiB
int getColumnIndexCacheSizeInKiB()Returns the threshold for skipping the column index when caching partition info -
setColumnIndexCacheSizeInKiB
void setColumnIndexCacheSizeInKiB(int cacheSizeInKiB) Sets the threshold for skipping the column index when caching partition info -
getBatchSizeFailureThreshold
int getBatchSizeFailureThreshold()Returns the threshold for rejecting queries due to a large batch size -
setBatchSizeFailureThreshold
void setBatchSizeFailureThreshold(int batchSizeDebugThreshold) Sets the threshold for rejecting queries due to a large batch size -
getBatchSizeWarnThreshold
Deprecated.use getBatchSizeWarnThresholdInKiB instead. See CASSANDRA-17668Returns the threshold for warning queries due to a large batch size -
setBatchSizeWarnThreshold
Deprecated.use setBatchSizeWarnThresholdInKiB instead as it will not throw non-standard exceptions. See CASSANDRA-17668Sets the threshold for warning queries due to a large batch size -
getBatchSizeWarnThresholdInKiB
int getBatchSizeWarnThresholdInKiB()Returns the threshold for warning queries due to a large batch size -
setBatchSizeWarnThresholdInKiB
void setBatchSizeWarnThresholdInKiB(int batchSizeDebugThreshold) Sets the threshold for warning queries due to a large batch size -
setHintedHandoffThrottleInKB
void setHintedHandoffThrottleInKB(int throttleInKB) Sets the hinted handoff throttle in KiB per second, per delivery thread. -
getTransferHintsOnDecommission
boolean getTransferHintsOnDecommission() -
setTransferHintsOnDecommission
void setTransferHintsOnDecommission(boolean enabled) -
isHintTtlUseMutationCreationTime
boolean isHintTtlUseMutationCreationTime()Returns whether we are using the creation time of the mutation for determining hint ttl -
setUseCreationTimeForHintTtl
void setUseCreationTimeForHintTtl(boolean enabled) Sets whether we are using the creation time of the mutation for determining hint ttl -
getMaxHintTTL
int getMaxHintTTL()Returns upper bound on the hint ttl -
setMaxHintTTL
void setMaxHintTTL(int maxHintTTL) Sets the upper bound on the hint ttl -
resumeBootstrap
boolean resumeBootstrap()Resume bootstrap streaming when there is failed data streaming.- Returns:
- true if the node successfully starts resuming. (this does not mean bootstrap streaming was success.)
-
getBootstrapState
String getBootstrapState() -
getConcurrency
-
setConcurrency
Sets the concurrency setting for processing stages -
clearConnectionHistory
void clearConnectionHistory()Clears the history of clients that have connected in the past -
disableAuditLog
void disableAuditLog() -
enableAuditLog
void enableAuditLog(String loggerName, Map<String, String> parameters, String includedKeyspaces, String excludedKeyspaces, String includedCategories, String excludedCategories, String includedUsers, String excludedUsers, Integer maxArchiveRetries, Boolean block, String rollCycle, Long maxLogSize, Integer maxQueueWeight, String archiveCommand) throws IllegalStateException- Throws:
IllegalStateException
-
enableAuditLog
@Deprecated(since="4.1") void enableAuditLog(String loggerName, Map<String, String> parameters, String includedKeyspaces, String excludedKeyspaces, String includedCategories, String excludedCategories, String includedUsers, String excludedUsers) throws ConfigurationException, IllegalStateExceptionDeprecated.See CASSANDRA-16725 -
enableAuditLog
@Deprecated(since="4.1") void enableAuditLog(String loggerName, String includedKeyspaces, String excludedKeyspaces, String includedCategories, String excludedCategories, String includedUsers, String excludedUsers) throws ConfigurationException, IllegalStateException Deprecated.See CASSANDRA-16725 -
enableAuditLog
void enableAuditLog(String loggerName, String includedKeyspaces, String excludedKeyspaces, String includedCategories, String excludedCategories, String includedUsers, String excludedUsers, Integer maxArchiveRetries, Boolean block, String rollCycle, Long maxLogSize, Integer maxQueueWeight, String archiveCommand) throws IllegalStateException - Throws:
IllegalStateException
-
isAuditLogEnabled
boolean isAuditLogEnabled() -
getCorruptedTombstoneStrategy
String getCorruptedTombstoneStrategy() -
setCorruptedTombstoneStrategy
-
enableFullQueryLogger
void enableFullQueryLogger(String path, String rollCycle, Boolean blocking, int maxQueueWeight, long maxLogSize, @Nullable String archiveCommand, int maxArchiveRetries) Start the fully query logger.- 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
void resetFullQueryLogger()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 -
stopFullQueryLogger
void stopFullQueryLogger()Stop logging queries but leave any generated files on disk. -
isFullQueryLogEnabled
boolean isFullQueryLogEnabled() -
getFullQueryLoggerOptions
CompositeData getFullQueryLoggerOptions()Returns the current state of FQL. -
setInitialRangeTombstoneListAllocationSize
void setInitialRangeTombstoneListAllocationSize(int size) Sets the initial allocation size of backing arrays for new RangeTombstoneList objects -
getInitialRangeTombstoneListAllocationSize
int getInitialRangeTombstoneListAllocationSize()Returns the initial allocation size of backing arrays for new RangeTombstoneList objects -
setRangeTombstoneListResizeGrowthFactor
void setRangeTombstoneListResizeGrowthFactor(double growthFactor) Sets the resize factor to use when growing/resizing a RangeTombstoneList -
getRangeTombstoneResizeListGrowthFactor
double getRangeTombstoneResizeListGrowthFactor()Returns the resize factor to use when growing/resizing a RangeTombstoneList -
getOutstandingSchemaVersions
Deprecated.See CASSANDRA-17668Returns a map of schema version -> list of endpoints reporting that version that we need schema updates for -
getOutstandingSchemaVersionsWithPort
-
autoOptimiseIncRepairStreams
boolean autoOptimiseIncRepairStreams() -
setAutoOptimiseIncRepairStreams
void setAutoOptimiseIncRepairStreams(boolean enabled) -
autoOptimiseFullRepairStreams
boolean autoOptimiseFullRepairStreams() -
setAutoOptimiseFullRepairStreams
void setAutoOptimiseFullRepairStreams(boolean enabled) -
autoOptimisePreviewRepairStreams
boolean autoOptimisePreviewRepairStreams() -
setAutoOptimisePreviewRepairStreams
void setAutoOptimisePreviewRepairStreams(boolean enabled) -
getTableCountWarnThreshold
Deprecated.See CASSANDRA-17195 -
setTableCountWarnThreshold
Deprecated.See CASSANDRA-17195 -
getKeyspaceCountWarnThreshold
Deprecated.See CASSANDRA-17195 -
setKeyspaceCountWarnThreshold
Deprecated.See CASSANDRA-17195 -
setCompactionTombstoneWarningThreshold
Deprecated.See CASSANDRA-17194 -
getCompactionTombstoneWarningThreshold
Deprecated.See CASSANDRA-17194 -
getReadThresholdsEnabled
boolean getReadThresholdsEnabled() -
setReadThresholdsEnabled
void setReadThresholdsEnabled(boolean value) -
getCoordinatorLargeReadWarnThreshold
String getCoordinatorLargeReadWarnThreshold() -
setCoordinatorLargeReadWarnThreshold
-
getCoordinatorLargeReadAbortThreshold
String getCoordinatorLargeReadAbortThreshold() -
setCoordinatorLargeReadAbortThreshold
-
getLocalReadTooLargeWarnThreshold
String getLocalReadTooLargeWarnThreshold() -
setLocalReadTooLargeWarnThreshold
-
getLocalReadTooLargeAbortThreshold
String getLocalReadTooLargeAbortThreshold() -
setLocalReadTooLargeAbortThreshold
-
getRowIndexReadSizeWarnThreshold
String getRowIndexReadSizeWarnThreshold() -
setRowIndexReadSizeWarnThreshold
-
getRowIndexReadSizeAbortThreshold
String getRowIndexReadSizeAbortThreshold() -
setRowIndexReadSizeAbortThreshold
-
setDefaultKeyspaceReplicationFactor
void setDefaultKeyspaceReplicationFactor(int value) -
getDefaultKeyspaceReplicationFactor
int getDefaultKeyspaceReplicationFactor() -
getSkipPaxosRepairOnTopologyChange
boolean getSkipPaxosRepairOnTopologyChange() -
setSkipPaxosRepairOnTopologyChange
void setSkipPaxosRepairOnTopologyChange(boolean v) -
getSkipPaxosRepairOnTopologyChangeKeyspaces
String getSkipPaxosRepairOnTopologyChangeKeyspaces() -
setSkipPaxosRepairOnTopologyChangeKeyspaces
-
getPaxosAutoRepairsEnabled
boolean getPaxosAutoRepairsEnabled() -
setPaxosAutoRepairsEnabled
void setPaxosAutoRepairsEnabled(boolean enabled) -
getPaxosStateFlushEnabled
boolean getPaxosStateFlushEnabled() -
setPaxosStateFlushEnabled
void setPaxosStateFlushEnabled(boolean enabled) -
getPaxosAutoRepairTables
-
getPaxosPurgeGraceSeconds
long getPaxosPurgeGraceSeconds() -
setPaxosPurgeGraceSeconds
void setPaxosPurgeGraceSeconds(long v) -
getPaxosOnLinearizabilityViolations
String getPaxosOnLinearizabilityViolations() -
setPaxosOnLinearizabilityViolations
-
getPaxosStatePurging
String getPaxosStatePurging() -
setPaxosStatePurging
-
getPaxosRepairEnabled
boolean getPaxosRepairEnabled() -
setPaxosRepairEnabled
void setPaxosRepairEnabled(boolean v) -
getPaxosDcLocalCommitEnabled
boolean getPaxosDcLocalCommitEnabled() -
setPaxosDcLocalCommitEnabled
void setPaxosDcLocalCommitEnabled(boolean v) -
getPaxosBallotLowBound
-
getRepairRpcTimeout
Long getRepairRpcTimeout() -
setRepairRpcTimeout
-
evictHungRepairs
void evictHungRepairs() -
clearPaxosRepairs
void clearPaxosRepairs() -
setSkipPaxosRepairCompatibilityCheck
void setSkipPaxosRepairCompatibilityCheck(boolean v) -
getSkipPaxosRepairCompatibilityCheck
boolean getSkipPaxosRepairCompatibilityCheck() -
getToken
-
topPartitionsEnabled
boolean topPartitionsEnabled() -
getMaxTopSizePartitionCount
int getMaxTopSizePartitionCount() -
setMaxTopSizePartitionCount
void setMaxTopSizePartitionCount(int value) -
getMaxTopTombstonePartitionCount
int getMaxTopTombstonePartitionCount() -
setMaxTopTombstonePartitionCount
void setMaxTopTombstonePartitionCount(int value) -
getMinTrackedPartitionSize
String getMinTrackedPartitionSize() -
setMinTrackedPartitionSize
-
getMinTrackedPartitionTombstoneCount
long getMinTrackedPartitionTombstoneCount() -
setMinTrackedPartitionTombstoneCount
void setMinTrackedPartitionTombstoneCount(long value) -
setSkipStreamDiskSpaceCheck
void setSkipStreamDiskSpaceCheck(boolean value) -
getSkipStreamDiskSpaceCheck
boolean getSkipStreamDiskSpaceCheck() -
getNativeTransportQueueMaxItemAgeThreshold
double getNativeTransportQueueMaxItemAgeThreshold() -
setNativeTransportQueueMaxItemAgeThreshold
void setNativeTransportQueueMaxItemAgeThreshold(double threshold) -
getNativeTransportMinBackoffOnQueueOverloadInMillis
long getNativeTransportMinBackoffOnQueueOverloadInMillis() -
getNativeTransportMaxBackoffOnQueueOverloadInMillis
long getNativeTransportMaxBackoffOnQueueOverloadInMillis() -
setNativeTransportBackoffOnQueueOverloadInMillis
void setNativeTransportBackoffOnQueueOverloadInMillis(long min, long max) -
getNativeTransportThrowOnOverload
boolean getNativeTransportThrowOnOverload() -
setNativeTransportThrowOnOverload
void setNativeTransportThrowOnOverload(boolean throwOnOverload) -
getNativeTransportTimeoutMillis
long getNativeTransportTimeoutMillis() -
setNativeTransportTimeoutMillis
void setNativeTransportTimeoutMillis(long deadlineMillis) -
getEnforceNativeDeadlineForHints
boolean getEnforceNativeDeadlineForHints() -
setEnforceNativeDeadlineForHints
void setEnforceNativeDeadlineForHints(boolean value) -
isOutOfTokenRangeRequestLoggingEnabled
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. -
setOutOfTokenRangeRequestLoggingEnabled
void setOutOfTokenRangeRequestLoggingEnabled(boolean enabled) -
isOutOfTokenRangeRequestRejectionEnabled
boolean isOutOfTokenRangeRequestRejectionEnabled() -
setOutOfTokenRangeRequestRejectionEnabled
void setOutOfTokenRangeRequestRejectionEnabled(boolean enabled) -
getOutOfRangeOperationCounts
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]. -
getPrioritizeSAIOverLegacyIndex
boolean getPrioritizeSAIOverLegacyIndex() -
setPrioritizeSAIOverLegacyIndex
void setPrioritizeSAIOverLegacyIndex(boolean value) -
getForceOptimizedIndexStatusFormat
boolean getForceOptimizedIndexStatusFormat() -
setForceOptimizedIndexStatusFormat
void setForceOptimizedIndexStatusFormat(boolean value) -
setPaxosRepairRaceWait
void setPaxosRepairRaceWait(boolean paxosRepairCoordinatorWait) -
getPaxosRepairRaceWait
boolean getPaxosRepairRaceWait() -
dropPreparedStatements
void dropPreparedStatements(boolean memoryOnly) -
getTablesForKeyspace
Gets the names of all tables for the given keyspace -
mutateSSTableRepairedState
List<String> mutateSSTableRepairedState(boolean repaired, boolean preview, String keyspace, List<String> tables) Mutates the repaired state of all SSTables for the given SSTables
-