use of org.apache.cassandra.locator.SimpleStrategy in project cassandra by apache.
the class MoveTransientTest method invokeCalculateRangesToFetchWithPreferredEndpoints.
private void invokeCalculateRangesToFetchWithPreferredEndpoints(RangesAtEndpoint toFetch, Pair<TokenMetadata, TokenMetadata> tmds, EndpointsByReplica expectedResult) {
DatabaseDescriptor.setTransientReplicationEnabledUnsafe(true);
EndpointsByReplica result = RangeStreamer.calculateRangesToFetchWithPreferredEndpoints((address, replicas) -> replicas.sorted((a, b) -> b.endpoint().compareTo(a.endpoint())), simpleStrategy(tmds.left), toFetch, true, tmds.left, tmds.right, "TestKeyspace", sourceFilters);
logger.info("Ranges to fetch with preferred endpoints");
logger.info(result.toString());
assertMultimapEqualsIgnoreOrder(expectedResult, result);
}
Aggregations