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