|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.cassandra.service.StorageProxy
public class StorageProxy
Nested Class Summary | |
---|---|
static interface |
StorageProxy.WritePerformer
|
Field Summary | |
---|---|
static StorageProxy |
instance
|
static java.lang.String |
MBEAN_NAME
|
static java.lang.String |
UNREACHABLE
|
Method Summary | |
---|---|
static AbstractWriteResponseHandler |
applyCounterMutationOnCoordinator(CounterMutation cm,
java.lang.String localDataCenter)
|
static AbstractWriteResponseHandler |
applyCounterMutationOnLeader(CounterMutation cm,
java.lang.String localDataCenter,
java.lang.Runnable callback)
|
static java.util.Map<java.lang.String,java.util.List<java.lang.String>> |
describeSchemaVersions()
initiate a request/response session with each live node to check whether or not everybody is using the same migration id. |
boolean |
getHintedHandoffEnabled()
|
int |
getHintsInProgress()
|
int |
getMaxHintsInProgress()
|
int |
getMaxHintWindow()
|
long |
getRangeOperations()
|
java.lang.Long |
getRangeRpcTimeout()
|
static java.util.List<Row> |
getRangeSlice(RangeSliceCommand command,
ConsistencyLevel consistency_level)
|
long |
getReadOperations()
|
java.lang.Long |
getReadRpcTimeout()
|
long[] |
getRecentRangeLatencyHistogramMicros()
|
double |
getRecentRangeLatencyMicros()
|
long[] |
getRecentReadLatencyHistogramMicros()
|
double |
getRecentReadLatencyMicros()
|
long[] |
getRecentWriteLatencyHistogramMicros()
|
double |
getRecentWriteLatencyMicros()
|
java.lang.Long |
getRpcTimeout()
|
long |
getTotalHints()
|
long[] |
getTotalRangeLatencyHistogramMicros()
|
long |
getTotalRangeLatencyMicros()
|
long[] |
getTotalReadLatencyHistogramMicros()
|
long |
getTotalReadLatencyMicros()
|
long[] |
getTotalWriteLatencyHistogramMicros()
|
long |
getTotalWriteLatencyMicros()
|
java.lang.Long |
getTruncateRpcTimeout()
|
long |
getWriteOperations()
|
java.lang.Long |
getWriteRpcTimeout()
|
static void |
mutate(java.util.Collection<? extends IMutation> mutations,
ConsistencyLevel consistency_level)
Use this method to have these Mutations applied across all replicas. |
static void |
mutateAtomically(java.util.Collection<RowMutation> mutations,
ConsistencyLevel consistency_level)
See mutate. |
static AbstractWriteResponseHandler |
mutateCounter(CounterMutation cm,
java.lang.String localDataCenter)
Handle counter mutation on the coordinator host. |
static AbstractWriteResponseHandler |
performWrite(IMutation mutation,
ConsistencyLevel consistency_level,
java.lang.String localDataCenter,
StorageProxy.WritePerformer performer,
java.lang.Runnable callback,
WriteType writeType)
Perform the write of a mutation given a WritePerformer. |
static java.util.List<Row> |
read(java.util.List<ReadCommand> commands,
ConsistencyLevel consistency_level)
Performs the actual reading of a row out of the StorageService, fetching a specific set of column names from a given column family. |
static java.util.concurrent.Future<java.lang.Void> |
scheduleLocalHint(RowMutation mutation,
java.net.InetAddress target,
AbstractWriteResponseHandler responseHandler,
ConsistencyLevel consistencyLevel)
|
static void |
sendToHintedEndpoints(RowMutation rm,
java.lang.Iterable<java.net.InetAddress> targets,
AbstractWriteResponseHandler responseHandler,
java.lang.String localDataCenter,
ConsistencyLevel consistency_level)
Send the mutations to the right targets, write it locally if it corresponds or writes a hint when the node is not available. |
void |
setHintedHandoffEnabled(boolean b)
|
void |
setMaxHintsInProgress(int qs)
|
void |
setMaxHintWindow(int ms)
|
void |
setRangeRpcTimeout(java.lang.Long timeoutInMillis)
|
void |
setReadRpcTimeout(java.lang.Long timeoutInMillis)
|
void |
setRpcTimeout(java.lang.Long timeoutInMillis)
|
void |
setTruncateRpcTimeout(java.lang.Long timeoutInMillis)
|
void |
setWriteRpcTimeout(java.lang.Long timeoutInMillis)
|
static boolean |
shouldHint(java.net.InetAddress ep)
|
static void |
truncateBlocking(java.lang.String keyspace,
java.lang.String cfname)
Performs the truncate operatoin, which effectively deletes all data from the column family cfname |
void |
verifyNoHintsInProgress()
|
static void |
writeHintForMutation(RowMutation mutation,
java.net.InetAddress target)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String MBEAN_NAME
public static final java.lang.String UNREACHABLE
public static final StorageProxy instance
Method Detail |
---|
public static void mutate(java.util.Collection<? extends IMutation> mutations, ConsistencyLevel consistency_level) throws UnavailableException, OverloadedException, WriteTimeoutException
mutations
- the mutations to be applied across the replicasconsistency_level
- the consistency level for the operation
UnavailableException
OverloadedException
WriteTimeoutException
public static void mutateAtomically(java.util.Collection<RowMutation> mutations, ConsistencyLevel consistency_level) throws UnavailableException, OverloadedException, WriteTimeoutException
mutations
- the RowMutations to be applied across the replicasconsistency_level
- the consistency level for the operation
UnavailableException
OverloadedException
WriteTimeoutException
public static AbstractWriteResponseHandler performWrite(IMutation mutation, ConsistencyLevel consistency_level, java.lang.String localDataCenter, StorageProxy.WritePerformer performer, java.lang.Runnable callback, WriteType writeType) throws UnavailableException, OverloadedException, java.io.IOException
mutation
- the mutation to be appliedconsistency_level
- 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 is
successful.
UnavailableException
OverloadedException
java.io.IOException
public static void sendToHintedEndpoints(RowMutation rm, java.lang.Iterable<java.net.InetAddress> targets, AbstractWriteResponseHandler responseHandler, java.lang.String localDataCenter, ConsistencyLevel consistency_level) throws java.io.IOException, OverloadedException
java.util.concurrent.TimeoutException
- if the hints cannot be written/enqueued
java.io.IOException
OverloadedException
public static java.util.concurrent.Future<java.lang.Void> scheduleLocalHint(RowMutation mutation, java.net.InetAddress target, AbstractWriteResponseHandler responseHandler, ConsistencyLevel consistencyLevel)
public static void writeHintForMutation(RowMutation mutation, java.net.InetAddress target) throws java.io.IOException
java.io.IOException
public static AbstractWriteResponseHandler mutateCounter(CounterMutation cm, java.lang.String localDataCenter) throws UnavailableException, OverloadedException, java.io.IOException
UnavailableException
OverloadedException
java.io.IOException
public static AbstractWriteResponseHandler applyCounterMutationOnLeader(CounterMutation cm, java.lang.String localDataCenter, java.lang.Runnable callback) throws UnavailableException, java.io.IOException, OverloadedException
UnavailableException
java.io.IOException
OverloadedException
public static AbstractWriteResponseHandler applyCounterMutationOnCoordinator(CounterMutation cm, java.lang.String localDataCenter) throws UnavailableException, java.io.IOException, OverloadedException
UnavailableException
java.io.IOException
OverloadedException
public static java.util.List<Row> read(java.util.List<ReadCommand> commands, ConsistencyLevel consistency_level) throws java.io.IOException, UnavailableException, IsBootstrappingException, ReadTimeoutException
java.io.IOException
UnavailableException
IsBootstrappingException
ReadTimeoutException
public static java.util.List<Row> getRangeSlice(RangeSliceCommand command, ConsistencyLevel consistency_level) throws java.io.IOException, UnavailableException, ReadTimeoutException
java.io.IOException
UnavailableException
ReadTimeoutException
public static java.util.Map<java.lang.String,java.util.List<java.lang.String>> describeSchemaVersions()
public long getReadOperations()
getReadOperations
in interface StorageProxyMBean
LatencyMetrics.lastOpCount
public long getTotalReadLatencyMicros()
getTotalReadLatencyMicros
in interface StorageProxyMBean
LatencyMetrics.totalLatencyHistogram
public double getRecentReadLatencyMicros()
getRecentReadLatencyMicros
in interface StorageProxyMBean
LatencyMetrics.recentLatencyHistogram
public long[] getTotalReadLatencyHistogramMicros()
getTotalReadLatencyHistogramMicros
in interface StorageProxyMBean
LatencyMetrics.totalLatencyHistogram
public long[] getRecentReadLatencyHistogramMicros()
getRecentReadLatencyHistogramMicros
in interface StorageProxyMBean
LatencyMetrics.recentLatencyHistogram
public long getRangeOperations()
getRangeOperations
in interface StorageProxyMBean
public long getTotalRangeLatencyMicros()
getTotalRangeLatencyMicros
in interface StorageProxyMBean
public double getRecentRangeLatencyMicros()
getRecentRangeLatencyMicros
in interface StorageProxyMBean
public long[] getTotalRangeLatencyHistogramMicros()
getTotalRangeLatencyHistogramMicros
in interface StorageProxyMBean
public long[] getRecentRangeLatencyHistogramMicros()
getRecentRangeLatencyHistogramMicros
in interface StorageProxyMBean
public long getWriteOperations()
getWriteOperations
in interface StorageProxyMBean
public long getTotalWriteLatencyMicros()
getTotalWriteLatencyMicros
in interface StorageProxyMBean
public double getRecentWriteLatencyMicros()
getRecentWriteLatencyMicros
in interface StorageProxyMBean
public long[] getTotalWriteLatencyHistogramMicros()
getTotalWriteLatencyHistogramMicros
in interface StorageProxyMBean
public long[] getRecentWriteLatencyHistogramMicros()
getRecentWriteLatencyHistogramMicros
in interface StorageProxyMBean
public boolean getHintedHandoffEnabled()
getHintedHandoffEnabled
in interface StorageProxyMBean
public void setHintedHandoffEnabled(boolean b)
setHintedHandoffEnabled
in interface StorageProxyMBean
public int getMaxHintWindow()
getMaxHintWindow
in interface StorageProxyMBean
public void setMaxHintWindow(int ms)
setMaxHintWindow
in interface StorageProxyMBean
public static boolean shouldHint(java.net.InetAddress ep)
public static void truncateBlocking(java.lang.String keyspace, java.lang.String cfname) throws UnavailableException, java.util.concurrent.TimeoutException, java.io.IOException
keyspace
- cfname
-
UnavailableException
- If some of the hosts in the ring are down.
java.util.concurrent.TimeoutException
java.io.IOException
public long getTotalHints()
getTotalHints
in interface StorageProxyMBean
public int getMaxHintsInProgress()
getMaxHintsInProgress
in interface StorageProxyMBean
public void setMaxHintsInProgress(int qs)
setMaxHintsInProgress
in interface StorageProxyMBean
public int getHintsInProgress()
getHintsInProgress
in interface StorageProxyMBean
public void verifyNoHintsInProgress()
public java.lang.Long getRpcTimeout()
getRpcTimeout
in interface StorageProxyMBean
public void setRpcTimeout(java.lang.Long timeoutInMillis)
setRpcTimeout
in interface StorageProxyMBean
public java.lang.Long getReadRpcTimeout()
getReadRpcTimeout
in interface StorageProxyMBean
public void setReadRpcTimeout(java.lang.Long timeoutInMillis)
setReadRpcTimeout
in interface StorageProxyMBean
public java.lang.Long getWriteRpcTimeout()
getWriteRpcTimeout
in interface StorageProxyMBean
public void setWriteRpcTimeout(java.lang.Long timeoutInMillis)
setWriteRpcTimeout
in interface StorageProxyMBean
public java.lang.Long getRangeRpcTimeout()
getRangeRpcTimeout
in interface StorageProxyMBean
public void setRangeRpcTimeout(java.lang.Long timeoutInMillis)
setRangeRpcTimeout
in interface StorageProxyMBean
public java.lang.Long getTruncateRpcTimeout()
getTruncateRpcTimeout
in interface StorageProxyMBean
public void setTruncateRpcTimeout(java.lang.Long timeoutInMillis)
setTruncateRpcTimeout
in interface StorageProxyMBean
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |