Package org.apache.cassandra.service
Class StorageProxy
- java.lang.Object
-
- org.apache.cassandra.service.StorageProxy
-
- All Implemented Interfaces:
StorageProxyMBean
public class StorageProxy extends java.lang.Object implements StorageProxyMBean
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
StorageProxy.LocalReadRunnable
static interface
StorageProxy.WritePerformer
-
Field Summary
Fields Modifier and Type Field Description static StorageProxy
instance
static java.lang.String
MBEAN_NAME
static java.lang.String
UNREACHABLE
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description boolean
appliesLocally(Mutation mutation)
static AbstractWriteResponseHandler<IMutation>
applyCounterMutationOnCoordinator(CounterMutation cm, java.lang.String localDataCenter, Dispatcher.RequestTime requestTime)
static AbstractWriteResponseHandler<IMutation>
applyCounterMutationOnLeader(CounterMutation cm, java.lang.String localDataCenter, java.lang.Runnable callback, Dispatcher.RequestTime requestTime)
static RowIterator
cas(java.lang.String keyspaceName, java.lang.String cfName, DecoratedKey key, CASRequest request, ConsistencyLevel consistencyForPaxos, ConsistencyLevel consistencyForCommit, ClientState clientState, long nowInSeconds, Dispatcher.RequestTime requestTime)
Apply @param updates if and only if the current values in the row for @param key match the provided @param conditions.static PartitionIterator
concatAndBlockOnRepair(java.util.List<PartitionIterator> iterators, java.util.List<ReadRepair<?,?>> repairs)
boolean
denylistKey(java.lang.String keyspace, java.lang.String table, java.lang.String partitionKeyAsString)
Actively denies read and write access to the provided Partition Keystatic java.util.Map<java.lang.String,java.util.List<java.lang.String>>
describeSchemaVersions(boolean withPort)
initiate a request/response session with each live node to check whether or not everybody is using the same migration id.void
disableCheckForDuplicateRowsDuringCompaction()
void
disableCheckForDuplicateRowsDuringReads()
void
disableHintsForDC(java.lang.String dc)
void
disableRepairedDataTrackingForPartitionReads()
void
disableRepairedDataTrackingForRangeReads()
void
disableReportingUnconfirmedRepairedDataMismatches()
void
disableSnapshotOnDuplicateRowDetection()
void
disableSnapshotOnRepairedDataMismatch()
void
enableCheckForDuplicateRowsDuringCompaction()
void
enableCheckForDuplicateRowsDuringReads()
void
enableHintsForDC(java.lang.String dc)
void
enableRepairedDataTrackingForPartitionReads()
void
enableRepairedDataTrackingForRangeReads()
Tracking and reporting of variances in the repaired data set across replicas at read timevoid
enableReportingUnconfirmedRepairedDataMismatches()
void
enableSnapshotOnDuplicateRowDetection()
void
enableSnapshotOnRepairedDataMismatch()
java.lang.Long
getCasContentionTimeout()
boolean
getCheckForDuplicateRowsDuringCompaction()
boolean
getCheckForDuplicateRowsDuringReads()
boolean
getClientRequestSizeMetricsEnabled()
java.lang.Long
getCounterWriteRpcTimeout()
boolean
getDumpHeapOnUncaughtException()
java.util.Set<java.lang.String>
getHintedHandoffDisabledDCs()
boolean
getHintedHandoffEnabled()
int
getHintsInProgress()
java.lang.String
getIdealConsistencyLevel()
int
getMaxHintsInProgress()
int
getMaxHintsSizePerHostInMiB()
int
getMaxHintWindow()
java.lang.Long
getNativeTransportMaxConcurrentConnections()
java.lang.Long
getNativeTransportMaxConcurrentConnectionsPerIp()
int
getNumberOfTables()
int
getOtcBacklogExpirationInterval()
Deprecated.See CASSANDRA-15066int
getPartitionDenylistLoadAttempts()
int
getPartitionDenylistLoadSuccesses()
java.lang.String
getPaxosContentionStrategy()
boolean
getPaxosCoordinatorLockingDisabled()
java.lang.String
getPaxosVariant()
java.lang.Long
getRangeRpcTimeout()
static PartitionIterator
getRangeSlice(PartitionRangeReadCommand command, ConsistencyLevel consistencyLevel, Dispatcher.RequestTime requestTime)
long
getReadRepairAttempted()
long
getReadRepairRepairedBackground()
long
getReadRepairRepairedBlocking()
long
getReadRepairRepairTimedOut()
java.lang.Long
getReadRpcTimeout()
boolean
getRepairedDataTrackingEnabledForPartitionReads()
boolean
getRepairedDataTrackingEnabledForRangeReads()
boolean
getReportingUnconfirmedRepairedDataMismatchesEnabled()
java.lang.Long
getRpcTimeout()
java.util.Map<java.lang.String,java.util.List<java.lang.String>>
getSchemaVersions()
Returns each live node's schema version.java.util.Map<java.lang.String,java.util.List<java.lang.String>>
getSchemaVersionsWithPort()
boolean
getSnapshotOnDuplicateRowDetectionEnabled()
boolean
getSnapshotOnRepairedDataMismatchEnabled()
boolean
getSStableReadRatePersistenceEnabled()
long
getTotalHints()
java.lang.Long
getTruncateRpcTimeout()
boolean
getUseStatementsEnabled()
java.lang.Long
getWriteRpcTimeout()
void
initialLoadPartitionDenylist()
boolean
isKeyDenylisted(java.lang.String keyspace, java.lang.String table, java.lang.String partitionKeyAsString)
A simple check for operators to determine what the denylisted value for a pk is on a nodeboolean
isLoggingReadRepairs()
static boolean
isSafeToPerformRead()
static boolean
isSafeToPerformRead(java.util.List<SinglePartitionReadCommand> queries)
static RowIterator
legacyCas(java.lang.String keyspaceName, java.lang.String cfName, DecoratedKey key, CASRequest request, ConsistencyLevel consistencyForPaxos, ConsistencyLevel consistencyForCommit, ClientState clientState, long nowInSeconds, Dispatcher.RequestTime requestTime)
void
loadPartitionDenylist()
void
logBlockingReadRepairAttemptsForNSeconds(int seconds)
static void
logRequestException(java.lang.Exception exception, java.util.Collection<? extends ReadCommand> commands)
static void
mutate(java.util.List<? extends IMutation> mutations, ConsistencyLevel consistencyLevel, Dispatcher.RequestTime requestTime)
Use this method to have these Mutations applied across all replicas.static void
mutateAtomically(java.util.Collection<Mutation> mutations, ConsistencyLevel consistency_level, boolean requireQuorumForRemove, Dispatcher.RequestTime requestTime)
See mutate.static AbstractWriteResponseHandler<IMutation>
mutateCounter(CounterMutation cm, java.lang.String localDataCenter, Dispatcher.RequestTime requestTime)
Handle counter mutation on the coordinator host.static void
mutateMV(java.nio.ByteBuffer dataKey, java.util.Collection<Mutation> mutations, boolean writeCommitLog, java.util.concurrent.atomic.AtomicLong baseComplete, Dispatcher.RequestTime requestTime)
Use this method to have these Mutations applied across all replicas.static void
mutateWithTriggers(java.util.List<? extends IMutation> mutations, ConsistencyLevel consistencyLevel, boolean mutateAtomically, Dispatcher.RequestTime requestTime)
static AbstractWriteResponseHandler<IMutation>
performWrite(IMutation mutation, ConsistencyLevel consistencyLevel, java.lang.String localDataCenter, StorageProxy.WritePerformer performer, java.lang.Runnable callback, WriteType writeType, Dispatcher.RequestTime requestTime)
Perform the write of a mutation given a WritePerformer.static PartitionIterator
read(SinglePartitionReadCommand.Group group, ConsistencyLevel consistencyLevel, Dispatcher.RequestTime requestTime)
Performs the actual reading of a row out of the StorageService, fetching a specific set of column names from a given column family.static RowIterator
readOne(SinglePartitionReadCommand command, ConsistencyLevel consistencyLevel, Dispatcher.RequestTime requestTime)
static void
recordReadRegularAbort(ConsistencyLevel consistencyLevel, java.lang.Throwable cause)
void
reloadTriggerClasses()
boolean
removeDenylistKey(java.lang.String keyspace, java.lang.String table, java.lang.String partitionKeyAsString)
Attempts to remove the provided pk from the ks + table deny liststatic void
sendToHintedReplicas(Mutation mutation, ReplicaPlan.ForWrite plan, AbstractWriteResponseHandler<IMutation> responseHandler, java.lang.String localDataCenter, Stage stage, Dispatcher.RequestTime requestTime)
Send the mutations to the right targets, write it locally if it corresponds or writes a hint when the node is not available.void
setCasContentionTimeout(java.lang.Long timeoutInMillis)
void
setClientRequestSizeMetricsEnabled(boolean enabled)
void
setCounterWriteRpcTimeout(java.lang.Long timeoutInMillis)
void
setDenylistMaxKeysPerTable(int value)
void
setDenylistMaxKeysTotal(int value)
void
setDumpHeapOnUncaughtException(boolean enabled)
void
setEnableDenylistRangeReads(boolean enabled)
void
setEnableDenylistReads(boolean enabled)
void
setEnableDenylistWrites(boolean enabled)
void
setEnablePartitionDenylist(boolean enabled)
void
setHintedHandoffEnabled(boolean b)
java.lang.String
setIdealConsistencyLevel(java.lang.String cl)
void
setMaxHintsInProgress(int qs)
void
setMaxHintsSizePerHostInMiB(int value)
void
setMaxHintWindow(int ms)
void
setNativeTransportMaxConcurrentConnections(java.lang.Long nativeTransportMaxConcurrentConnections)
void
setNativeTransportMaxConcurrentConnectionsPerIp(java.lang.Long nativeTransportMaxConcurrentConnections)
void
setOtcBacklogExpirationInterval(int intervalInMillis)
Deprecated.See CASSANDRA-15066void
setPaxosContentionStrategy(java.lang.String spec)
void
setPaxosCoordinatorLockingDisabled(boolean disabled)
void
setPaxosVariant(java.lang.String variant)
void
setRangeRpcTimeout(java.lang.Long timeoutInMillis)
void
setReadRpcTimeout(java.lang.Long timeoutInMillis)
void
setRpcTimeout(java.lang.Long timeoutInMillis)
void
setSStableReadRatePersistenceEnabled(boolean enabled)
void
setTruncateRpcTimeout(java.lang.Long timeoutInMillis)
void
setUseStatementsEnabled(boolean enabled)
void
setWriteRpcTimeout(java.lang.Long timeoutInMillis)
static boolean
shouldHint(Replica replica)
static boolean
shouldHint(Replica replica, boolean tryEnablePersistentWindow)
Determines whether a hint should be stored or not.static void
submitHint(Mutation mutation, Replica target, AbstractWriteResponseHandler<IMutation> responseHandler)
static void
truncateBlocking(java.lang.String keyspace, java.lang.String cfname)
Performs the truncate operatoin, which effectively deletes all data from the column family cfnamevoid
verifyNoHintsInProgress()
-
-
-
Field Detail
-
MBEAN_NAME
public static final java.lang.String MBEAN_NAME
- See Also:
- Constant Field Values
-
UNREACHABLE
public static final java.lang.String UNREACHABLE
- See Also:
- Constant Field Values
-
instance
public static final StorageProxy instance
-
-
Method Detail
-
cas
public static RowIterator cas(java.lang.String keyspaceName, java.lang.String cfName, DecoratedKey key, CASRequest request, ConsistencyLevel consistencyForPaxos, ConsistencyLevel consistencyForCommit, ClientState clientState, long nowInSeconds, Dispatcher.RequestTime requestTime) throws UnavailableException, IsBootstrappingException, RequestFailureException, RequestTimeoutException, InvalidRequestException, CasWriteUnknownResultException
Apply @param updates if and only if the current values in the row for @param key match the provided @param conditions. The algorithm is "raw" Paxos: that is, Paxos minus leader election -- any node in the cluster may propose changes for any row, which (that is, the row) is the unit of values being proposed, not single columns. The Paxos cohort is only the replicas for the given key, not the entire cluster. So we expect performance to be reasonable, but CAS is still intended to be used "when you really need it," not for all your updates. There are three phases to Paxos: 1. Prepare: the coordinator generates a ballot (timeUUID in our case) and asks replicas to (a) promise not to accept updates from older ballots and (b) tell us about the most recent update it has already accepted. 2. Accept: if a majority of replicas respond, the coordinator asks replicas to accept the value of the highest proposal ballot it heard about, or a new value if no in-progress proposals were reported. 3. Commit (Learn): if a majority of replicas acknowledge the accept request, we can commit the new value. Commit procedure is not covered in "Paxos Made Simple," and only briefly mentioned in "Paxos Made Live," so here is our approach: 3a. The coordinator sends a commit message to all replicas with the ballot and value. 3b. Because of 1-2, this will be the highest-seen commit ballot. The replicas will note that, and send it with subsequent promise replies. This allows us to discard acceptance records for successfully committed replicas, without allowing incomplete proposals to commit erroneously later on. Note that since we are performing a CAS rather than a simple update, we perform a read (of committed values) between the prepare and accept phases. This gives us a slightly longer window for another coordinator to come along and trump our own promise with a newer one but is otherwise safe.- Parameters:
keyspaceName
- the keyspace for the CAScfName
- the column family for the CASkey
- the row key for the row to CASrequest
- the conditions for the CAS to apply as well as the update to perform if the conditions hold.consistencyForPaxos
- the consistency for the paxos prepare and propose round. This can only be either SERIAL or LOCAL_SERIAL.consistencyForCommit
- the consistency for write done during the commit phase. This can be anything, except SERIAL or LOCAL_SERIAL.- Returns:
- null if the operation succeeds in updating the row, or the current values corresponding to conditions. (since, if the CAS doesn't succeed, it means the current value do not match the conditions).
- Throws:
UnavailableException
IsBootstrappingException
RequestFailureException
RequestTimeoutException
InvalidRequestException
CasWriteUnknownResultException
-
legacyCas
public static RowIterator legacyCas(java.lang.String keyspaceName, java.lang.String cfName, DecoratedKey key, CASRequest request, ConsistencyLevel consistencyForPaxos, ConsistencyLevel consistencyForCommit, ClientState clientState, long nowInSeconds, Dispatcher.RequestTime requestTime) throws UnavailableException, IsBootstrappingException, RequestFailureException, RequestTimeoutException, InvalidRequestException
-
mutate
public static void mutate(java.util.List<? extends IMutation> mutations, ConsistencyLevel consistencyLevel, Dispatcher.RequestTime requestTime) throws UnavailableException, OverloadedException, WriteTimeoutException, WriteFailureException
Use this method to have these Mutations applied across all replicas. This method will take care of the possibility of a replica being down and hint the data across to some other replica.- Parameters:
mutations
- the mutations to be applied across the replicasconsistencyLevel
- the consistency level for the operationrequestTime
- object holding times when request got enqueued and started execution- Throws:
UnavailableException
OverloadedException
WriteTimeoutException
WriteFailureException
-
appliesLocally
public boolean appliesLocally(Mutation mutation)
-
mutateMV
public static void mutateMV(java.nio.ByteBuffer dataKey, java.util.Collection<Mutation> mutations, boolean writeCommitLog, java.util.concurrent.atomic.AtomicLong baseComplete, Dispatcher.RequestTime requestTime) throws UnavailableException, OverloadedException, WriteTimeoutException
Use this method to have these Mutations applied across all replicas.- Parameters:
mutations
- the mutations to be applied across the replicaswriteCommitLog
- if commitlog should be writtenbaseComplete
- time from epoch in ms that the local base mutation was(or will be) completedrequestTime
- object holding times when request got enqueued and started execution- Throws:
UnavailableException
OverloadedException
WriteTimeoutException
-
mutateWithTriggers
public static void mutateWithTriggers(java.util.List<? extends IMutation> mutations, ConsistencyLevel consistencyLevel, boolean mutateAtomically, Dispatcher.RequestTime requestTime) throws WriteTimeoutException, WriteFailureException, UnavailableException, OverloadedException, InvalidRequestException
-
mutateAtomically
public static void mutateAtomically(java.util.Collection<Mutation> mutations, ConsistencyLevel consistency_level, boolean requireQuorumForRemove, Dispatcher.RequestTime requestTime) throws UnavailableException, OverloadedException, WriteTimeoutException
See mutate. Adds additional steps before and after writing a batch. Before writing the batch (but after doing availability check against the FD for the row replicas): write the entire batch to a batchlog elsewhere in the cluster. After: remove the batchlog entry (after writing hints for the batch rows, if necessary).- Parameters:
mutations
- the Mutations to be applied across the replicasconsistency_level
- the consistency level for the operationrequireQuorumForRemove
- at least a quorum of nodes will see update before deleting batchlogrequestTime
- object holding times when request got enqueued and started execution- Throws:
UnavailableException
OverloadedException
WriteTimeoutException
-
performWrite
public static AbstractWriteResponseHandler<IMutation> performWrite(IMutation mutation, ConsistencyLevel consistencyLevel, java.lang.String localDataCenter, StorageProxy.WritePerformer performer, java.lang.Runnable callback, WriteType writeType, Dispatcher.RequestTime requestTime)
Perform the write of a mutation given a WritePerformer. Gather the list of write endpoints, apply locally and/or forward the mutation to said write endpoint (deletaged to the actual WritePerformer) and wait for the responses based on consistency level.- Parameters:
mutation
- the mutation to be appliedconsistencyLevel
- the consistency level for the write operationperformer
- the WritePerformer in charge of appliying the mutation given the list of write endpoints (either standardWritePerformer for standard writes or counterWritePerformer for counter writes).callback
- an optional callback to be run if and when the write isrequestTime
- object holding times when request got enqueued and started execution
-
sendToHintedReplicas
public static void sendToHintedReplicas(Mutation mutation, ReplicaPlan.ForWrite plan, AbstractWriteResponseHandler<IMutation> responseHandler, java.lang.String localDataCenter, Stage stage, Dispatcher.RequestTime requestTime) throws OverloadedException
Send the mutations to the right targets, write it locally if it corresponds or writes a hint when the node is not available. Note about hints:| Hinted Handoff | Consist. Level | | on | >=1 | --> wait for hints. We DO NOT notify the handler with handler.response() for hints; | on | ANY | --> wait for hints. Responses count towards consistency. | off | >=1 | --> DO NOT fire hints. And DO NOT wait for them to complete. | off | ANY | --> DO NOT fire hints. And DO NOT wait for them to complete.
- Throws:
OverloadedException
- if the hints cannot be written/enqueued
-
mutateCounter
public static AbstractWriteResponseHandler<IMutation> mutateCounter(CounterMutation cm, java.lang.String localDataCenter, Dispatcher.RequestTime requestTime) throws UnavailableException, OverloadedException
Handle counter mutation on the coordinator host. A counter mutation needs to first be applied to a replica (that we'll call the leader for the mutation) before being replicated to the other endpoint. To achieve so, there is two case: 1) the coordinator host is a replica: we proceed to applying the update locally and replicate throug applyCounterMutationOnCoordinator 2) the coordinator is not a replica: we forward the (counter)mutation to a chosen replica (that will proceed through applyCounterMutationOnLeader upon receive) and wait for its acknowledgment. Implementation note: We check if we can fulfill the CL on the coordinator host even if he is not a replica to allow quicker response and because the WriteResponseHandlers don't make it easy to send back an error. We also always gather the write latencies at the coordinator node to make gathering point similar to the case of standard writes.
-
applyCounterMutationOnLeader
public static AbstractWriteResponseHandler<IMutation> applyCounterMutationOnLeader(CounterMutation cm, java.lang.String localDataCenter, java.lang.Runnable callback, Dispatcher.RequestTime requestTime) throws UnavailableException, OverloadedException
-
applyCounterMutationOnCoordinator
public static AbstractWriteResponseHandler<IMutation> applyCounterMutationOnCoordinator(CounterMutation cm, java.lang.String localDataCenter, Dispatcher.RequestTime requestTime) throws UnavailableException, OverloadedException
-
readOne
public static RowIterator readOne(SinglePartitionReadCommand command, ConsistencyLevel consistencyLevel, Dispatcher.RequestTime requestTime) throws UnavailableException, IsBootstrappingException, ReadFailureException, ReadTimeoutException, InvalidRequestException
-
read
public static PartitionIterator read(SinglePartitionReadCommand.Group group, ConsistencyLevel consistencyLevel, Dispatcher.RequestTime requestTime) throws UnavailableException, IsBootstrappingException, ReadFailureException, ReadTimeoutException, InvalidRequestException
Performs the actual reading of a row out of the StorageService, fetching a specific set of column names from a given column family.
-
isSafeToPerformRead
public static boolean isSafeToPerformRead(java.util.List<SinglePartitionReadCommand> queries)
-
isSafeToPerformRead
public static boolean isSafeToPerformRead()
-
recordReadRegularAbort
public static void recordReadRegularAbort(ConsistencyLevel consistencyLevel, java.lang.Throwable cause)
-
concatAndBlockOnRepair
public static PartitionIterator concatAndBlockOnRepair(java.util.List<PartitionIterator> iterators, java.util.List<ReadRepair<?,?>> repairs)
-
getRangeSlice
public static PartitionIterator getRangeSlice(PartitionRangeReadCommand command, ConsistencyLevel consistencyLevel, Dispatcher.RequestTime requestTime)
-
getSchemaVersions
public java.util.Map<java.lang.String,java.util.List<java.lang.String>> getSchemaVersions()
Description copied from interface:StorageProxyMBean
Returns each live node's schema version.- Specified by:
getSchemaVersions
in interfaceStorageProxyMBean
-
getSchemaVersionsWithPort
public java.util.Map<java.lang.String,java.util.List<java.lang.String>> getSchemaVersionsWithPort()
- Specified by:
getSchemaVersionsWithPort
in interfaceStorageProxyMBean
-
describeSchemaVersions
public static java.util.Map<java.lang.String,java.util.List<java.lang.String>> describeSchemaVersions(boolean withPort)
initiate a request/response session with each live node to check whether or not everybody is using the same migration id. This is useful for determining if a schema change has propagated through the cluster. Disagreement is assumed if any node fails to respond.
-
getHintedHandoffEnabled
public boolean getHintedHandoffEnabled()
- Specified by:
getHintedHandoffEnabled
in interfaceStorageProxyMBean
-
setHintedHandoffEnabled
public void setHintedHandoffEnabled(boolean b)
- Specified by:
setHintedHandoffEnabled
in interfaceStorageProxyMBean
-
enableHintsForDC
public void enableHintsForDC(java.lang.String dc)
- Specified by:
enableHintsForDC
in interfaceStorageProxyMBean
-
disableHintsForDC
public void disableHintsForDC(java.lang.String dc)
- Specified by:
disableHintsForDC
in interfaceStorageProxyMBean
-
getHintedHandoffDisabledDCs
public java.util.Set<java.lang.String> getHintedHandoffDisabledDCs()
- Specified by:
getHintedHandoffDisabledDCs
in interfaceStorageProxyMBean
-
getMaxHintWindow
public int getMaxHintWindow()
- Specified by:
getMaxHintWindow
in interfaceStorageProxyMBean
-
setMaxHintWindow
public void setMaxHintWindow(int ms)
- Specified by:
setMaxHintWindow
in interfaceStorageProxyMBean
-
getMaxHintsSizePerHostInMiB
public int getMaxHintsSizePerHostInMiB()
- Specified by:
getMaxHintsSizePerHostInMiB
in interfaceStorageProxyMBean
-
setMaxHintsSizePerHostInMiB
public void setMaxHintsSizePerHostInMiB(int value)
- Specified by:
setMaxHintsSizePerHostInMiB
in interfaceStorageProxyMBean
-
shouldHint
public static boolean shouldHint(Replica replica)
-
shouldHint
public static boolean shouldHint(Replica replica, boolean tryEnablePersistentWindow)
Determines whether a hint should be stored or not. It rejects early if any of the condition is met: - Hints disabled entirely or for the belonging datacetner of the replica - The replica is transient or is the self node - The replica is no longer part of the ring - The hint window has expired - The hints have reached to the size limit for the node Otherwise, it permits.- Parameters:
replica
- the replica for the hinttryEnablePersistentWindow
- true to consider hint_window_persistent_enabled; otherwise, ignores- Returns:
- true to permit or false to reject hint
-
truncateBlocking
public static void truncateBlocking(java.lang.String keyspace, java.lang.String cfname) throws UnavailableException, java.util.concurrent.TimeoutException
Performs the truncate operatoin, which effectively deletes all data from the column family cfname- Parameters:
keyspace
-cfname
-- Throws:
UnavailableException
- If some of the hosts in the ring are down.java.util.concurrent.TimeoutException
-
logRequestException
public static void logRequestException(java.lang.Exception exception, java.util.Collection<? extends ReadCommand> commands)
-
getTotalHints
public long getTotalHints()
- Specified by:
getTotalHints
in interfaceStorageProxyMBean
-
getMaxHintsInProgress
public int getMaxHintsInProgress()
- Specified by:
getMaxHintsInProgress
in interfaceStorageProxyMBean
-
setMaxHintsInProgress
public void setMaxHintsInProgress(int qs)
- Specified by:
setMaxHintsInProgress
in interfaceStorageProxyMBean
-
getHintsInProgress
public int getHintsInProgress()
- Specified by:
getHintsInProgress
in interfaceStorageProxyMBean
-
verifyNoHintsInProgress
public void verifyNoHintsInProgress()
-
submitHint
public static void submitHint(Mutation mutation, Replica target, AbstractWriteResponseHandler<IMutation> responseHandler)
-
getRpcTimeout
public java.lang.Long getRpcTimeout()
- Specified by:
getRpcTimeout
in interfaceStorageProxyMBean
-
setRpcTimeout
public void setRpcTimeout(java.lang.Long timeoutInMillis)
- Specified by:
setRpcTimeout
in interfaceStorageProxyMBean
-
getReadRpcTimeout
public java.lang.Long getReadRpcTimeout()
- Specified by:
getReadRpcTimeout
in interfaceStorageProxyMBean
-
setReadRpcTimeout
public void setReadRpcTimeout(java.lang.Long timeoutInMillis)
- Specified by:
setReadRpcTimeout
in interfaceStorageProxyMBean
-
getWriteRpcTimeout
public java.lang.Long getWriteRpcTimeout()
- Specified by:
getWriteRpcTimeout
in interfaceStorageProxyMBean
-
setWriteRpcTimeout
public void setWriteRpcTimeout(java.lang.Long timeoutInMillis)
- Specified by:
setWriteRpcTimeout
in interfaceStorageProxyMBean
-
getCounterWriteRpcTimeout
public java.lang.Long getCounterWriteRpcTimeout()
- Specified by:
getCounterWriteRpcTimeout
in interfaceStorageProxyMBean
-
setCounterWriteRpcTimeout
public void setCounterWriteRpcTimeout(java.lang.Long timeoutInMillis)
- Specified by:
setCounterWriteRpcTimeout
in interfaceStorageProxyMBean
-
getCasContentionTimeout
public java.lang.Long getCasContentionTimeout()
- Specified by:
getCasContentionTimeout
in interfaceStorageProxyMBean
-
setCasContentionTimeout
public void setCasContentionTimeout(java.lang.Long timeoutInMillis)
- Specified by:
setCasContentionTimeout
in interfaceStorageProxyMBean
-
getRangeRpcTimeout
public java.lang.Long getRangeRpcTimeout()
- Specified by:
getRangeRpcTimeout
in interfaceStorageProxyMBean
-
setRangeRpcTimeout
public void setRangeRpcTimeout(java.lang.Long timeoutInMillis)
- Specified by:
setRangeRpcTimeout
in interfaceStorageProxyMBean
-
getTruncateRpcTimeout
public java.lang.Long getTruncateRpcTimeout()
- Specified by:
getTruncateRpcTimeout
in interfaceStorageProxyMBean
-
setTruncateRpcTimeout
public void setTruncateRpcTimeout(java.lang.Long timeoutInMillis)
- Specified by:
setTruncateRpcTimeout
in interfaceStorageProxyMBean
-
getNativeTransportMaxConcurrentConnections
public java.lang.Long getNativeTransportMaxConcurrentConnections()
- Specified by:
getNativeTransportMaxConcurrentConnections
in interfaceStorageProxyMBean
-
setNativeTransportMaxConcurrentConnections
public void setNativeTransportMaxConcurrentConnections(java.lang.Long nativeTransportMaxConcurrentConnections)
- Specified by:
setNativeTransportMaxConcurrentConnections
in interfaceStorageProxyMBean
-
getNativeTransportMaxConcurrentConnectionsPerIp
public java.lang.Long getNativeTransportMaxConcurrentConnectionsPerIp()
-
setNativeTransportMaxConcurrentConnectionsPerIp
public void setNativeTransportMaxConcurrentConnectionsPerIp(java.lang.Long nativeTransportMaxConcurrentConnections)
-
reloadTriggerClasses
public void reloadTriggerClasses()
- Specified by:
reloadTriggerClasses
in interfaceStorageProxyMBean
-
getReadRepairAttempted
public long getReadRepairAttempted()
- Specified by:
getReadRepairAttempted
in interfaceStorageProxyMBean
-
getReadRepairRepairedBlocking
public long getReadRepairRepairedBlocking()
- Specified by:
getReadRepairRepairedBlocking
in interfaceStorageProxyMBean
-
getReadRepairRepairedBackground
public long getReadRepairRepairedBackground()
- Specified by:
getReadRepairRepairedBackground
in interfaceStorageProxyMBean
-
getReadRepairRepairTimedOut
public long getReadRepairRepairTimedOut()
- Specified by:
getReadRepairRepairTimedOut
in interfaceStorageProxyMBean
-
getNumberOfTables
public int getNumberOfTables()
- Specified by:
getNumberOfTables
in interfaceStorageProxyMBean
-
getIdealConsistencyLevel
public java.lang.String getIdealConsistencyLevel()
- Specified by:
getIdealConsistencyLevel
in interfaceStorageProxyMBean
-
setIdealConsistencyLevel
public java.lang.String setIdealConsistencyLevel(java.lang.String cl)
- Specified by:
setIdealConsistencyLevel
in interfaceStorageProxyMBean
-
getOtcBacklogExpirationInterval
@Deprecated(since="4.0") public int getOtcBacklogExpirationInterval()
Deprecated.See CASSANDRA-15066- Specified by:
getOtcBacklogExpirationInterval
in interfaceStorageProxyMBean
-
setOtcBacklogExpirationInterval
@Deprecated(since="4.0") public void setOtcBacklogExpirationInterval(int intervalInMillis)
Deprecated.See CASSANDRA-15066- Specified by:
setOtcBacklogExpirationInterval
in interfaceStorageProxyMBean
-
enableRepairedDataTrackingForRangeReads
public void enableRepairedDataTrackingForRangeReads()
Description copied from interface:StorageProxyMBean
Tracking and reporting of variances in the repaired data set across replicas at read time- Specified by:
enableRepairedDataTrackingForRangeReads
in interfaceStorageProxyMBean
-
disableRepairedDataTrackingForRangeReads
public void disableRepairedDataTrackingForRangeReads()
- Specified by:
disableRepairedDataTrackingForRangeReads
in interfaceStorageProxyMBean
-
getRepairedDataTrackingEnabledForRangeReads
public boolean getRepairedDataTrackingEnabledForRangeReads()
- Specified by:
getRepairedDataTrackingEnabledForRangeReads
in interfaceStorageProxyMBean
-
enableRepairedDataTrackingForPartitionReads
public void enableRepairedDataTrackingForPartitionReads()
- Specified by:
enableRepairedDataTrackingForPartitionReads
in interfaceStorageProxyMBean
-
disableRepairedDataTrackingForPartitionReads
public void disableRepairedDataTrackingForPartitionReads()
- Specified by:
disableRepairedDataTrackingForPartitionReads
in interfaceStorageProxyMBean
-
getRepairedDataTrackingEnabledForPartitionReads
public boolean getRepairedDataTrackingEnabledForPartitionReads()
- Specified by:
getRepairedDataTrackingEnabledForPartitionReads
in interfaceStorageProxyMBean
-
enableReportingUnconfirmedRepairedDataMismatches
public void enableReportingUnconfirmedRepairedDataMismatches()
- Specified by:
enableReportingUnconfirmedRepairedDataMismatches
in interfaceStorageProxyMBean
-
disableReportingUnconfirmedRepairedDataMismatches
public void disableReportingUnconfirmedRepairedDataMismatches()
- Specified by:
disableReportingUnconfirmedRepairedDataMismatches
in interfaceStorageProxyMBean
-
getReportingUnconfirmedRepairedDataMismatchesEnabled
public boolean getReportingUnconfirmedRepairedDataMismatchesEnabled()
- Specified by:
getReportingUnconfirmedRepairedDataMismatchesEnabled
in interfaceStorageProxyMBean
-
getSnapshotOnRepairedDataMismatchEnabled
public boolean getSnapshotOnRepairedDataMismatchEnabled()
- Specified by:
getSnapshotOnRepairedDataMismatchEnabled
in interfaceStorageProxyMBean
-
enableSnapshotOnRepairedDataMismatch
public void enableSnapshotOnRepairedDataMismatch()
- Specified by:
enableSnapshotOnRepairedDataMismatch
in interfaceStorageProxyMBean
-
disableSnapshotOnRepairedDataMismatch
public void disableSnapshotOnRepairedDataMismatch()
- Specified by:
disableSnapshotOnRepairedDataMismatch
in interfaceStorageProxyMBean
-
getSnapshotOnDuplicateRowDetectionEnabled
public boolean getSnapshotOnDuplicateRowDetectionEnabled()
- Specified by:
getSnapshotOnDuplicateRowDetectionEnabled
in interfaceStorageProxyMBean
-
enableSnapshotOnDuplicateRowDetection
public void enableSnapshotOnDuplicateRowDetection()
- Specified by:
enableSnapshotOnDuplicateRowDetection
in interfaceStorageProxyMBean
-
disableSnapshotOnDuplicateRowDetection
public void disableSnapshotOnDuplicateRowDetection()
- Specified by:
disableSnapshotOnDuplicateRowDetection
in interfaceStorageProxyMBean
-
getCheckForDuplicateRowsDuringReads
public boolean getCheckForDuplicateRowsDuringReads()
- Specified by:
getCheckForDuplicateRowsDuringReads
in interfaceStorageProxyMBean
-
enableCheckForDuplicateRowsDuringReads
public void enableCheckForDuplicateRowsDuringReads()
- Specified by:
enableCheckForDuplicateRowsDuringReads
in interfaceStorageProxyMBean
-
disableCheckForDuplicateRowsDuringReads
public void disableCheckForDuplicateRowsDuringReads()
- Specified by:
disableCheckForDuplicateRowsDuringReads
in interfaceStorageProxyMBean
-
getCheckForDuplicateRowsDuringCompaction
public boolean getCheckForDuplicateRowsDuringCompaction()
- Specified by:
getCheckForDuplicateRowsDuringCompaction
in interfaceStorageProxyMBean
-
enableCheckForDuplicateRowsDuringCompaction
public void enableCheckForDuplicateRowsDuringCompaction()
- Specified by:
enableCheckForDuplicateRowsDuringCompaction
in interfaceStorageProxyMBean
-
disableCheckForDuplicateRowsDuringCompaction
public void disableCheckForDuplicateRowsDuringCompaction()
- Specified by:
disableCheckForDuplicateRowsDuringCompaction
in interfaceStorageProxyMBean
-
initialLoadPartitionDenylist
public void initialLoadPartitionDenylist()
-
loadPartitionDenylist
public void loadPartitionDenylist()
- Specified by:
loadPartitionDenylist
in interfaceStorageProxyMBean
-
getPartitionDenylistLoadAttempts
public int getPartitionDenylistLoadAttempts()
- Specified by:
getPartitionDenylistLoadAttempts
in interfaceStorageProxyMBean
-
getPartitionDenylistLoadSuccesses
public int getPartitionDenylistLoadSuccesses()
- Specified by:
getPartitionDenylistLoadSuccesses
in interfaceStorageProxyMBean
-
setEnablePartitionDenylist
public void setEnablePartitionDenylist(boolean enabled)
- Specified by:
setEnablePartitionDenylist
in interfaceStorageProxyMBean
-
setEnableDenylistWrites
public void setEnableDenylistWrites(boolean enabled)
- Specified by:
setEnableDenylistWrites
in interfaceStorageProxyMBean
-
setEnableDenylistReads
public void setEnableDenylistReads(boolean enabled)
- Specified by:
setEnableDenylistReads
in interfaceStorageProxyMBean
-
setEnableDenylistRangeReads
public void setEnableDenylistRangeReads(boolean enabled)
- Specified by:
setEnableDenylistRangeReads
in interfaceStorageProxyMBean
-
setDenylistMaxKeysPerTable
public void setDenylistMaxKeysPerTable(int value)
- Specified by:
setDenylistMaxKeysPerTable
in interfaceStorageProxyMBean
-
setDenylistMaxKeysTotal
public void setDenylistMaxKeysTotal(int value)
- Specified by:
setDenylistMaxKeysTotal
in interfaceStorageProxyMBean
-
denylistKey
public boolean denylistKey(java.lang.String keyspace, java.lang.String table, java.lang.String partitionKeyAsString)
Actively denies read and write access to the provided Partition Key- Specified by:
denylistKey
in interfaceStorageProxyMBean
- Parameters:
keyspace
- Name of keyspace containing the PK you wish to deny access totable
- Name of table containing the PK you wish to deny access topartitionKeyAsString
- String representation of the PK you want to deny access to- Returns:
- true if successfully added, false if failure
-
removeDenylistKey
public boolean removeDenylistKey(java.lang.String keyspace, java.lang.String table, java.lang.String partitionKeyAsString)
Attempts to remove the provided pk from the ks + table deny list- Specified by:
removeDenylistKey
in interfaceStorageProxyMBean
- Parameters:
keyspace
- Keyspace containing the pk to remove the denylist entry fortable
- Table containing the pk to remove denylist entry forpartitionKeyAsString
- String representation of the PK you want to re-allow access to- Returns:
- true if found and removed, false if not
-
isKeyDenylisted
public boolean isKeyDenylisted(java.lang.String keyspace, java.lang.String table, java.lang.String partitionKeyAsString)
A simple check for operators to determine what the denylisted value for a pk is on a node- Specified by:
isKeyDenylisted
in interfaceStorageProxyMBean
-
logBlockingReadRepairAttemptsForNSeconds
public void logBlockingReadRepairAttemptsForNSeconds(int seconds)
- Specified by:
logBlockingReadRepairAttemptsForNSeconds
in interfaceStorageProxyMBean
-
isLoggingReadRepairs
public boolean isLoggingReadRepairs()
- Specified by:
isLoggingReadRepairs
in interfaceStorageProxyMBean
-
setPaxosVariant
public void setPaxosVariant(java.lang.String variant)
- Specified by:
setPaxosVariant
in interfaceStorageProxyMBean
-
getPaxosVariant
public java.lang.String getPaxosVariant()
- Specified by:
getPaxosVariant
in interfaceStorageProxyMBean
-
getUseStatementsEnabled
public boolean getUseStatementsEnabled()
- Specified by:
getUseStatementsEnabled
in interfaceStorageProxyMBean
-
setUseStatementsEnabled
public void setUseStatementsEnabled(boolean enabled)
- Specified by:
setUseStatementsEnabled
in interfaceStorageProxyMBean
-
setPaxosContentionStrategy
public void setPaxosContentionStrategy(java.lang.String spec)
- Specified by:
setPaxosContentionStrategy
in interfaceStorageProxyMBean
-
getPaxosContentionStrategy
public java.lang.String getPaxosContentionStrategy()
- Specified by:
getPaxosContentionStrategy
in interfaceStorageProxyMBean
-
setPaxosCoordinatorLockingDisabled
public void setPaxosCoordinatorLockingDisabled(boolean disabled)
- Specified by:
setPaxosCoordinatorLockingDisabled
in interfaceStorageProxyMBean
-
getPaxosCoordinatorLockingDisabled
public boolean getPaxosCoordinatorLockingDisabled()
- Specified by:
getPaxosCoordinatorLockingDisabled
in interfaceStorageProxyMBean
-
getDumpHeapOnUncaughtException
public boolean getDumpHeapOnUncaughtException()
- Specified by:
getDumpHeapOnUncaughtException
in interfaceStorageProxyMBean
-
setDumpHeapOnUncaughtException
public void setDumpHeapOnUncaughtException(boolean enabled)
- Specified by:
setDumpHeapOnUncaughtException
in interfaceStorageProxyMBean
-
getSStableReadRatePersistenceEnabled
public boolean getSStableReadRatePersistenceEnabled()
- Specified by:
getSStableReadRatePersistenceEnabled
in interfaceStorageProxyMBean
-
setSStableReadRatePersistenceEnabled
public void setSStableReadRatePersistenceEnabled(boolean enabled)
- Specified by:
setSStableReadRatePersistenceEnabled
in interfaceStorageProxyMBean
-
getClientRequestSizeMetricsEnabled
public boolean getClientRequestSizeMetricsEnabled()
- Specified by:
getClientRequestSizeMetricsEnabled
in interfaceStorageProxyMBean
-
setClientRequestSizeMetricsEnabled
public void setClientRequestSizeMetricsEnabled(boolean enabled)
- Specified by:
setClientRequestSizeMetricsEnabled
in interfaceStorageProxyMBean
-
-