hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From st...@apache.org
Subject hbase git commit: HBASE-19906 TestZooKeeper Timeout Includes move of TestQoSFunction from smalltests to mediumtests; it timedout in a run.
Date Thu, 01 Feb 2018 18:53:32 GMT
Repository: hbase
Updated Branches:
  refs/heads/master 52cb9aaf6 -> b21b8bfb9


HBASE-19906 TestZooKeeper Timeout Includes move of TestQoSFunction from smalltests to mediumtests;
it timedout in a run.


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

Branch: refs/heads/master
Commit: b21b8bfb91662bc65327f924504975997e0946da
Parents: 52cb9aa
Author: Michael Stack <stack@apache.org>
Authored: Wed Jan 31 14:02:11 2018 -0800
Committer: Michael Stack <stack@apache.org>
Committed: Thu Feb 1 10:53:18 2018 -0800

----------------------------------------------------------------------
 .../main/java/org/apache/hadoop/hbase/master/HMaster.java |  5 +++++
 .../hadoop/hbase/master/assignment/AssignmentManager.java | 10 +++++++++-
 .../apache/hadoop/hbase/regionserver/TestQosFunction.java |  4 ++--
 3 files changed, 16 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/b21b8bfb/hbase-server/src/main/java/org/apache/hadoop/hbase/master/HMaster.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/HMaster.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/HMaster.java
index 22f3bb9..d422960 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/HMaster.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/HMaster.java
@@ -869,6 +869,11 @@ public class HMaster extends HRegionServer implements MasterServices
{
     // Make sure meta assigned before proceeding.
     status.setStatus("Recovering  Meta Region");
 
+    // Check if master is shutting down because issue initializing regionservers or balancer.
+    if (isStopped()) {
+      return;
+    }
+
     // we recover hbase:meta region servers inside master initialization and
     // handle other failed servers in SSH in order to start up master node ASAP
     MasterMetaBootstrap metaBootstrap = createMetaBootstrap(this, status);

http://git-wip-us.apache.org/repos/asf/hbase/blob/b21b8bfb/hbase-server/src/main/java/org/apache/hadoop/hbase/master/assignment/AssignmentManager.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/assignment/AssignmentManager.java
b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/assignment/AssignmentManager.java
index d6b73f4..4bcd771 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/assignment/AssignmentManager.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/assignment/AssignmentManager.java
@@ -1895,9 +1895,17 @@ public class AssignmentManager implements ServerListener {
         .getRegionInfoForReplica(RegionInfoBuilder.FIRST_META_REGIONINFO,
             RegionInfo.DEFAULT_REPLICA_ID);
     RegionState regionStateNode = getRegionStates().getRegionState(hri);
-    if (!regionStateNode.getServerName().equals(serverName)) {
+    if (regionStateNode == null) {
+      LOG.warn("RegionStateNode is null for " + hri);
       return;
     }
+    ServerName rsnServerName = regionStateNode.getServerName();
+    if (rsnServerName != null && !rsnServerName.equals(serverName)) {
+      return;
+    } else if (rsnServerName == null) {
+      LOG.warn("Empty ServerName in RegionStateNode; proceeding anyways in case latched "
+
+          "RecoverMetaProcedure so meta latch gets cleaned up.");
+    }
     // meta has been assigned to crashed server.
     LOG.info("Meta assigned to crashed " + serverName + "; reassigning...");
     // Handle failure and wake event

http://git-wip-us.apache.org/repos/asf/hbase/blob/b21b8bfb/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestQosFunction.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestQosFunction.java
b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestQosFunction.java
index de415c7..99d140f 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestQosFunction.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestQosFunction.java
@@ -22,8 +22,8 @@ import static org.mockito.Mockito.when;
 import org.apache.hadoop.conf.Configuration;
 import org.apache.hadoop.hbase.*;
 import org.apache.hadoop.hbase.HBaseClassTestRule;
+import org.apache.hadoop.hbase.testclassification.MediumTests;
 import org.apache.hadoop.hbase.testclassification.RegionServerTests;
-import org.apache.hadoop.hbase.testclassification.SmallTests;
 import org.junit.Before;
 import org.junit.ClassRule;
 import org.junit.Test;
@@ -36,7 +36,7 @@ import org.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos.MultiReque
  * Basic test that qos function is sort of working; i.e. a change in method naming style
  * over in pb doesn't break it.
  */
-@Category({RegionServerTests.class, SmallTests.class})
+@Category({RegionServerTests.class, MediumTests.class})
 public class TestQosFunction extends QosTestHelper {
 
   @ClassRule


Mime
View raw message