public class NoopReadRepair<E extends Endpoints<E>,P extends ReplicaPlan.ForRead<E>> extends java.lang.Object implements ReadRepair<E,P>
ReadRepair.Factory
Modifier and Type | Field and Description |
---|---|
static NoopReadRepair |
instance |
Modifier and Type | Method and Description |
---|---|
void |
awaitReads()
Block on the reads (or timeout) sent out in
ReadRepair.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
ReadRepair.repairPartition(org.apache.cassandra.db.DecoratedKey, java.util.Map<org.apache.cassandra.locator.Replica, org.apache.cassandra.db.Mutation>, org.apache.cassandra.locator.ReplicaPlan.ForTokenWrite) |
UnfilteredPartitionIterators.MergeListener |
getMergeListener(P replicas)
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.ForTokenWrite 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.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
create
public static final NoopReadRepair instance
public UnfilteredPartitionIterators.MergeListener getMergeListener(P replicas)
ReadRepair
getMergeListener
in interface ReadRepair<E extends Endpoints<E>,P extends ReplicaPlan.ForRead<E>>
public void startRepair(DigestResolver<E,P> digestResolver, java.util.function.Consumer<PartitionIterator> resultConsumer)
ReadRepair
startRepair
in interface ReadRepair<E extends Endpoints<E>,P extends ReplicaPlan.ForRead<E>>
digestResolver
- supplied so we can get the original data responseresultConsumer
- hook for the repair to set it's result on completionpublic void awaitReads() throws ReadTimeoutException
ReadRepair
ReadRepair.startRepair(org.apache.cassandra.service.reads.DigestResolver<E, P>, java.util.function.Consumer<org.apache.cassandra.db.partitions.PartitionIterator>)
awaitReads
in interface ReadRepair<E extends Endpoints<E>,P extends ReplicaPlan.ForRead<E>>
ReadTimeoutException
public void maybeSendAdditionalReads()
ReadRepair
maybeSendAdditionalReads
in interface ReadRepair<E extends Endpoints<E>,P extends ReplicaPlan.ForRead<E>>
public void maybeSendAdditionalWrites()
ReadRepair
maybeSendAdditionalWrites
in interface ReadRepair<E extends Endpoints<E>,P extends ReplicaPlan.ForRead<E>>
public void awaitWrites()
ReadRepair
ReadRepair.repairPartition(org.apache.cassandra.db.DecoratedKey, java.util.Map<org.apache.cassandra.locator.Replica, org.apache.cassandra.db.Mutation>, org.apache.cassandra.locator.ReplicaPlan.ForTokenWrite)
awaitWrites
in interface ReadRepair<E extends Endpoints<E>,P extends ReplicaPlan.ForRead<E>>
public void repairPartition(DecoratedKey partitionKey, java.util.Map<Replica,Mutation> mutations, ReplicaPlan.ForTokenWrite writePlan)
ReadRepair
repairPartition
in interface ReadRepair<E extends Endpoints<E>,P extends ReplicaPlan.ForRead<E>>
Copyright © 2009-2021 The Apache Software Foundation