Class ReduceHelper
java.lang.Object
org.apache.cassandra.repair.asymmetric.ReduceHelper
Basic idea is that we track incoming ranges instead of blindly just exchanging the ranges that mismatch between two nodes
Say node X has tracked that it will stream range r1 from node Y. Now we see find a diffing range
r1 between node X and Z. When adding r1 from Z as an incoming to X we check if Y and Z are equal on range r (ie, there is
no difference between them). If they are equal X can stream from Y or Z and the end result will be the same.
The ranges wont match perfectly since we don't iterate over leaves so we always split based on the
smallest range (either the new difference or the existing one)
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic com.google.common.collect.ImmutableMap<InetAddressAndPort,HostDifferences> reduce(DifferenceHolder differences, PreferedNodeFilter filter) Reduces the differences provided by the merkle trees to a minimum set of differences
-
Constructor Details
-
ReduceHelper
public ReduceHelper()
-
-
Method Details
-
reduce
public static com.google.common.collect.ImmutableMap<InetAddressAndPort,HostDifferences> reduce(DifferenceHolder differences, PreferedNodeFilter filter) Reduces the differences provided by the merkle trees to a minimum set of differences
-