public interface ReadRepair<E extends Endpoints<E>,P extends ReplicaPlan.ForRead<E,P>>
Modifier and Type | Interface and Description |
---|---|
static interface |
ReadRepair.Factory |
Modifier and Type | Method and Description |
---|---|
void |
awaitReads()
Block on the reads (or timeout) sent out in
startRepair(org.apache.cassandra.service.reads.DigestResolver<E, P>, java.util.function.Consumer<org.apache.cassandra.db.partitions.PartitionIterator>) |
void |
awaitWrites()
Block on any mutations (or timeout) we sent out to repair replicas in
repairPartition(org.apache.cassandra.db.DecoratedKey, java.util.Map<org.apache.cassandra.locator.Replica, org.apache.cassandra.db.Mutation>, org.apache.cassandra.locator.ReplicaPlan.ForWrite) |
static <E extends Endpoints<E>,P extends ReplicaPlan.ForRead<E,P>> |
create(ReadCommand command,
ReplicaPlan.Shared<E,P> replicaPlan,
long queryStartNanoTime) |
UnfilteredPartitionIterators.MergeListener |
getMergeListener(P replicaPlan)
Used by DataResolver to generate corrections as the partition iterator is consumed
|
void |
maybeSendAdditionalReads()
if it looks like we might not receive data requests from everyone in time, send additional requests
to additional replicas not contacted in the initial full data read.
|
void |
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.
|
void |
repairPartition(DecoratedKey partitionKey,
java.util.Map<Replica,Mutation> mutations,
ReplicaPlan.ForWrite writePlan)
Repairs a partition _after_ receiving data responses.
|
void |
startRepair(DigestResolver<E,P> digestResolver,
java.util.function.Consumer<PartitionIterator> resultConsumer)
Called when the digests from the initial read don't match.
|
static <E extends Endpoints<E>,P extends ReplicaPlan.ForRead<E,P>> ReadRepair<E,P> create(ReadCommand command, ReplicaPlan.Shared<E,P> replicaPlan, long queryStartNanoTime)
UnfilteredPartitionIterators.MergeListener getMergeListener(P replicaPlan)
void startRepair(DigestResolver<E,P> digestResolver, java.util.function.Consumer<PartitionIterator> resultConsumer)
digestResolver
- supplied so we can get the original data responseresultConsumer
- hook for the repair to set it's result on completionvoid awaitReads() throws ReadTimeoutException
startRepair(org.apache.cassandra.service.reads.DigestResolver<E, P>, java.util.function.Consumer<org.apache.cassandra.db.partitions.PartitionIterator>)
ReadTimeoutException
void maybeSendAdditionalReads()
void maybeSendAdditionalWrites()
void awaitWrites()
repairPartition(org.apache.cassandra.db.DecoratedKey, java.util.Map<org.apache.cassandra.locator.Replica, org.apache.cassandra.db.Mutation>, org.apache.cassandra.locator.ReplicaPlan.ForWrite)
void repairPartition(DecoratedKey partitionKey, java.util.Map<Replica,Mutation> mutations, ReplicaPlan.ForWrite writePlan)
Copyright © 2009-2022 The Apache Software Foundation