hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ecl...@apache.org
Subject hbase git commit: HBASE-14239 Fix Branch-1.2 AM can get stuck when meta moves
Date Mon, 24 Aug 2015 19:53:20 GMT
Repository: hbase
Updated Branches:
  refs/heads/master d31aedb99 -> bfae44a95


HBASE-14239 Fix Branch-1.2 AM can get stuck when meta moves


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

Branch: refs/heads/master
Commit: bfae44a95235981576da0a569385fd716e613d91
Parents: d31aedb
Author: Elliott Clark <eclark@apache.org>
Authored: Tue Aug 18 10:52:07 2015 -0700
Committer: Elliott Clark <eclark@apache.org>
Committed: Mon Aug 24 12:53:09 2015 -0700

----------------------------------------------------------------------
 .../hadoop/hbase/ipc/RWQueueRpcExecutor.java       | 17 ++++++++++++++---
 .../hadoop/hbase/master/MasterRpcServices.java     |  6 +-----
 .../hadoop/hbase/master/TestMasterPriorityRpc.java |  8 ++++----
 3 files changed, 19 insertions(+), 12 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/bfae44a9/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/RWQueueRpcExecutor.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/RWQueueRpcExecutor.java
b/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/RWQueueRpcExecutor.java
index 7ba2442..1be8c65 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/RWQueueRpcExecutor.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/RWQueueRpcExecutor.java
@@ -34,8 +34,7 @@ import org.apache.hadoop.hbase.classification.InterfaceStability;
 import org.apache.hadoop.hbase.protobuf.generated.ClientProtos.Action;
 import org.apache.hadoop.hbase.protobuf.generated.ClientProtos.MultiRequest;
 import org.apache.hadoop.hbase.protobuf.generated.ClientProtos.MutateRequest;
-import org.apache.hadoop.hbase.protobuf.generated
-  .RegionServerStatusProtos.ReportRegionStateTransitionRequest;
+import org.apache.hadoop.hbase.protobuf.generated.RegionServerStatusProtos;
 import org.apache.hadoop.hbase.protobuf.generated.ClientProtos.RegionAction;
 import org.apache.hadoop.hbase.protobuf.generated.ClientProtos.ScanRequest;
 import org.apache.hadoop.hbase.protobuf.generated.RPCProtos.RequestHeader;
@@ -189,7 +188,19 @@ public class RWQueueRpcExecutor extends RpcExecutor {
     if (param instanceof MutateRequest) {
       return true;
     }
-    if (param instanceof ReportRegionStateTransitionRequest) {
+    // Below here are methods for master. It's a pretty brittle version of this.
+    // Not sure that master actually needs a read/write queue since 90% of requests to
+    // master are writing to status or changing the meta table.
+    // All other read requests are admin generated and can be processed whenever.
+    // However changing that would require a pretty drastic change and should be done for
+    // the next major release and not as a fix for HBASE-14239
+    if (param instanceof RegionServerStatusProtos.ReportRegionStateTransitionRequest) {
+      return true;
+    }
+    if (param instanceof RegionServerStatusProtos.RegionServerStartupRequest) {
+      return true;
+    }
+    if (param instanceof RegionServerStatusProtos.RegionServerReportRequest) {
       return true;
     }
     return false;

http://git-wip-us.apache.org/repos/asf/hbase/blob/bfae44a9/hbase-server/src/main/java/org/apache/hadoop/hbase/master/MasterRpcServices.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/MasterRpcServices.java
b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/MasterRpcServices.java
index 9ce53e8..beda27c 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/MasterRpcServices.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/MasterRpcServices.java
@@ -285,7 +285,7 @@ public class MasterRpcServices extends RSRpcServices
   }
 
   @Override
-  @QosPriority(priority=HConstants.ADMIN_QOS)
+  @QosPriority(priority = HConstants.ADMIN_QOS)
   public GetLastFlushedSequenceIdResponse getLastFlushedSequenceId(RpcController controller,
       GetLastFlushedSequenceIdRequest request) throws ServiceException {
     try {
@@ -299,7 +299,6 @@ public class MasterRpcServices extends RSRpcServices
   }
 
   @Override
-  @QosPriority(priority=HConstants.ADMIN_QOS)
   public RegionServerReportResponse regionServerReport(
       RpcController controller, RegionServerReportRequest request) throws ServiceException
{
     try {
@@ -320,7 +319,6 @@ public class MasterRpcServices extends RSRpcServices
   }
 
   @Override
-  @QosPriority(priority=HConstants.ADMIN_QOS)
   public RegionServerStartupResponse regionServerStartup(
       RpcController controller, RegionServerStartupRequest request) throws ServiceException
{
     // Register with server manager
@@ -346,7 +344,6 @@ public class MasterRpcServices extends RSRpcServices
   }
 
   @Override
-  @QosPriority(priority=HConstants.ADMIN_QOS)
   public ReportRSFatalErrorResponse reportRSFatalError(
       RpcController controller, ReportRSFatalErrorRequest request) throws ServiceException
{
     String errorText = request.getErrorMessage();
@@ -1338,7 +1335,6 @@ public class MasterRpcServices extends RSRpcServices
   }
 
   @Override
-  @QosPriority(priority=HConstants.ADMIN_QOS)
   public ReportRegionStateTransitionResponse reportRegionStateTransition(RpcController c,
       ReportRegionStateTransitionRequest req) throws ServiceException {
     try {

http://git-wip-us.apache.org/repos/asf/hbase/blob/bfae44a9/hbase-server/src/test/java/org/apache/hadoop/hbase/master/TestMasterPriorityRpc.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/master/TestMasterPriorityRpc.java
b/hbase-server/src/test/java/org/apache/hadoop/hbase/master/TestMasterPriorityRpc.java
index 3aafe0f..057383a 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/master/TestMasterPriorityRpc.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/master/TestMasterPriorityRpc.java
@@ -46,12 +46,12 @@ public class TestMasterPriorityRpc {
   private PriorityFunction priority = null;
   private User user = null;
 
-  private final Set<String> ADMIN_METHODS = Sets.newHashSet("GetLastFlushedSequenceId",
-      "RegionServerReport", "RegionServerStartup", "ReportRSFatalError",
-      "ReportRegionStateTransition");
+  private final Set<String> ADMIN_METHODS = Sets.newHashSet("GetLastFlushedSequenceId");
 
   private final Set<String> NORMAL_METHODS = Sets.newHashSet("CreateTable", "DeleteTable",
-      "ModifyColumn", "OfflineRegion", "Shutdown");
+      "ModifyColumn", "OfflineRegion", "Shutdown",
+      "RegionServerReport", "RegionServerStartup", "ReportRSFatalError",
+      "ReportRegionStateTransition");
 
   @Before
   public void setup() {


Mime
View raw message