@Test(expectedExceptions = IllegalStateException.class) public void testLookupBucketTable_range_failed_overlapped() throws Exception { bucketManager.lookupBucketTable(Range.closed(99, 100)); }
public ShardState lookupBucketTable(int bucketId) { ShardState shardState = bucketMap.get(bucketId); if (shardState == null) { throw new IllegalStateException("Bucket ID doesn't exist in bucket table - " + bucketId); } return shardState; }
BucketManager { public ShardState lookupBucketTable(int bucketId) { ShardState shardState = bucketMap.get(bucketId); if (shardState == null) { throw new IllegalStateException("Bucket ID doesn't exist in bucket table - " + bucketId); } return shardState; } }
BucketManager { public ShardState lookupBucketTable(int bucketId) { ShardState shardState = bucketMap.get(bucketId); if (shardState == null) { throw new IllegalStateException("Bucket ID doesn't exist in bucket table - " + bucketId); } return shardState; } BucketManager(Config config); }
BucketManager { public ShardState lookupBucketTable(int bucketId) { ShardState shardState = bucketMap.get(bucketId); if (shardState == null) { throw new IllegalStateException("Bucket ID doesn't exist in bucket table - " + bucketId); } return shardState; } BucketManager(Config config); ShardState lookupBucketTable(int bucketId); ShardState lookupBucketTable(Range<Integer> range); void updateBucketRange(Range<Integer> range, String fromShardId, String toShardId,
                                  boolean migrationComplete); int getNumberOfBuckets(); RangeMap<Integer, ShardState> getBucketMap(); void rollbackBuckets(Range<Integer> range); String getBucketString(String shardId); }
BucketManager { public ShardState lookupBucketTable(int bucketId) { ShardState shardState = bucketMap.get(bucketId); if (shardState == null) { throw new IllegalStateException("Bucket ID doesn't exist in bucket table - " + bucketId); } return shardState; } BucketManager(Config config); ShardState lookupBucketTable(int bucketId); ShardState lookupBucketTable(Range<Integer> range); void updateBucketRange(Range<Integer> range, String fromShardId, String toShardId,
                                  boolean migrationComplete); int getNumberOfBuckets(); RangeMap<Integer, ShardState> getBucketMap(); void rollbackBuckets(Range<Integer> range); String getBucketString(String shardId);  }