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-15559 Fix BaseMasterAndRegionObserver doesn't implement all the methods
Date Wed, 30 Mar 2016 18:21:57 GMT
Repository: hbase
Updated Branches:
  refs/heads/branch-1.3 07db39a02 -> b310b0223


HBASE-15559 Fix  BaseMasterAndRegionObserver doesn't implement all the methods


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

Branch: refs/heads/branch-1.3
Commit: b310b02232d64ab07bd44639fe305e7ed035136d
Parents: 07db39a
Author: Elliott Clark <eclark@apache.org>
Authored: Tue Mar 29 10:10:35 2016 -0700
Committer: Elliott Clark <eclark@apache.org>
Committed: Wed Mar 30 11:20:23 2016 -0700

----------------------------------------------------------------------
 .../BaseMasterAndRegionObserver.java            | 23 +++++++++++++++++---
 .../hbase/coprocessor/BaseRegionObserver.java   |  2 +-
 2 files changed, 21 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/b310b022/hbase-server/src/main/java/org/apache/hadoop/hbase/coprocessor/BaseMasterAndRegionObserver.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/coprocessor/BaseMasterAndRegionObserver.java
b/hbase-server/src/main/java/org/apache/hadoop/hbase/coprocessor/BaseMasterAndRegionObserver.java
index 773e16b..2d8fdba 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/coprocessor/BaseMasterAndRegionObserver.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/coprocessor/BaseMasterAndRegionObserver.java
@@ -30,6 +30,7 @@ import org.apache.hadoop.hbase.CoprocessorEnvironment;
 import org.apache.hadoop.hbase.HTableDescriptor;
 import org.apache.hadoop.hbase.NamespaceDescriptor;
 import org.apache.hadoop.hbase.ServerName;
+import org.apache.hadoop.hbase.client.Admin;
 import org.apache.hadoop.hbase.master.RegionPlan;
 import org.apache.hadoop.hbase.master.procedure.MasterProcedureEnv;
 import org.apache.hadoop.hbase.procedure2.ProcedureExecutor;
@@ -41,7 +42,7 @@ import java.util.List;
 
 @InterfaceAudience.LimitedPrivate(HBaseInterfaceAudience.COPROC)
 @InterfaceStability.Evolving
-public abstract class BaseMasterAndRegionObserver extends BaseRegionObserver
+public class BaseMasterAndRegionObserver extends BaseRegionObserver
     implements MasterObserver {
   @Override
   public void preCreateTable(ObserverContext<MasterCoprocessorEnvironment> ctx,
@@ -366,6 +367,22 @@ public abstract class BaseMasterAndRegionObserver extends BaseRegionObserver
   }
 
   @Override
+  public boolean preSetSplitOrMergeEnabled(ObserverContext<MasterCoprocessorEnvironment>
ctx,
+                                           boolean newValue,
+                                           Admin.MasterSwitchType switchType)
+      throws IOException {
+    return false;
+  }
+
+  @Override
+  public void postSetSplitOrMergeEnabled(ObserverContext<MasterCoprocessorEnvironment>
ctx,
+                                         boolean newValue,
+                                         Admin.MasterSwitchType switchType)
+      throws IOException {
+
+  }
+
+  @Override
   public boolean preBalanceSwitch(ObserverContext<MasterCoprocessorEnvironment> ctx,
       boolean b) throws IOException {
     return b;
@@ -427,7 +444,7 @@ public abstract class BaseMasterAndRegionObserver extends BaseRegionObserver
       final SnapshotDescription snapshot, final HTableDescriptor hTableDescriptor)
       throws IOException {
   }
-  
+
   @Override
   public void preListSnapshot(final ObserverContext<MasterCoprocessorEnvironment> ctx,
       final SnapshotDescription snapshot) throws IOException {
@@ -514,7 +531,7 @@ public abstract class BaseMasterAndRegionObserver extends BaseRegionObserver
   public void postTableFlush(ObserverContext<MasterCoprocessorEnvironment> ctx,
       TableName tableName) throws IOException {
   }
-  
+
   @Override
   public void preSetUserQuota(final ObserverContext<MasterCoprocessorEnvironment> ctx,
       final String userName, final Quotas quotas) throws IOException {

http://git-wip-us.apache.org/repos/asf/hbase/blob/b310b022/hbase-server/src/main/java/org/apache/hadoop/hbase/coprocessor/BaseRegionObserver.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/coprocessor/BaseRegionObserver.java
b/hbase-server/src/main/java/org/apache/hadoop/hbase/coprocessor/BaseRegionObserver.java
index d1ec1b3..1bf7449 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/coprocessor/BaseRegionObserver.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/coprocessor/BaseRegionObserver.java
@@ -71,7 +71,7 @@ import com.google.common.collect.ImmutableList;
  */
 @InterfaceAudience.LimitedPrivate(HBaseInterfaceAudience.COPROC)
 @InterfaceStability.Evolving
-public abstract class BaseRegionObserver implements RegionObserver {
+public class BaseRegionObserver implements RegionObserver {
   @Override
   public void start(CoprocessorEnvironment e) throws IOException { }
 


Mime
View raw message