@Test(expected = VerifyException.class) public void rejectNullEndOfRange() { Differ.validateRange(BigInteger.TEN, null, TokenHelper.MURMUR3); }
@VisibleForTesting static void validateRange(BigInteger start, BigInteger end, TokenHelper tokens) { Verify.verify(start != null && end != null, "Invalid token range [%s,%s]", start, end); Verify.verify(start.compareTo(tokens.min()) >= 0 && end.compareTo(tokens.max()) <= 0 && start.compareTo(end) < 0, "Invalid token range [%s,%s] for partitioner range [%s,%s]", start, end, tokens.min(), tokens.max()); }
Differ implements Serializable { @VisibleForTesting static void validateRange(BigInteger start, BigInteger end, TokenHelper tokens) { Verify.verify(start != null && end != null, "Invalid token range [%s,%s]", start, end); Verify.verify(start.compareTo(tokens.min()) >= 0 && end.compareTo(tokens.max()) <= 0 && start.compareTo(end) < 0, "Invalid token range [%s,%s] for partitioner range [%s,%s]", start, end, tokens.min(), tokens.max()); } }
Differ implements Serializable { @VisibleForTesting static void validateRange(BigInteger start, BigInteger end, TokenHelper tokens) { Verify.verify(start != null && end != null, "Invalid token range [%s,%s]", start, end); Verify.verify(start.compareTo(tokens.min()) >= 0 && end.compareTo(tokens.max()) <= 0 && start.compareTo(end) < 0, "Invalid token range [%s,%s] for partitioner range [%s,%s]", start, end, tokens.min(), tokens.max()); } Differ(JobConfiguration config,
                  DiffJob.Params params,
                  int perExecutorRateLimit,
                  DiffJob.Split split,
                  TokenHelper tokenHelper,
                  ClusterProvider sourceProvider,
                  ClusterProvider targetProvider,
                  ClusterProvider metadataProvider,
                  DiffJob.TrackerProvider trackerProvider); }
Differ implements Serializable { @VisibleForTesting static void validateRange(BigInteger start, BigInteger end, TokenHelper tokens) { Verify.verify(start != null && end != null, "Invalid token range [%s,%s]", start, end); Verify.verify(start.compareTo(tokens.min()) >= 0 && end.compareTo(tokens.max()) <= 0 && start.compareTo(end) < 0, "Invalid token range [%s,%s] for partitioner range [%s,%s]", start, end, tokens.min(), tokens.max()); } Differ(JobConfiguration config,
                  DiffJob.Params params,
                  int perExecutorRateLimit,
                  DiffJob.Split split,
                  TokenHelper tokenHelper,
                  ClusterProvider sourceProvider,
                  ClusterProvider targetProvider,
                  ClusterProvider metadataProvider,
                  DiffJob.TrackerProvider trackerProvider); Map<KeyspaceTablePair, RangeStats> run(); RangeStats diffTable(final DiffContext context,
                                final BiConsumer<Throwable, BigInteger> partitionErrorReporter,
                                final BiConsumer<MismatchType, BigInteger> mismatchReporter,
                                final BiConsumer<RangeStats, BigInteger> journal); static void shutdown(); }
Differ implements Serializable { @VisibleForTesting static void validateRange(BigInteger start, BigInteger end, TokenHelper tokens) { Verify.verify(start != null && end != null, "Invalid token range [%s,%s]", start, end); Verify.verify(start.compareTo(tokens.min()) >= 0 && end.compareTo(tokens.max()) <= 0 && start.compareTo(end) < 0, "Invalid token range [%s,%s] for partitioner range [%s,%s]", start, end, tokens.min(), tokens.max()); } Differ(JobConfiguration config,
                  DiffJob.Params params,
                  int perExecutorRateLimit,
                  DiffJob.Split split,
                  TokenHelper tokenHelper,
                  ClusterProvider sourceProvider,
                  ClusterProvider targetProvider,
                  ClusterProvider metadataProvider,
                  DiffJob.TrackerProvider trackerProvider); Map<KeyspaceTablePair, RangeStats> run(); RangeStats diffTable(final DiffContext context,
                                final BiConsumer<Throwable, BigInteger> partitionErrorReporter,
                                final BiConsumer<MismatchType, BigInteger> mismatchReporter,
                                final BiConsumer<RangeStats, BigInteger> journal); static void shutdown();  }