hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mberto...@apache.org
Subject [2/3] git commit: HBASE-11757 Provide a common base abstract class for both RegionObserver and MasterObserver
Date Mon, 18 Aug 2014 19:19:43 GMT
HBASE-11757 Provide a common base abstract class for both RegionObserver and MasterObserver


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

Branch: refs/heads/branch-1
Commit: bf5eac49a92ea4dc663f18637ef8964eb56ffc8d
Parents: 73e04b0
Author: Matteo Bertozzi <matteo.bertozzi@cloudera.com>
Authored: Mon Aug 18 20:14:25 2014 +0100
Committer: Matteo Bertozzi <matteo.bertozzi@cloudera.com>
Committed: Mon Aug 18 20:15:08 2014 +0100

----------------------------------------------------------------------
 .../BaseMasterAndRegionObserver.java            | 428 +++++++++++++++++++
 .../hbase/security/access/AccessController.java | 184 +-------
 .../visibility/VisibilityController.java        | 336 +--------------
 3 files changed, 442 insertions(+), 506 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/bf5eac49/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
new file mode 100644
index 0000000..600dcd2
--- /dev/null
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/coprocessor/BaseMasterAndRegionObserver.java
@@ -0,0 +1,428 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.hadoop.hbase.coprocessor;
+
+import org.apache.hadoop.classification.InterfaceAudience;
+import org.apache.hadoop.classification.InterfaceStability;
+import org.apache.hadoop.hbase.HBaseInterfaceAudience;
+import org.apache.hadoop.hbase.TableName;
+import org.apache.hadoop.hbase.HColumnDescriptor;
+import org.apache.hadoop.hbase.HRegionInfo;
+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.master.RegionPlan;
+import org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.SnapshotDescription;
+
+import java.io.IOException;
+import java.util.List;
+
+@InterfaceAudience.LimitedPrivate(HBaseInterfaceAudience.COPROC)
+@InterfaceStability.Evolving
+public abstract class BaseMasterAndRegionObserver extends BaseRegionObserver
+    implements MasterObserver {
+  @Override
+  public void preCreateTable(ObserverContext<MasterCoprocessorEnvironment> ctx,
+      HTableDescriptor desc, HRegionInfo[] regions) throws IOException {
+  }
+
+  @Override
+  public void postCreateTable(ObserverContext<MasterCoprocessorEnvironment> ctx,
+      HTableDescriptor desc, HRegionInfo[] regions) throws IOException {
+  }
+
+  @Override
+  public void preCreateTableHandler(
+      final ObserverContext<MasterCoprocessorEnvironment> ctx,
+      HTableDescriptor desc, HRegionInfo[] regions) throws IOException {
+  }
+
+  @Override
+  public void postCreateTableHandler(
+      final ObserverContext<MasterCoprocessorEnvironment> ctx,
+      HTableDescriptor desc, HRegionInfo[] regions) throws IOException {
+  }
+
+  @Override
+  public void preDeleteTable(ObserverContext<MasterCoprocessorEnvironment> ctx,
+      TableName tableName) throws IOException {
+  }
+
+  @Override
+  public void postDeleteTable(ObserverContext<MasterCoprocessorEnvironment> ctx,
+      TableName tableName) throws IOException {
+  }
+
+  @Override
+  public void preDeleteTableHandler(
+      final ObserverContext<MasterCoprocessorEnvironment> ctx, TableName tableName)
+      throws IOException{
+  }
+
+  @Override
+  public void postDeleteTableHandler(
+      final ObserverContext<MasterCoprocessorEnvironment> ctx, TableName tableName)
+      throws IOException {
+  }
+
+  @Override
+  public void preTruncateTable(ObserverContext<MasterCoprocessorEnvironment> ctx,
+      TableName tableName) throws IOException {
+  }
+
+  @Override
+  public void postTruncateTable(ObserverContext<MasterCoprocessorEnvironment> ctx,
+      TableName tableName) throws IOException {
+  }
+
+  @Override
+  public void preTruncateTableHandler(
+      final ObserverContext<MasterCoprocessorEnvironment> ctx, TableName tableName)
+      throws IOException {
+  }
+
+  @Override
+  public void postTruncateTableHandler(
+      final ObserverContext<MasterCoprocessorEnvironment> ctx, TableName tableName)
+      throws IOException {
+  }
+
+  @Override
+  public void preModifyTable(ObserverContext<MasterCoprocessorEnvironment> ctx,
+      TableName tableName, HTableDescriptor htd) throws IOException {
+  }
+
+  @Override
+  public void postModifyTableHandler(
+      ObserverContext<MasterCoprocessorEnvironment> ctx, TableName tableName,
+      HTableDescriptor htd) throws IOException {
+  }
+
+  @Override
+  public void preModifyTableHandler(
+      ObserverContext<MasterCoprocessorEnvironment> ctx, TableName tableName,
+      HTableDescriptor htd) throws IOException {
+  }
+
+  @Override
+  public void postModifyTable(ObserverContext<MasterCoprocessorEnvironment> ctx,
+      TableName tableName, HTableDescriptor htd) throws IOException {
+  }
+
+  @Override
+  public void preCreateNamespace(ObserverContext<MasterCoprocessorEnvironment> ctx,
+      NamespaceDescriptor ns) throws IOException {
+  }
+
+  @Override
+  public void postCreateNamespace(ObserverContext<MasterCoprocessorEnvironment> ctx,
+      NamespaceDescriptor ns) throws IOException {
+  }
+
+  @Override
+  public void preDeleteNamespace(ObserverContext<MasterCoprocessorEnvironment> ctx,
+      String namespace) throws IOException {
+  }
+
+  @Override
+  public void postDeleteNamespace(ObserverContext<MasterCoprocessorEnvironment> ctx,
+      String namespace) throws IOException {
+  }
+
+  @Override
+  public void preModifyNamespace(ObserverContext<MasterCoprocessorEnvironment> ctx,
+      NamespaceDescriptor ns) throws IOException {
+  }
+
+  @Override
+  public void postModifyNamespace(ObserverContext<MasterCoprocessorEnvironment> ctx,
+      NamespaceDescriptor ns) throws IOException {
+  }
+
+  @Override
+  public void preAddColumn(ObserverContext<MasterCoprocessorEnvironment> ctx,
+      TableName tableName, HColumnDescriptor column) throws IOException {
+  }
+
+  @Override
+  public void postAddColumn(ObserverContext<MasterCoprocessorEnvironment> ctx,
+      TableName tableName, HColumnDescriptor column) throws IOException {
+  }
+
+  @Override
+  public void preAddColumnHandler(
+      ObserverContext<MasterCoprocessorEnvironment> ctx, TableName tableName,
+      HColumnDescriptor column) throws IOException {
+  }
+
+  @Override
+  public void postAddColumnHandler(
+      ObserverContext<MasterCoprocessorEnvironment> ctx, TableName tableName,
+      HColumnDescriptor column) throws IOException {
+  }
+
+  @Override
+  public void preModifyColumn(ObserverContext<MasterCoprocessorEnvironment> ctx,
+      TableName tableName, HColumnDescriptor descriptor) throws IOException {
+  }
+
+  @Override
+  public void postModifyColumn(ObserverContext<MasterCoprocessorEnvironment> ctx,
+      TableName tableName, HColumnDescriptor descriptor) throws IOException {
+  }
+
+  @Override
+  public void preModifyColumnHandler(
+      ObserverContext<MasterCoprocessorEnvironment> ctx, TableName tableName,
+      HColumnDescriptor descriptor) throws IOException {
+  }
+
+  @Override
+  public void postModifyColumnHandler(
+      ObserverContext<MasterCoprocessorEnvironment> ctx, TableName tableName,
+      HColumnDescriptor descriptor) throws IOException {
+  }
+
+  @Override
+  public void preDeleteColumn(ObserverContext<MasterCoprocessorEnvironment> ctx,
+      TableName tableName, byte[] c) throws IOException {
+  }
+
+  @Override
+  public void postDeleteColumn(ObserverContext<MasterCoprocessorEnvironment> ctx,
+      TableName tableName, byte[] c) throws IOException {
+  }
+
+  @Override
+  public void preDeleteColumnHandler(
+      ObserverContext<MasterCoprocessorEnvironment> ctx, TableName tableName,
+      byte[] c) throws IOException {
+  }
+
+  @Override
+  public void postDeleteColumnHandler(
+      ObserverContext<MasterCoprocessorEnvironment> ctx, TableName tableName,
+      byte[] c) throws IOException {
+  }
+
+
+  @Override
+  public void preEnableTable(ObserverContext<MasterCoprocessorEnvironment> ctx,
+      TableName tableName) throws IOException {
+  }
+
+  @Override
+  public void postEnableTable(ObserverContext<MasterCoprocessorEnvironment> ctx,
+      TableName tableName) throws IOException {
+  }
+
+  @Override
+  public void preEnableTableHandler(
+      ObserverContext<MasterCoprocessorEnvironment> ctx, TableName tableName)
+      throws IOException {
+  }
+
+  @Override
+  public void postEnableTableHandler(
+      ObserverContext<MasterCoprocessorEnvironment> ctx, TableName tableName)
+      throws IOException {
+  }
+
+  @Override
+  public void preDisableTable(ObserverContext<MasterCoprocessorEnvironment> ctx,
+      TableName tableName) throws IOException {
+  }
+
+  @Override
+  public void postDisableTable(ObserverContext<MasterCoprocessorEnvironment> ctx,
+      TableName tableName) throws IOException {
+  }
+
+  @Override
+  public void preDisableTableHandler(
+      ObserverContext<MasterCoprocessorEnvironment> ctx, TableName tableName)
+      throws IOException {
+  }
+
+  @Override
+  public void postDisableTableHandler(
+      ObserverContext<MasterCoprocessorEnvironment> ctx, TableName tableName)
+      throws IOException {
+  }
+
+  @Override
+  public void preAssign(ObserverContext<MasterCoprocessorEnvironment> ctx,
+      HRegionInfo regionInfo) throws IOException {
+  }
+
+  @Override
+  public void postAssign(ObserverContext<MasterCoprocessorEnvironment> ctx,
+      HRegionInfo regionInfo) throws IOException {
+  }
+
+  @Override
+  public void preUnassign(ObserverContext<MasterCoprocessorEnvironment> ctx,
+      HRegionInfo regionInfo, boolean force) throws IOException {
+  }
+
+  @Override
+  public void postUnassign(ObserverContext<MasterCoprocessorEnvironment> ctx,
+      HRegionInfo regionInfo, boolean force) throws IOException {
+  }
+
+  @Override
+  public void preRegionOffline(ObserverContext<MasterCoprocessorEnvironment> ctx,
+    HRegionInfo regionInfo) throws IOException {
+  }
+
+  @Override
+  public void postRegionOffline(ObserverContext<MasterCoprocessorEnvironment> ctx,
+    HRegionInfo regionInfo) throws IOException {
+  }
+
+  @Override
+  public void preBalance(ObserverContext<MasterCoprocessorEnvironment> ctx)
+      throws IOException {
+  }
+
+  @Override
+  public void postBalance(ObserverContext<MasterCoprocessorEnvironment> ctx, List<RegionPlan> plans)
+      throws IOException {
+  }
+
+  @Override
+  public boolean preBalanceSwitch(ObserverContext<MasterCoprocessorEnvironment> ctx,
+      boolean b) throws IOException {
+    return b;
+  }
+
+  @Override
+  public void postBalanceSwitch(ObserverContext<MasterCoprocessorEnvironment> ctx,
+      boolean oldValue, boolean newValue) throws IOException {
+  }
+
+  @Override
+  public void preShutdown(ObserverContext<MasterCoprocessorEnvironment> ctx)
+      throws IOException {
+  }
+
+  @Override
+  public void preStopMaster(ObserverContext<MasterCoprocessorEnvironment> ctx)
+      throws IOException {
+  }
+
+  @Override
+  public void postStartMaster(ObserverContext<MasterCoprocessorEnvironment> ctx)
+      throws IOException {
+  }
+
+  @Override
+  public void preMasterInitialization(
+      ObserverContext<MasterCoprocessorEnvironment> ctx) throws IOException {
+  }
+
+  @Override
+  public void start(CoprocessorEnvironment ctx) throws IOException {
+  }
+
+  @Override
+  public void stop(CoprocessorEnvironment ctx) throws IOException {
+  }
+
+  @Override
+  public void preMove(ObserverContext<MasterCoprocessorEnvironment> ctx,
+      HRegionInfo region, ServerName srcServer, ServerName destServer)
+  throws IOException {
+  }
+
+  @Override
+  public void postMove(ObserverContext<MasterCoprocessorEnvironment> ctx,
+      HRegionInfo region, ServerName srcServer, ServerName destServer)
+  throws IOException {
+  }
+
+  @Override
+  public void preSnapshot(final ObserverContext<MasterCoprocessorEnvironment> ctx,
+      final SnapshotDescription snapshot, final HTableDescriptor hTableDescriptor)
+      throws IOException {
+  }
+
+  @Override
+  public void postSnapshot(final ObserverContext<MasterCoprocessorEnvironment> ctx,
+      final SnapshotDescription snapshot, final HTableDescriptor hTableDescriptor)
+      throws IOException {
+  }
+
+  @Override
+  public void preCloneSnapshot(final ObserverContext<MasterCoprocessorEnvironment> ctx,
+      final SnapshotDescription snapshot, final HTableDescriptor hTableDescriptor)
+      throws IOException {
+  }
+
+  @Override
+  public void postCloneSnapshot(final ObserverContext<MasterCoprocessorEnvironment> ctx,
+      final SnapshotDescription snapshot, final HTableDescriptor hTableDescriptor)
+      throws IOException {
+  }
+
+  @Override
+  public void preRestoreSnapshot(final ObserverContext<MasterCoprocessorEnvironment> ctx,
+      final SnapshotDescription snapshot, final HTableDescriptor hTableDescriptor)
+      throws IOException {
+  }
+
+  @Override
+  public void postRestoreSnapshot(final ObserverContext<MasterCoprocessorEnvironment> ctx,
+      final SnapshotDescription snapshot, final HTableDescriptor hTableDescriptor)
+      throws IOException {
+  }
+
+  @Override
+  public void preDeleteSnapshot(final ObserverContext<MasterCoprocessorEnvironment> ctx,
+      final SnapshotDescription snapshot) throws IOException {
+  }
+
+  @Override
+  public void postDeleteSnapshot(final ObserverContext<MasterCoprocessorEnvironment> ctx,
+      final SnapshotDescription snapshot) throws IOException {
+  }
+
+  @Override
+  public void preGetTableDescriptors(ObserverContext<MasterCoprocessorEnvironment> ctx,
+      List<TableName> tableNamesList, List<HTableDescriptor> descriptors)
+      throws IOException {
+  }
+
+  @Override
+  public void postGetTableDescriptors(ObserverContext<MasterCoprocessorEnvironment> ctx,
+      List<HTableDescriptor> descriptors) throws IOException {
+  }
+
+  @Override
+  public void preTableFlush(ObserverContext<MasterCoprocessorEnvironment> ctx,
+      TableName tableName) throws IOException {
+  }
+
+  @Override
+  public void postTableFlush(ObserverContext<MasterCoprocessorEnvironment> ctx,
+      TableName tableName) throws IOException {
+  }
+}

http://git-wip-us.apache.org/repos/asf/hbase/blob/bf5eac49/hbase-server/src/main/java/org/apache/hadoop/hbase/security/access/AccessController.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/security/access/AccessController.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/security/access/AccessController.java
index 6dabc7d..a0dd438 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/security/access/AccessController.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/security/access/AccessController.java
@@ -61,7 +61,7 @@ import org.apache.hadoop.hbase.client.Put;
 import org.apache.hadoop.hbase.client.Query;
 import org.apache.hadoop.hbase.client.Result;
 import org.apache.hadoop.hbase.client.Scan;
-import org.apache.hadoop.hbase.coprocessor.BaseRegionObserver;
+import org.apache.hadoop.hbase.coprocessor.BaseMasterAndRegionObserver;
 import org.apache.hadoop.hbase.coprocessor.CoprocessorException;
 import org.apache.hadoop.hbase.coprocessor.CoprocessorService;
 import org.apache.hadoop.hbase.coprocessor.EndpointObserver;
@@ -78,7 +78,6 @@ import org.apache.hadoop.hbase.filter.FilterList;
 import org.apache.hadoop.hbase.io.hfile.HFile;
 import org.apache.hadoop.hbase.ipc.RequestContext;
 import org.apache.hadoop.hbase.master.MasterServices;
-import org.apache.hadoop.hbase.master.RegionPlan;
 import org.apache.hadoop.hbase.protobuf.ProtobufUtil;
 import org.apache.hadoop.hbase.protobuf.ResponseConverter;
 import org.apache.hadoop.hbase.protobuf.generated.AccessControlProtos;
@@ -146,8 +145,8 @@ import com.google.protobuf.Service;
  * </p>
  */
 @InterfaceAudience.Private
-public class AccessController extends BaseRegionObserver
-    implements MasterObserver, RegionServerObserver,
+public class AccessController extends BaseMasterAndRegionObserver
+    implements RegionServerObserver,
       AccessControlService.Interface, CoprocessorService, EndpointObserver {
 
   public static final Log LOG = LogFactory.getLog(AccessController.class);
@@ -632,7 +631,7 @@ public class AccessController extends BaseRegionObserver
           // In case of family delete, a Cell will be added into the list with Qualifier as null.
           for (Cell cell : list) {
             if (cell.getQualifierLength() == 0
-                && (cell.getTypeByte() == Type.DeleteFamily.getCode() 
+                && (cell.getTypeByte() == Type.DeleteFamily.getCode()
                 || cell.getTypeByte() == Type.DeleteFamilyVersion.getCode())) {
               get.addFamily(col);
             } else {
@@ -828,9 +827,9 @@ public class AccessController extends BaseRegionObserver
       // if running on HMaster
       MasterCoprocessorEnvironment mEnv = (MasterCoprocessorEnvironment) env;
       zk = mEnv.getMasterServices().getZooKeeper();
-    } else if (env instanceof RegionServerCoprocessorEnvironment) {      
+    } else if (env instanceof RegionServerCoprocessorEnvironment) {
       RegionServerCoprocessorEnvironment rsEnv = (RegionServerCoprocessorEnvironment) env;
-      zk = rsEnv.getRegionServerServices().getZooKeeper();      
+      zk = rsEnv.getRegionServerServices().getZooKeeper();
     } else if (env instanceof RegionCoprocessorEnvironment) {
       // if running at region
       regionEnv = (RegionCoprocessorEnvironment) env;
@@ -877,14 +876,6 @@ public class AccessController extends BaseRegionObserver
   }
 
   @Override
-  public void preCreateTableHandler(ObserverContext<MasterCoprocessorEnvironment> c,
-      HTableDescriptor desc, HRegionInfo[] regions) throws IOException {}
-
-  @Override
-  public void postCreateTable(ObserverContext<MasterCoprocessorEnvironment> c,
-      HTableDescriptor desc, HRegionInfo[] regions) throws IOException {}
-
-  @Override
   public void postCreateTableHandler(ObserverContext<MasterCoprocessorEnvironment> c,
       HTableDescriptor desc, HRegionInfo[] regions) throws IOException {
     // When AC is used, it should be configured as the 1st CP.
@@ -928,34 +919,16 @@ public class AccessController extends BaseRegionObserver
   }
 
   @Override
-  public void preDeleteTableHandler(ObserverContext<MasterCoprocessorEnvironment> c,
-      TableName tableName) throws IOException {}
-
-  @Override
   public void postDeleteTable(ObserverContext<MasterCoprocessorEnvironment> c,
       TableName tableName) throws IOException {
     AccessControlLists.removeTablePermissions(c.getEnvironment().getConfiguration(), tableName);
   }
 
   @Override
-  public void postDeleteTableHandler(ObserverContext<MasterCoprocessorEnvironment> c,
-      TableName tableName) throws IOException {}
-
-   @Override
   public void preTruncateTable(ObserverContext<MasterCoprocessorEnvironment> c, TableName tableName)
       throws IOException {
     requirePermission("truncateTable", tableName, null, null, Action.ADMIN, Action.CREATE);
   }
-  @Override
-  public void postTruncateTable(ObserverContext<MasterCoprocessorEnvironment> c,
-      TableName tableName) throws IOException {
-  }
-  @Override
-  public void preTruncateTableHandler(ObserverContext<MasterCoprocessorEnvironment> c,
-      TableName tableName) throws IOException {}
-  @Override
-  public void postTruncateTableHandler(ObserverContext<MasterCoprocessorEnvironment> c,
-      TableName tableName) throws IOException {}
 
   @Override
   public void preModifyTable(ObserverContext<MasterCoprocessorEnvironment> c, TableName tableName,
@@ -964,10 +937,6 @@ public class AccessController extends BaseRegionObserver
   }
 
   @Override
-  public void preModifyTableHandler(ObserverContext<MasterCoprocessorEnvironment> c,
-      TableName tableName, HTableDescriptor htd) throws IOException {}
-
-  @Override
   public void postModifyTable(ObserverContext<MasterCoprocessorEnvironment> c,
       TableName tableName, HTableDescriptor htd) throws IOException {
     String owner = htd.getOwnerString();
@@ -979,85 +948,36 @@ public class AccessController extends BaseRegionObserver
   }
 
   @Override
-  public void postModifyTableHandler(ObserverContext<MasterCoprocessorEnvironment> c,
-      TableName tableName, HTableDescriptor htd) throws IOException {}
-
-
-  @Override
   public void preAddColumn(ObserverContext<MasterCoprocessorEnvironment> c, TableName tableName,
       HColumnDescriptor column) throws IOException {
     requirePermission("addColumn", tableName, null, null, Action.ADMIN, Action.CREATE);
   }
 
   @Override
-  public void preAddColumnHandler(ObserverContext<MasterCoprocessorEnvironment> c,
-      TableName tableName, HColumnDescriptor column) throws IOException {}
-
-  @Override
-  public void postAddColumn(ObserverContext<MasterCoprocessorEnvironment> c,
-      TableName tableName, HColumnDescriptor column) throws IOException {}
-
-  @Override
-  public void postAddColumnHandler(ObserverContext<MasterCoprocessorEnvironment> c,
-      TableName tableName, HColumnDescriptor column) throws IOException {}
-
-  @Override
   public void preModifyColumn(ObserverContext<MasterCoprocessorEnvironment> c, TableName tableName,
       HColumnDescriptor descriptor) throws IOException {
     requirePermission("modifyColumn", tableName, null, null, Action.ADMIN, Action.CREATE);
   }
 
   @Override
-  public void preModifyColumnHandler(ObserverContext<MasterCoprocessorEnvironment> c,
-      TableName tableName, HColumnDescriptor descriptor) throws IOException {}
-
-  @Override
-  public void postModifyColumn(ObserverContext<MasterCoprocessorEnvironment> c,
-      TableName tableName, HColumnDescriptor descriptor) throws IOException {}
-
-  @Override
-  public void postModifyColumnHandler(ObserverContext<MasterCoprocessorEnvironment> c,
-      TableName tableName, HColumnDescriptor descriptor) throws IOException {}
-
-  @Override
   public void preDeleteColumn(ObserverContext<MasterCoprocessorEnvironment> c, TableName tableName,
       byte[] col) throws IOException {
     requirePermission("deleteColumn", tableName, null, null, Action.ADMIN, Action.CREATE);
   }
 
   @Override
-  public void preDeleteColumnHandler(ObserverContext<MasterCoprocessorEnvironment> c,
-      TableName tableName, byte[] col) throws IOException {}
-
-  @Override
   public void postDeleteColumn(ObserverContext<MasterCoprocessorEnvironment> c,
       TableName tableName, byte[] col) throws IOException {
     AccessControlLists.removeTablePermissions(c.getEnvironment().getConfiguration(), tableName, col);
   }
 
   @Override
-  public void postDeleteColumnHandler(ObserverContext<MasterCoprocessorEnvironment> c,
-      TableName tableName, byte[] col) throws IOException {}
-
-  @Override
   public void preEnableTable(ObserverContext<MasterCoprocessorEnvironment> c, TableName tableName)
       throws IOException {
     requirePermission("enableTable", tableName, null, null, Action.ADMIN, Action.CREATE);
   }
 
   @Override
-  public void preEnableTableHandler(ObserverContext<MasterCoprocessorEnvironment> c,
-      TableName tableName) throws IOException {}
-
-  @Override
-  public void postEnableTable(ObserverContext<MasterCoprocessorEnvironment> c,
-      TableName tableName) throws IOException {}
-
-  @Override
-  public void postEnableTableHandler(ObserverContext<MasterCoprocessorEnvironment> c,
-      TableName tableName) throws IOException {}
-
-  @Override
   public void preDisableTable(ObserverContext<MasterCoprocessorEnvironment> c, TableName tableName)
       throws IOException {
     if (Bytes.equals(tableName.getName(), AccessControlLists.ACL_GLOBAL_NAME)) {
@@ -1068,70 +988,36 @@ public class AccessController extends BaseRegionObserver
   }
 
   @Override
-  public void preDisableTableHandler(ObserverContext<MasterCoprocessorEnvironment> c,
-      TableName tableName) throws IOException {}
-
-  @Override
-  public void postDisableTable(ObserverContext<MasterCoprocessorEnvironment> c,
-      TableName tableName) throws IOException {}
-
-  @Override
-  public void postDisableTableHandler(ObserverContext<MasterCoprocessorEnvironment> c,
-      TableName tableName) throws IOException {}
-
-  @Override
   public void preMove(ObserverContext<MasterCoprocessorEnvironment> c, HRegionInfo region,
       ServerName srcServer, ServerName destServer) throws IOException {
     requirePermission("move", region.getTable(), null, null, Action.ADMIN);
   }
 
   @Override
-  public void postMove(ObserverContext<MasterCoprocessorEnvironment> c,
-      HRegionInfo region, ServerName srcServer, ServerName destServer)
-    throws IOException {}
-
-  @Override
   public void preAssign(ObserverContext<MasterCoprocessorEnvironment> c, HRegionInfo regionInfo)
       throws IOException {
     requirePermission("assign", regionInfo.getTable(), null, null, Action.ADMIN);
   }
 
   @Override
-  public void postAssign(ObserverContext<MasterCoprocessorEnvironment> c,
-      HRegionInfo regionInfo) throws IOException {}
-
-  @Override
   public void preUnassign(ObserverContext<MasterCoprocessorEnvironment> c, HRegionInfo regionInfo,
       boolean force) throws IOException {
     requirePermission("unassign", regionInfo.getTable(), null, null, Action.ADMIN);
   }
 
   @Override
-  public void postUnassign(ObserverContext<MasterCoprocessorEnvironment> c,
-      HRegionInfo regionInfo, boolean force) throws IOException {}
-
-  @Override
   public void preRegionOffline(ObserverContext<MasterCoprocessorEnvironment> c,
       HRegionInfo regionInfo) throws IOException {
     requirePermission("regionOffline", regionInfo.getTable(), null, null, Action.ADMIN);
   }
 
   @Override
-  public void postRegionOffline(ObserverContext<MasterCoprocessorEnvironment> c,
-      HRegionInfo regionInfo) throws IOException {
-  }
-
-  @Override
   public void preBalance(ObserverContext<MasterCoprocessorEnvironment> c)
       throws IOException {
     requirePermission("balance", Action.ADMIN);
   }
 
   @Override
-  public void postBalance(ObserverContext<MasterCoprocessorEnvironment> c, List<RegionPlan> plans)
-      throws IOException {}
-
-  @Override
   public boolean preBalanceSwitch(ObserverContext<MasterCoprocessorEnvironment> c,
       boolean newValue) throws IOException {
     requirePermission("balanceSwitch", Action.ADMIN);
@@ -1139,10 +1025,6 @@ public class AccessController extends BaseRegionObserver
   }
 
   @Override
-  public void postBalanceSwitch(ObserverContext<MasterCoprocessorEnvironment> c,
-      boolean oldValue, boolean newValue) throws IOException {}
-
-  @Override
   public void preShutdown(ObserverContext<MasterCoprocessorEnvironment> c)
       throws IOException {
     requirePermission("shutdown", Action.ADMIN);
@@ -1167,11 +1049,6 @@ public class AccessController extends BaseRegionObserver
   }
 
   @Override
-  public void preMasterInitialization(
-      ObserverContext<MasterCoprocessorEnvironment> ctx) throws IOException {
-  }
-
-  @Override
   public void preSnapshot(final ObserverContext<MasterCoprocessorEnvironment> ctx,
       final SnapshotDescription snapshot, final HTableDescriptor hTableDescriptor)
       throws IOException {
@@ -1179,12 +1056,6 @@ public class AccessController extends BaseRegionObserver
   }
 
   @Override
-  public void postSnapshot(final ObserverContext<MasterCoprocessorEnvironment> ctx,
-      final SnapshotDescription snapshot, final HTableDescriptor hTableDescriptor)
-      throws IOException {
-  }
-
-  @Override
   public void preCloneSnapshot(final ObserverContext<MasterCoprocessorEnvironment> ctx,
       final SnapshotDescription snapshot, final HTableDescriptor hTableDescriptor)
       throws IOException {
@@ -1192,12 +1063,6 @@ public class AccessController extends BaseRegionObserver
   }
 
   @Override
-  public void postCloneSnapshot(final ObserverContext<MasterCoprocessorEnvironment> ctx,
-      final SnapshotDescription snapshot, final HTableDescriptor hTableDescriptor)
-      throws IOException {
-  }
-
-  @Override
   public void preRestoreSnapshot(final ObserverContext<MasterCoprocessorEnvironment> ctx,
       final SnapshotDescription snapshot, final HTableDescriptor hTableDescriptor)
       throws IOException {
@@ -1205,34 +1070,18 @@ public class AccessController extends BaseRegionObserver
   }
 
   @Override
-  public void postRestoreSnapshot(final ObserverContext<MasterCoprocessorEnvironment> ctx,
-      final SnapshotDescription snapshot, final HTableDescriptor hTableDescriptor)
-      throws IOException {
-  }
-
-  @Override
   public void preDeleteSnapshot(final ObserverContext<MasterCoprocessorEnvironment> ctx,
       final SnapshotDescription snapshot) throws IOException {
     requirePermission("deleteSnapshot", Action.ADMIN);
   }
 
   @Override
-  public void postDeleteSnapshot(final ObserverContext<MasterCoprocessorEnvironment> ctx,
-      final SnapshotDescription snapshot) throws IOException {
-  }
-
-  @Override
   public void preCreateNamespace(ObserverContext<MasterCoprocessorEnvironment> ctx,
       NamespaceDescriptor ns) throws IOException {
     requireGlobalPermission("createNamespace", Action.ADMIN, ns.getName());
   }
 
   @Override
-  public void postCreateNamespace(ObserverContext<MasterCoprocessorEnvironment> ctx,
-      NamespaceDescriptor ns) throws IOException {
-  }
-
-  @Override
   public void preDeleteNamespace(ObserverContext<MasterCoprocessorEnvironment> ctx, String namespace)
       throws IOException {
     requireGlobalPermission("deleteNamespace", Action.ADMIN, namespace);
@@ -1253,21 +1102,11 @@ public class AccessController extends BaseRegionObserver
   }
 
   @Override
-  public void postModifyNamespace(ObserverContext<MasterCoprocessorEnvironment> ctx,
-                                  NamespaceDescriptor ns) throws IOException {
-  }
-
-  @Override
   public void preTableFlush(final ObserverContext<MasterCoprocessorEnvironment> ctx,
       final TableName tableName) throws IOException {
     requirePermission("flushTable", tableName, null, null, Action.ADMIN, Action.CREATE);
   }
 
-  @Override
-  public void postTableFlush(final ObserverContext<MasterCoprocessorEnvironment> ctx,
-      final TableName tableName) throws IOException {
-  }
-
   /* ---- RegionObserver implementation ---- */
 
   @Override
@@ -1335,7 +1174,7 @@ public class AccessController extends BaseRegionObserver
   public void preSplit(ObserverContext<RegionCoprocessorEnvironment> e) throws IOException {
     requirePermission("split", getTableName(e.getEnvironment()), null, null, Action.ADMIN);
   }
-  
+
   @Override
   public void preSplit(ObserverContext<RegionCoprocessorEnvironment> e,
       byte[] splitRow) throws IOException {
@@ -1409,7 +1248,7 @@ public class AccessController extends BaseRegionObserver
         // grants for qualifiers. Otherwise we will fall through below and log
         // the result and throw an ADE. We may end up checking qualifier
         // grants three times (permissionGranted above, here, and in the
-        // filter) but that's the price of backwards compatibility. 
+        // filter) but that's the price of backwards compatibility.
         if (hasFamilyQualifierPermission(user, Action.READ, env, families)) {
           Filter ourFilter = new AccessControlFilter(authManager, user, table,
             AccessControlFilter.Strategy.CHECK_TABLE_AND_CF_ONLY,
@@ -1437,7 +1276,7 @@ public class AccessController extends BaseRegionObserver
         // New behavior: Any access we might be granted is more fine-grained
         // than whole table or CF. Simply inject a filter and return what is
         // allowed. We will not throw an AccessDeniedException. This is a
-        // behavioral change since 0.96. 
+        // behavioral change since 0.96.
         Filter ourFilter = new AccessControlFilter(authManager, user, table,
           AccessControlFilter.Strategy.CHECK_CELL_DEFAULT, cfVsMaxVersions);
         // wrap any existing filter
@@ -2325,11 +2164,6 @@ public class AccessController extends BaseRegionObserver
   }
 
   @Override
-  public void postGetTableDescriptors(ObserverContext<MasterCoprocessorEnvironment> ctx,
-      List<HTableDescriptor> descriptors) throws IOException {
-  }
-
-  @Override
   public void preMerge(ObserverContext<RegionServerCoprocessorEnvironment> ctx, HRegion regionA,
       HRegion regionB) throws IOException {
     requirePermission("mergeRegions", regionA.getTableDesc().getTableName(), null, null,

http://git-wip-us.apache.org/repos/asf/hbase/blob/bf5eac49/hbase-server/src/main/java/org/apache/hadoop/hbase/security/visibility/VisibilityController.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/security/visibility/VisibilityController.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/security/visibility/VisibilityController.java
index 9b8667b..70edf98 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/security/visibility/VisibilityController.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/security/visibility/VisibilityController.java
@@ -48,13 +48,10 @@ import org.apache.hadoop.hbase.CoprocessorEnvironment;
 import org.apache.hadoop.hbase.DoNotRetryIOException;
 import org.apache.hadoop.hbase.HColumnDescriptor;
 import org.apache.hadoop.hbase.HConstants;
-import org.apache.hadoop.hbase.HRegionInfo;
 import org.apache.hadoop.hbase.HTableDescriptor;
 import org.apache.hadoop.hbase.KeyValue;
 import org.apache.hadoop.hbase.KeyValue.Type;
 import org.apache.hadoop.hbase.KeyValueUtil;
-import org.apache.hadoop.hbase.NamespaceDescriptor;
-import org.apache.hadoop.hbase.ServerName;
 import org.apache.hadoop.hbase.TableName;
 import org.apache.hadoop.hbase.Tag;
 import org.apache.hadoop.hbase.MetaTableAccessor;
@@ -67,7 +64,7 @@ import org.apache.hadoop.hbase.client.Put;
 import org.apache.hadoop.hbase.client.Result;
 import org.apache.hadoop.hbase.client.Scan;
 import org.apache.hadoop.hbase.constraint.ConstraintException;
-import org.apache.hadoop.hbase.coprocessor.BaseRegionObserver;
+import org.apache.hadoop.hbase.coprocessor.BaseMasterAndRegionObserver;
 import org.apache.hadoop.hbase.coprocessor.CoprocessorException;
 import org.apache.hadoop.hbase.coprocessor.CoprocessorHost;
 import org.apache.hadoop.hbase.coprocessor.CoprocessorService;
@@ -86,10 +83,8 @@ import org.apache.hadoop.hbase.io.hfile.HFile;
 import org.apache.hadoop.hbase.io.util.StreamUtils;
 import org.apache.hadoop.hbase.ipc.RequestContext;
 import org.apache.hadoop.hbase.master.MasterServices;
-import org.apache.hadoop.hbase.master.RegionPlan;
 import org.apache.hadoop.hbase.protobuf.ResponseConverter;
 import org.apache.hadoop.hbase.protobuf.generated.ClientProtos.RegionActionResult;
-import org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.SnapshotDescription;
 import org.apache.hadoop.hbase.protobuf.generated.VisibilityLabelsProtos;
 import org.apache.hadoop.hbase.protobuf.generated.VisibilityLabelsProtos.GetAuthsRequest;
 import org.apache.hadoop.hbase.protobuf.generated.VisibilityLabelsProtos.GetAuthsResponse;
@@ -133,8 +128,8 @@ import com.google.protobuf.Service;
  * visibility labels
  */
 @InterfaceAudience.Private
-public class VisibilityController extends BaseRegionObserver implements MasterObserver,
-    RegionObserver, VisibilityLabelsService.Interface, CoprocessorService {
+public class VisibilityController extends BaseMasterAndRegionObserver implements
+    VisibilityLabelsService.Interface, CoprocessorService {
 
   private static final Log LOG = LogFactory.getLog(VisibilityController.class);
   private static final byte[] DUMMY_VALUE = new byte[0];
@@ -148,7 +143,7 @@ public class VisibilityController extends BaseRegionObserver implements MasterOb
   // defined only for Endpoint implementation, so it can have way to access region services.
   private RegionCoprocessorEnvironment regionEnv;
   private List<ScanLabelGenerator> scanLabelGenerators;
-  
+
   private volatile int ordinalCounter = -1;
   // flags if we are running on a region of the 'labels' table
   private boolean labelsRegion = false;
@@ -250,46 +245,6 @@ public class VisibilityController extends BaseRegionObserver implements MasterOb
   }
 
   @Override
-  public void preCreateTable(ObserverContext<MasterCoprocessorEnvironment> ctx,
-      HTableDescriptor desc, HRegionInfo[] regions) throws IOException {
-  }
-
-  @Override
-  public void postCreateTable(ObserverContext<MasterCoprocessorEnvironment> ctx,
-      HTableDescriptor desc, HRegionInfo[] regions) throws IOException {
-  }
-
-  @Override
-  public void preCreateTableHandler(ObserverContext<MasterCoprocessorEnvironment> ctx,
-      HTableDescriptor desc, HRegionInfo[] regions) throws IOException {
-  }
-
-  @Override
-  public void postCreateTableHandler(ObserverContext<MasterCoprocessorEnvironment> ctx,
-      HTableDescriptor desc, HRegionInfo[] regions) throws IOException {
-  }
-
-  @Override
-  public void preDeleteTable(ObserverContext<MasterCoprocessorEnvironment> ctx, TableName tableName)
-      throws IOException {
-  }
-
-  @Override
-  public void postDeleteTable(ObserverContext<MasterCoprocessorEnvironment> ctx, TableName tableName)
-      throws IOException {
-  }
-
-  @Override
-  public void preDeleteTableHandler(ObserverContext<MasterCoprocessorEnvironment> ctx,
-      TableName tableName) throws IOException {
-  }
-
-  @Override
-  public void postDeleteTableHandler(ObserverContext<MasterCoprocessorEnvironment> ctx,
-      TableName tableName) throws IOException {
-  }
-
-  @Override
   public void preModifyTable(ObserverContext<MasterCoprocessorEnvironment> ctx,
       TableName tableName, HTableDescriptor htd) throws IOException {
     if (LABELS_TABLE_NAME.equals(tableName)) {
@@ -298,21 +253,6 @@ public class VisibilityController extends BaseRegionObserver implements MasterOb
   }
 
   @Override
-  public void postModifyTable(ObserverContext<MasterCoprocessorEnvironment> ctx,
-      TableName tableName, HTableDescriptor htd) throws IOException {
-  }
-
-  @Override
-  public void preModifyTableHandler(ObserverContext<MasterCoprocessorEnvironment> ctx,
-      TableName tableName, HTableDescriptor htd) throws IOException {
-  }
-
-  @Override
-  public void postModifyTableHandler(ObserverContext<MasterCoprocessorEnvironment> ctx,
-      TableName tableName, HTableDescriptor htd) throws IOException {
-  }
-
-  @Override
   public void preAddColumn(ObserverContext<MasterCoprocessorEnvironment> ctx, TableName tableName,
       HColumnDescriptor column) throws IOException {
     if (LABELS_TABLE_NAME.equals(tableName)) {
@@ -321,21 +261,6 @@ public class VisibilityController extends BaseRegionObserver implements MasterOb
   }
 
   @Override
-  public void postAddColumn(ObserverContext<MasterCoprocessorEnvironment> ctx, TableName tableName,
-      HColumnDescriptor column) throws IOException {
-  }
-
-  @Override
-  public void preAddColumnHandler(ObserverContext<MasterCoprocessorEnvironment> ctx,
-      TableName tableName, HColumnDescriptor column) throws IOException {
-  }
-
-  @Override
-  public void postAddColumnHandler(ObserverContext<MasterCoprocessorEnvironment> ctx,
-      TableName tableName, HColumnDescriptor column) throws IOException {
-  }
-
-  @Override
   public void preModifyColumn(ObserverContext<MasterCoprocessorEnvironment> ctx,
       TableName tableName, HColumnDescriptor descriptor) throws IOException {
     if (LABELS_TABLE_NAME.equals(tableName)) {
@@ -344,21 +269,6 @@ public class VisibilityController extends BaseRegionObserver implements MasterOb
   }
 
   @Override
-  public void postModifyColumn(ObserverContext<MasterCoprocessorEnvironment> ctx,
-      TableName tableName, HColumnDescriptor descriptor) throws IOException {
-  }
-
-  @Override
-  public void preModifyColumnHandler(ObserverContext<MasterCoprocessorEnvironment> ctx,
-      TableName tableName, HColumnDescriptor descriptor) throws IOException {
-  }
-
-  @Override
-  public void postModifyColumnHandler(ObserverContext<MasterCoprocessorEnvironment> ctx,
-      TableName tableName, HColumnDescriptor descriptor) throws IOException {
-  }
-
-  @Override
   public void preDeleteColumn(ObserverContext<MasterCoprocessorEnvironment> ctx,
       TableName tableName, byte[] c) throws IOException {
     if (LABELS_TABLE_NAME.equals(tableName)) {
@@ -367,63 +277,6 @@ public class VisibilityController extends BaseRegionObserver implements MasterOb
   }
 
   @Override
-  public void postDeleteColumn(ObserverContext<MasterCoprocessorEnvironment> ctx,
-      TableName tableName, byte[] c) throws IOException {
-  }
-
-  @Override
-  public void preDeleteColumnHandler(ObserverContext<MasterCoprocessorEnvironment> ctx,
-      TableName tableName, byte[] c) throws IOException {
-  }
-
-  @Override
-  public void postDeleteColumnHandler(ObserverContext<MasterCoprocessorEnvironment> ctx,
-      TableName tableName, byte[] c) throws IOException {
-  }
-
-  @Override
-  public void preTruncateTable(ObserverContext<MasterCoprocessorEnvironment> ctx,
-      TableName tableName) throws IOException {
-  }
-
-  @Override
-  public void postTruncateTable(ObserverContext<MasterCoprocessorEnvironment> ctx,
-      TableName tableName) throws IOException {
-  }
-
-  @Override
-  public void preTruncateTableHandler(
-      final ObserverContext<MasterCoprocessorEnvironment> ctx, TableName tableName)
-      throws IOException{
-  }
-
-  @Override
-  public void postTruncateTableHandler(
-      final ObserverContext<MasterCoprocessorEnvironment> ctx, TableName tableName)
-      throws IOException {
-  }
-
-  @Override
-  public void preEnableTable(ObserverContext<MasterCoprocessorEnvironment> ctx, TableName tableName)
-      throws IOException {
-  }
-
-  @Override
-  public void postEnableTable(ObserverContext<MasterCoprocessorEnvironment> ctx, TableName tableName)
-      throws IOException {
-  }
-
-  @Override
-  public void preEnableTableHandler(ObserverContext<MasterCoprocessorEnvironment> ctx,
-      TableName tableName) throws IOException {
-  }
-
-  @Override
-  public void postEnableTableHandler(ObserverContext<MasterCoprocessorEnvironment> ctx,
-      TableName tableName) throws IOException {
-  }
-
-  @Override
   public void preDisableTable(ObserverContext<MasterCoprocessorEnvironment> ctx, TableName tableName)
       throws IOException {
     if (LABELS_TABLE_NAME.equals(tableName)) {
@@ -431,185 +284,6 @@ public class VisibilityController extends BaseRegionObserver implements MasterOb
     }
   }
 
-  @Override
-  public void postDisableTable(ObserverContext<MasterCoprocessorEnvironment> ctx,
-      TableName tableName) throws IOException {
-  }
-
-  @Override
-  public void preDisableTableHandler(ObserverContext<MasterCoprocessorEnvironment> ctx,
-      TableName tableName) throws IOException {
-  }
-
-  @Override
-  public void postDisableTableHandler(ObserverContext<MasterCoprocessorEnvironment> ctx,
-      TableName tableName) throws IOException {
-  }
-
-  @Override
-  public void preMove(ObserverContext<MasterCoprocessorEnvironment> ctx, HRegionInfo region,
-      ServerName srcServer, ServerName destServer) throws IOException {
-  }
-
-  @Override
-  public void postMove(ObserverContext<MasterCoprocessorEnvironment> ctx, HRegionInfo region,
-      ServerName srcServer, ServerName destServer) throws IOException {
-  }
-
-  @Override
-  public void preAssign(ObserverContext<MasterCoprocessorEnvironment> ctx, HRegionInfo regionInfo)
-      throws IOException {
-  }
-
-  @Override
-  public void postAssign(ObserverContext<MasterCoprocessorEnvironment> ctx, HRegionInfo regionInfo)
-      throws IOException {
-  }
-
-  @Override
-  public void preUnassign(ObserverContext<MasterCoprocessorEnvironment> ctx,
-      HRegionInfo regionInfo, boolean force) throws IOException {
-  }
-
-  @Override
-  public void postUnassign(ObserverContext<MasterCoprocessorEnvironment> ctx,
-      HRegionInfo regionInfo, boolean force) throws IOException {
-  }
-
-  @Override
-  public void preRegionOffline(ObserverContext<MasterCoprocessorEnvironment> ctx,
-      HRegionInfo regionInfo) throws IOException {
-  }
-
-  @Override
-  public void postRegionOffline(ObserverContext<MasterCoprocessorEnvironment> ctx,
-      HRegionInfo regionInfo) throws IOException {
-  }
-
-  @Override
-  public void preBalance(ObserverContext<MasterCoprocessorEnvironment> ctx) throws IOException {
-  }
-
-  @Override
-  public void postBalance(ObserverContext<MasterCoprocessorEnvironment> ctx, List<RegionPlan> plans)
-      throws IOException {
-  }
-
-  @Override
-  public boolean preBalanceSwitch(ObserverContext<MasterCoprocessorEnvironment> ctx,
-      boolean newValue) throws IOException {
-    return newValue;
-  }
-
-  @Override
-  public void postBalanceSwitch(ObserverContext<MasterCoprocessorEnvironment> ctx,
-      boolean oldValue, boolean newValue) throws IOException {
-  }
-
-  @Override
-  public void preShutdown(ObserverContext<MasterCoprocessorEnvironment> ctx) throws IOException {
-  }
-
-  @Override
-  public void preStopMaster(ObserverContext<MasterCoprocessorEnvironment> ctx) throws IOException {
-  }
-
-  @Override
-  public void preSnapshot(ObserverContext<MasterCoprocessorEnvironment> ctx,
-      SnapshotDescription snapshot, HTableDescriptor hTableDescriptor) throws IOException {
-  }
-
-  @Override
-  public void postSnapshot(ObserverContext<MasterCoprocessorEnvironment> ctx,
-      SnapshotDescription snapshot, HTableDescriptor hTableDescriptor) throws IOException {
-  }
-
-  @Override
-  public void preCloneSnapshot(ObserverContext<MasterCoprocessorEnvironment> ctx,
-      SnapshotDescription snapshot, HTableDescriptor hTableDescriptor) throws IOException {
-  }
-
-  @Override
-  public void postCloneSnapshot(ObserverContext<MasterCoprocessorEnvironment> ctx,
-      SnapshotDescription snapshot, HTableDescriptor hTableDescriptor) throws IOException {
-  }
-
-  @Override
-  public void preRestoreSnapshot(ObserverContext<MasterCoprocessorEnvironment> ctx,
-      SnapshotDescription snapshot, HTableDescriptor hTableDescriptor) throws IOException {
-  }
-
-  @Override
-  public void postRestoreSnapshot(ObserverContext<MasterCoprocessorEnvironment> ctx,
-      SnapshotDescription snapshot, HTableDescriptor hTableDescriptor) throws IOException {
-  }
-
-  @Override
-  public void preDeleteSnapshot(ObserverContext<MasterCoprocessorEnvironment> ctx,
-      SnapshotDescription snapshot) throws IOException {
-  }
-
-  @Override
-  public void postDeleteSnapshot(ObserverContext<MasterCoprocessorEnvironment> ctx,
-      SnapshotDescription snapshot) throws IOException {
-  }
-
-  @Override
-  public void preGetTableDescriptors(ObserverContext<MasterCoprocessorEnvironment> ctx,
-      List<TableName> tableNamesList, List<HTableDescriptor> descriptors) throws IOException {
-  }
-
-  @Override
-  public void postGetTableDescriptors(ObserverContext<MasterCoprocessorEnvironment> ctx,
-      List<HTableDescriptor> descriptors) throws IOException {
-  }
-
-  @Override
-  public void preCreateNamespace(ObserverContext<MasterCoprocessorEnvironment> ctx,
-      NamespaceDescriptor ns) throws IOException {
-  }
-
-  @Override
-  public void postCreateNamespace(ObserverContext<MasterCoprocessorEnvironment> ctx,
-      NamespaceDescriptor ns) throws IOException {
-  }
-
-  @Override
-  public void preDeleteNamespace(ObserverContext<MasterCoprocessorEnvironment> ctx, 
-      String namespace) throws IOException {
-  }
-
-  @Override
-  public void postDeleteNamespace(ObserverContext<MasterCoprocessorEnvironment> ctx,
-      String namespace) throws IOException {
-  }
-
-  @Override
-  public void preModifyNamespace(ObserverContext<MasterCoprocessorEnvironment> ctx,
-      NamespaceDescriptor ns) throws IOException {
-  }
-
-  @Override
-  public void postModifyNamespace(ObserverContext<MasterCoprocessorEnvironment> ctx,
-      NamespaceDescriptor ns) throws IOException {
-  }
-
-  @Override
-  public void preTableFlush(ObserverContext<MasterCoprocessorEnvironment> ctx,
-      TableName tableName) throws IOException {
-  }
-
-  @Override
-  public void postTableFlush(ObserverContext<MasterCoprocessorEnvironment> ctx,
-      TableName tableName) throws IOException {
-  }
-
-  @Override
-  public void preMasterInitialization(ObserverContext<MasterCoprocessorEnvironment> ctx)
-      throws IOException {
-
-  }
-
   /****************************** Region related hooks ******************************/
 
   @Override
@@ -637,7 +311,7 @@ public class VisibilityController extends BaseRegionObserver implements MasterOb
 
   private void initialize(ObserverContext<RegionCoprocessorEnvironment> e) {
     try {
-      Pair<Map<String, Integer>, Map<String, List<Integer>>> labelsAndUserAuths = 
+      Pair<Map<String, Integer>, Map<String, List<Integer>>> labelsAndUserAuths =
           extractLabelsAndAuths(getExistingLabelsWithAuths());
       Map<String, Integer> labels = labelsAndUserAuths.getFirst();
       Map<String, List<Integer>> userAuths = labelsAndUserAuths.getSecond();


Mime
View raw message