public class RangeRelocator
extends java.lang.Object
Constructor and Description |
---|
RangeRelocator() |
Modifier and Type | Method and Description |
---|---|
static RangesByEndpoint |
calculateRangesToStreamWithEndpoints(RangesAtEndpoint streamRanges,
AbstractReplicationStrategy strat,
TokenMetadata tmdBefore,
TokenMetadata tmdAfter)
calculating endpoints to stream current ranges to if needed
in some situations node will handle current ranges as part of the new ranges
|
static Pair<RangesAtEndpoint,RangesAtEndpoint> |
calculateStreamAndFetchRanges(RangesAtEndpoint currentRanges,
RangesAtEndpoint updatedRanges)
Calculate pair of ranges to stream/fetch for given two range collections
(current ranges for keyspace and ranges after move to new token)
With transient replication the added wrinkle is that if a range transitions from full to transient then
we need to stream the range despite the fact that we are retaining it as transient.
|
void |
calculateToFromStreams() |
java.util.concurrent.Future<StreamState> |
stream() |
boolean |
streamsNeeded() |
public static RangesByEndpoint calculateRangesToStreamWithEndpoints(RangesAtEndpoint streamRanges, AbstractReplicationStrategy strat, TokenMetadata tmdBefore, TokenMetadata tmdAfter)
public void calculateToFromStreams()
public static Pair<RangesAtEndpoint,RangesAtEndpoint> calculateStreamAndFetchRanges(RangesAtEndpoint currentRanges, RangesAtEndpoint updatedRanges)
currentRanges
- collection of the ranges by current tokenupdatedRanges
- collection of the ranges after token is changedpublic java.util.concurrent.Future<StreamState> stream()
public boolean streamsNeeded()
Copyright © 2009-2021 The Apache Software Foundation