Class BlockingPartitionRepair
java.lang.Object
org.apache.cassandra.utils.concurrent.AbstractFuture<V>
org.apache.cassandra.utils.concurrent.AsyncFuture<Object>
org.apache.cassandra.service.reads.repair.BlockingPartitionRepair
- All Implemented Interfaces:
com.google.common.util.concurrent.ListenableFuture<Object>,io.netty.util.concurrent.Future<Object>,Future<Object>,RequestCallback<Object>,Awaitable,Future<Object>
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.apache.cassandra.utils.concurrent.Awaitable
Awaitable.AbstractAwaitable, Awaitable.AsyncAwaitable, Awaitable.Defaults, Awaitable.SyncAwaitable -
Field Summary
Fields inherited from class org.apache.cassandra.utils.concurrent.AbstractFuture
CANCELLED, UNCANCELLABLE, UNSET -
Constructor Summary
ConstructorsConstructorDescriptionBlockingPartitionRepair(DecoratedKey key, Map<Replica, Mutation> repairs, ReplicaPlan.ForWrite writePlan) -
Method Summary
Modifier and TypeMethodDescriptionbooleanawaitRepairsUntil(long timeoutAt, TimeUnit timeUnit) Wait for the repair to complete util a future time If the is a past time, the method returns immediately with the repair result.voidmaybeSendAdditionalWrites(long timeout, TimeUnit timeoutUnit) If it looks like we might not receive acks for all the repair mutations we sent out, combine all the unacked mutations and send them to the minority of nodes not involved in the read repair data read / write cycle.voidonResponse(Message<Object> msg) voidprotected voidsendRR(Message<Mutation> message, InetAddressAndPort endpoint) Methods inherited from class org.apache.cassandra.utils.concurrent.AsyncFuture
await, awaitUntil, flatMap, mapMethods inherited from class org.apache.cassandra.utils.concurrent.AbstractFuture
addCallback, addCallback, addCallback, addCallback, addCallback, addCallback, addListener, addListener, addListener, addListeners, await, awaitThrowUncheckedOnInterrupt, awaitThrowUncheckedOnInterrupt, awaitUninterruptibly, awaitUninterruptibly, awaitUntilThrowUncheckedOnInterrupt, awaitUntilUninterruptibly, cancel, cause, description, flatMap, get, get, getNow, getWhenDone, isCancellable, isCancelled, isDone, isSuccess, isUncancellable, map, map, notifyExecutor, removeListener, removeListeners, setUncancellable, setUncancellableExclusive, toString, tryFailure, trySuccessMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.apache.cassandra.utils.concurrent.Future
await, awaitUninterruptibly, flatMap, rethrowIfFailed, sync, syncThrowUncheckedOnInterrupt, syncUninterruptiblyMethods inherited from interface org.apache.cassandra.net.RequestCallback
invokeOnFailure, onFailure, trackLatencyForSnitch
-
Constructor Details
-
BlockingPartitionRepair
public BlockingPartitionRepair(DecoratedKey key, Map<Replica, Mutation> repairs, ReplicaPlan.ForWrite writePlan)
-
-
Method Details
-
onResponse
- Specified by:
onResponsein interfaceRequestCallback<Object>- Parameters:
msg- response received.
-
sendRR
-
sendInitialRepairs
public void sendInitialRepairs() -
awaitRepairsUntil
Wait for the repair to complete util a future time If the is a past time, the method returns immediately with the repair result.- Parameters:
timeoutAt- future timetimeUnit- the time unit of the future time- Returns:
- true if repair is done; otherwise, false.
-
maybeSendAdditionalWrites
If it looks like we might not receive acks for all the repair mutations we sent out, combine all the unacked mutations and send them to the minority of nodes not involved in the read repair data read / write cycle. We will accept acks from them in lieu of acks from the initial mutations sent out, so long as we receive the same number of acks as repair mutations transmitted. This prevents misbehaving nodes from killing a quorum read, while continuing to guarantee monotonic quorum reads
-