hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From te...@apache.org
Subject hbase git commit: HBASE-15571 Make MasterProcedureManagerHost accessible through MasterServices
Date Thu, 31 Mar 2016 22:52:10 GMT
Repository: hbase
Updated Branches:
  refs/heads/HBASE-7912 49db355e3 -> 1e9470dd7


HBASE-15571 Make MasterProcedureManagerHost accessible through MasterServices


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

Branch: refs/heads/HBASE-7912
Commit: 1e9470dd7814fba25c5a7fd2ed4ec38d3f91b8f1
Parents: 49db355
Author: tedyu <yuzhihong@gmail.com>
Authored: Thu Mar 31 15:51:43 2016 -0700
Committer: tedyu <yuzhihong@gmail.com>
Committed: Thu Mar 31 15:51:43 2016 -0700

----------------------------------------------------------------------
 .../main/java/org/apache/hadoop/hbase/master/HMaster.java   | 9 ++++++++-
 .../org/apache/hadoop/hbase/master/MasterRpcServices.java   | 6 +++---
 .../java/org/apache/hadoop/hbase/master/MasterServices.java | 6 ++++++
 .../org/apache/hadoop/hbase/master/TestCatalogJanitor.java  | 6 ++++++
 4 files changed, 23 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/1e9470dd/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 656784b..5bba1ea 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
@@ -332,7 +332,7 @@ public class HMaster extends HRegionServer implements MasterServices {
   // monitor for snapshot of hbase tables
   SnapshotManager snapshotManager;
   // monitor for distributed procedures
-  MasterProcedureManagerHost mpmHost;
+  private MasterProcedureManagerHost mpmHost;
 
   // it is assigned after 'initialized' guard set to true, so should be volatile
   private volatile MasterQuotaManager quotaManager;
@@ -2450,6 +2450,13 @@ public class HMaster extends HRegionServer implements MasterServices
{
     return this.snapshotManager;
   }
 
+  /**
+   * @return the underlying MasterProcedureManagerHost
+   */
+  public MasterProcedureManagerHost getMasterProcedureManagerHost() {
+    return mpmHost;
+  }
+
   @Override
   public ClusterSchema getClusterSchema() {
     return this.clusterSchemaService;

http://git-wip-us.apache.org/repos/asf/hbase/blob/1e9470dd/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 d6a53cd..8b036d9 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
@@ -641,7 +641,7 @@ public class MasterRpcServices extends RSRpcServices
     try {
       master.checkInitialized();
       ProcedureDescription desc = request.getProcedure();
-      MasterProcedureManager mpm = master.mpmHost.getProcedureManager(
+      MasterProcedureManager mpm = master.getMasterProcedureManagerHost().getProcedureManager(
         desc.getSignature());
       if (mpm == null) {
         throw new ServiceException("The procedure is not registered: "
@@ -676,7 +676,7 @@ public class MasterRpcServices extends RSRpcServices
     try {
       master.checkInitialized();
       ProcedureDescription desc = request.getProcedure();
-      MasterProcedureManager mpm = master.mpmHost.getProcedureManager(
+      MasterProcedureManager mpm = master.getMasterProcedureManagerHost().getProcedureManager(
         desc.getSignature());
       if (mpm == null) {
         throw new ServiceException("The procedure is not registered: "
@@ -894,7 +894,7 @@ public class MasterRpcServices extends RSRpcServices
     try {
       master.checkInitialized();
       ProcedureDescription desc = request.getProcedure();
-      MasterProcedureManager mpm = master.mpmHost.getProcedureManager(
+      MasterProcedureManager mpm = master.getMasterProcedureManagerHost().getProcedureManager(
         desc.getSignature());
       if (mpm == null) {
         throw new ServiceException("The procedure is not registered: "

http://git-wip-us.apache.org/repos/asf/hbase/blob/1e9470dd/hbase-server/src/main/java/org/apache/hadoop/hbase/master/MasterServices.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/MasterServices.java
b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/MasterServices.java
index d32297c..867faed 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/MasterServices.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/MasterServices.java
@@ -35,6 +35,7 @@ import org.apache.hadoop.hbase.executor.ExecutorService;
 import org.apache.hadoop.hbase.master.normalizer.RegionNormalizer;
 import org.apache.hadoop.hbase.master.procedure.MasterProcedureEnv;
 import org.apache.hadoop.hbase.master.snapshot.SnapshotManager;
+import org.apache.hadoop.hbase.procedure.MasterProcedureManagerHost;
 import org.apache.hadoop.hbase.procedure2.ProcedureExecutor;
 import org.apache.hadoop.hbase.quotas.MasterQuotaManager;
 import org.apache.hadoop.hbase.security.User;
@@ -52,6 +53,11 @@ public interface MasterServices extends Server {
   SnapshotManager getSnapshotManager();
 
   /**
+   * @return the underlying MasterProcedureManagerHost
+   */
+  MasterProcedureManagerHost getMasterProcedureManagerHost();
+
+  /**
    * @return Master's instance of {@link ClusterSchema}
    */
   ClusterSchema getClusterSchema();

http://git-wip-us.apache.org/repos/asf/hbase/blob/1e9470dd/hbase-server/src/test/java/org/apache/hadoop/hbase/master/TestCatalogJanitor.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/master/TestCatalogJanitor.java
b/hbase-server/src/test/java/org/apache/hadoop/hbase/master/TestCatalogJanitor.java
index a483311..3090488 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/master/TestCatalogJanitor.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/master/TestCatalogJanitor.java
@@ -65,6 +65,7 @@ import org.apache.hadoop.hbase.master.CatalogJanitor.SplitParentFirstComparator;
 import org.apache.hadoop.hbase.master.normalizer.RegionNormalizer;
 import org.apache.hadoop.hbase.master.procedure.MasterProcedureEnv;
 import org.apache.hadoop.hbase.master.snapshot.SnapshotManager;
+import org.apache.hadoop.hbase.procedure.MasterProcedureManagerHost;
 import org.apache.hadoop.hbase.procedure2.ProcedureExecutor;
 import org.apache.hadoop.hbase.protobuf.ProtobufUtil;
 import org.apache.hadoop.hbase.protobuf.generated.AdminProtos;
@@ -249,6 +250,11 @@ public class TestCatalogJanitor {
     }
 
     @Override
+    public MasterProcedureManagerHost getMasterProcedureManagerHost() {
+      return null;
+    }
+
+    @Override
     public AssignmentManager getAssignmentManager() {
       return this.asm;
     }


Mime
View raw message