hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mberto...@apache.org
Subject [3/5] hbase git commit: HBASE-16552 MiniHBaseCluster#getServerWith() does not ignore stopped RSs
Date Sat, 03 Sep 2016 00:01:52 GMT
HBASE-16552 MiniHBaseCluster#getServerWith() does not ignore stopped RSs


Project: http://git-wip-us.apache.org/repos/asf/hbase/repo
Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/161f6178
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/161f6178
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/161f6178

Branch: refs/heads/branch-1.3
Commit: 161f61787dd5540fff5f65227263cf1d55ef2e05
Parents: 2c791e9
Author: Matteo Bertozzi <matteo.bertozzi@cloudera.com>
Authored: Fri Sep 2 16:49:17 2016 -0700
Committer: Matteo Bertozzi <matteo.bertozzi@cloudera.com>
Committed: Fri Sep 2 16:53:12 2016 -0700

----------------------------------------------------------------------
 .../java/org/apache/hadoop/hbase/MiniHBaseCluster.java    | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/161f6178/hbase-server/src/test/java/org/apache/hadoop/hbase/MiniHBaseCluster.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/MiniHBaseCluster.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/MiniHBaseCluster.java
index f788bed..706d8e7 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/MiniHBaseCluster.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/MiniHBaseCluster.java
@@ -696,10 +696,12 @@ public class MiniHBaseCluster extends HBaseCluster {
     int count = 0;
     for (JVMClusterUtil.RegionServerThread rst: getRegionServerThreads()) {
       HRegionServer hrs = rst.getRegionServer();
-      Region region = hrs.getOnlineRegion(regionName);
-      if (region != null) {
-        index = count;
-        break;
+      if (!hrs.isStopped()) {
+        Region region = hrs.getOnlineRegion(regionName);
+        if (region != null) {
+          index = count;
+          break;
+        }
       }
       count++;
     }


Mime
View raw message