@Test public void getStrategyReturnsCorrectStrategy() { assertThat(partitioner.getStrategy(getWriteInfoWithFixedCellHash(NOTHING, 0))).isEmpty(); assertThat(partitioner.getStrategy(getWriteInfoWithFixedCellHash(CONSERVATIVE, 10))) .contains(SweeperStrategy.CONSERVATIVE); assertThat(partitioner.getStrategy(getWriteInfoWithFixedCellHash(THOROUGH, 100))) .contains(SweeperStrategy.THOROUGH); }
@VisibleForTesting Optional<SweeperStrategy> getStrategy(WriteInfo writeInfo) { return cache.getUnchecked(writeInfo.tableRef()); }
WriteInfoPartitioner { @VisibleForTesting Optional<SweeperStrategy> getStrategy(WriteInfo writeInfo) { return cache.getUnchecked(writeInfo.tableRef()); } }
WriteInfoPartitioner { @VisibleForTesting Optional<SweeperStrategy> getStrategy(WriteInfo writeInfo) { return cache.getUnchecked(writeInfo.tableRef()); } WriteInfoPartitioner(KeyValueService kvs, Supplier<Integer> numShards); }
WriteInfoPartitioner { @VisibleForTesting Optional<SweeperStrategy> getStrategy(WriteInfo writeInfo) { return cache.getUnchecked(writeInfo.tableRef()); } WriteInfoPartitioner(KeyValueService kvs, Supplier<Integer> numShards); Map<PartitionInfo, List<WriteInfo>> filterAndPartition(List<WriteInfo> writes); }
WriteInfoPartitioner { @VisibleForTesting Optional<SweeperStrategy> getStrategy(WriteInfo writeInfo) { return cache.getUnchecked(writeInfo.tableRef()); } WriteInfoPartitioner(KeyValueService kvs, Supplier<Integer> numShards); Map<PartitionInfo, List<WriteInfo>> filterAndPartition(List<WriteInfo> writes);  }