HBASE-16552 MiniHBaseCluster#getServerWith() does not ignore stopped RSs
This commit is contained in:
parent
2fcc691b16
commit
008091fe8a
|
@ -696,11 +696,13 @@ public class MiniHBaseCluster extends HBaseCluster {
|
|||
int count = 0;
|
||||
for (JVMClusterUtil.RegionServerThread rst: getRegionServerThreads()) {
|
||||
HRegionServer hrs = rst.getRegionServer();
|
||||
if (!hrs.isStopped()) {
|
||||
Region region = hrs.getOnlineRegion(regionName);
|
||||
if (region != null) {
|
||||
index = count;
|
||||
break;
|
||||
}
|
||||
}
|
||||
count++;
|
||||
}
|
||||
return index;
|
||||
|
|
Loading…
Reference in New Issue