@Test public void getStrategyThrowsForIllegalMetadata() { when(mockKvs.getMetadataForTable(any())).thenReturn(AtlasDbConstants.EMPTY_TABLE_METADATA); assertThatThrownBy(() -> partitioner.getStrategy(getWriteInfoWithFixedCellHash(getTableRef("a"), 0))) .isInstanceOf(UncheckedExecutionException.class); }
@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);  }