HBASE-23575 Remove dead code in AsyncRegistry (addendum)
Additions to MiniHBaseCluster needed for branch-2. Signed-off-by: Jan Hentschel <janh@apache.org> Signed-off-by: Xu Cang <xucang@apache.org> Signed-off-by: Sean Busbey <busbey@apache.org> Signed-off-by: Viraj Jasani <virajjasani007@gmail.com>
This commit is contained in:
parent
29d1a97482
commit
b38446c017
|
@ -764,6 +764,13 @@ public class MiniHBaseCluster extends HBaseCluster {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Number of live region servers in the cluster currently.
|
||||
*/
|
||||
public int getNumLiveRegionServers() {
|
||||
return this.hbaseCluster.getLiveRegionServers().size();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return List of region server threads. Does not return the master even though it is also
|
||||
* a region server.
|
||||
|
|
|
@ -356,7 +356,7 @@ public class TestAdmin extends TestAdminBase {
|
|||
|
||||
private void verifyRoundRobinDistribution(RegionLocator regionLocator, int expectedRegions)
|
||||
throws IOException {
|
||||
int numRS = TEST_UTIL.getMiniHBaseCluster().getRegionServerThreads().size();
|
||||
int numRS = TEST_UTIL.getMiniHBaseCluster().getNumLiveRegionServers();
|
||||
List<HRegionLocation> regions = regionLocator.getAllRegionLocations();
|
||||
Map<ServerName, List<RegionInfo>> server2Regions = new HashMap<>();
|
||||
for (HRegionLocation loc : regions) {
|
||||
|
|
|
@ -22,8 +22,6 @@ import static org.junit.Assert.assertEquals;
|
|||
import static org.junit.Assert.assertFalse;
|
||||
import static org.junit.Assert.assertTrue;
|
||||
import static org.junit.Assert.fail;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.Iterator;
|
||||
|
@ -268,9 +266,8 @@ public class TestAsyncTableAdminApi extends TestAsyncAdminBase {
|
|||
}
|
||||
}
|
||||
|
||||
private void verifyRoundRobinDistribution(List<HRegionLocation> regions, int expectedRegions)
|
||||
throws IOException {
|
||||
int numRS = TEST_UTIL.getMiniHBaseCluster().getRegionServerThreads().size();
|
||||
private void verifyRoundRobinDistribution(List<HRegionLocation> regions, int expectedRegions) {
|
||||
int numRS = TEST_UTIL.getMiniHBaseCluster().getNumLiveRegionServers();
|
||||
|
||||
Map<ServerName, List<RegionInfo>> server2Regions = new HashMap<>();
|
||||
regions.stream().forEach((loc) -> {
|
||||
|
|
Loading…
Reference in New Issue