hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a...@apache.org
Subject [5/6] hbase git commit: HBASE-17312 Use 'default' keyword in coprocessor Observer interfaces to get rid of 'Base...Observer' implementations. Some javadoc improvements too.
Date Sat, 25 Feb 2017 10:49:48 GMT
http://git-wip-us.apache.org/repos/asf/hbase/blob/f444b3b5/hbase-server/src/main/java/org/apache/hadoop/hbase/coprocessor/BaseMasterObserver.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/coprocessor/BaseMasterObserver.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/coprocessor/BaseMasterObserver.java
deleted file mode 100644
index b1f9c47..0000000
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/coprocessor/BaseMasterObserver.java
+++ /dev/null
@@ -1,1187 +0,0 @@
-/*
- *
- * 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 java.io.IOException;
-import java.util.List;
-import java.util.Set;
-
-import org.apache.hadoop.hbase.CoprocessorEnvironment;
-import org.apache.hadoop.hbase.HBaseInterfaceAudience;
-import org.apache.hadoop.hbase.HColumnDescriptor;
-import org.apache.hadoop.hbase.HRegionInfo;
-import org.apache.hadoop.hbase.HTableDescriptor;
-import org.apache.hadoop.hbase.NamespaceDescriptor;
-import org.apache.hadoop.hbase.ProcedureInfo;
-import org.apache.hadoop.hbase.ServerName;
-import org.apache.hadoop.hbase.TableName;
-import org.apache.hadoop.hbase.classification.InterfaceAudience;
-import org.apache.hadoop.hbase.classification.InterfaceStability;
-import org.apache.hadoop.hbase.client.MasterSwitchType;
-import org.apache.hadoop.hbase.client.Mutation;
-import org.apache.hadoop.hbase.master.RegionPlan;
-import org.apache.hadoop.hbase.master.locking.LockProcedure;
-import org.apache.hadoop.hbase.master.procedure.MasterProcedureEnv;
-import org.apache.hadoop.hbase.net.Address;
-import org.apache.hadoop.hbase.procedure2.ProcedureExecutor;
-import org.apache.hadoop.hbase.shaded.protobuf.generated.HBaseProtos.SnapshotDescription;
-import org.apache.hadoop.hbase.shaded.protobuf.generated.QuotaProtos.Quotas;
-
-@InterfaceAudience.LimitedPrivate({HBaseInterfaceAudience.COPROC, HBaseInterfaceAudience.CONFIG})
-@InterfaceStability.Evolving
-public class BaseMasterObserver 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 {
-  }
-
-  /**
-   * Called before a new table is created by
-   * {@link org.apache.hadoop.hbase.master.HMaster}.  Called as part of create
-   * table handler and it is async to the create RPC call.
-   * It can't bypass the default action, e.g., ctx.bypass() won't have effect.
-   * @param ctx the environment to interact with the framework and master
-   * @param desc the HTableDescriptor for the table
-   * @param regions the initial regions created for the table
-   * @throws IOException if something went wrong
-   * @deprecated As of release 2.0.0, this will be removed in HBase 3.0.0
-   *     (<a href="https://issues.apache.org/jira/browse/HBASE-15575">HBASE-15575</a>).
-   *     Use {@link #preCreateTableAction(ObserverContext, HTableDescriptor, HRegionInfo[])}.
-   */
-  @Deprecated
-  @Override
-  public void preCreateTableHandler(
-      final ObserverContext<MasterCoprocessorEnvironment> ctx,
-      HTableDescriptor desc, HRegionInfo[] regions) throws IOException {
-  }
-
-  @Override
-  public void preCreateTableAction(
-      final ObserverContext<MasterCoprocessorEnvironment> ctx,
-      final HTableDescriptor desc,
-      final HRegionInfo[] regions) throws IOException {
-  }
-
-  /**
-   * Called after the createTable operation has been requested.  Called as part
-   * of create table RPC call.  Called as part of create table handler and
-   * it is async to the create RPC call.
-   * @param ctx the environment to interact with the framework and master
-   * @param desc the HTableDescriptor for the table
-   * @param regions the initial regions created for the table
-   * @throws IOException if something went wrong
-   * @deprecated As of release 2.0.0, this will be removed in HBase 3.0.0
-   *   (<a href="https://issues.apache.org/jira/browse/HBASE-15575">HBASE-15575</a>).
-   *   Use {@link #postCompletedCreateTableAction(ObserverContext, HTableDescriptor, HRegionInfo[])}
-   */
-  @Deprecated
-  @Override
-  public void postCreateTableHandler(
-      final ObserverContext<MasterCoprocessorEnvironment> ctx,
-      HTableDescriptor desc, HRegionInfo[] regions) throws IOException {
-  }
-
-  @Override
-  public void postCompletedCreateTableAction(
-      final ObserverContext<MasterCoprocessorEnvironment> ctx,
-      final HTableDescriptor desc,
-      final HRegionInfo[] regions) throws IOException {
-  }
-
-  /**
-   * @deprecated As of release 2.0.0, this will be removed in HBase 3.0.0
-   *   (<a href="https://issues.apache.org/jira/browse/HBASE-">HBASE-</a>).
-   *   Use {@link #preMergeRegions(ObserverContext, HRegionInfo[])}
-   */
-  @Deprecated
-  @Override
-  public void preDispatchMerge(final ObserverContext<MasterCoprocessorEnvironment> ctx,
-      HRegionInfo regionA, HRegionInfo regionB) throws IOException {
-  }
-
-  /**
-   * @deprecated As of release 2.0.0, this will be removed in HBase 3.0.0
-   *   (<a href="https://issues.apache.org/jira/browse/HBASE-">HBASE-</a>).
-   *   Use {@link #postMergeRegions(ObserverContext, HRegionInfo[])}
-   */
-  @Deprecated
-  @Override
-  public void postDispatchMerge(final ObserverContext<MasterCoprocessorEnvironment> ctx,
-      HRegionInfo regionA, HRegionInfo regionB) throws IOException {
-  }
-
-  @Override
-  public void preDeleteTable(ObserverContext<MasterCoprocessorEnvironment> ctx,
-      TableName tableName) throws IOException {
-  }
-
-  @Override
-  public void postDeleteTable(ObserverContext<MasterCoprocessorEnvironment> ctx,
-      TableName tableName) throws IOException {
-  }
-
-  /**
-   * Called before {@link org.apache.hadoop.hbase.master.HMaster} deletes a
-   * table.  Called as part of delete table handler and
-   * it is async to the delete RPC call.
-   * It can't bypass the default action, e.g., ctx.bypass() won't have effect.
-   * @param ctx the environment to interact with the framework and master
-   * @param tableName the name of the table
-   * @throws IOException if something went wrong
-   * @deprecated As of release 2.0.0, this will be removed in HBase 3.0.0
-   *     (<a href="https://issues.apache.org/jira/browse/HBASE-15575">HBASE-15575</a>).
-   *     Use {@link #preDeleteTableAction(ObserverContext, TableName)}.
-   */
-  @Deprecated
-  @Override
-  public void preDeleteTableHandler(
-      final ObserverContext<MasterCoprocessorEnvironment> ctx, TableName tableName)
-      throws IOException{
-  }
-
-  @Override
-  public void preDeleteTableAction(
-      final ObserverContext<MasterCoprocessorEnvironment> ctx, final TableName tableName)
-      throws IOException{
-  }
-
-  /**
-   * Called after {@link org.apache.hadoop.hbase.master.HMaster} deletes a
-   * table.  Called as part of delete table handler and it is async to the
-   * delete RPC call.
-   * It can't bypass the default action, e.g., ctx.bypass() won't have effect.
-   * @param ctx the environment to interact with the framework and master
-   * @param tableName the name of the table
-   * @throws IOException if something went wrong
-   * @deprecated As of release 2.0.0, this will be removed in HBase 3.0.0
-   *     (<a href="https://issues.apache.org/jira/browse/HBASE-15575">HBASE-15575</a>).
-   *     Use {@link #postCompletedDeleteTableAction(ObserverContext, TableName)}.
-   */
-  @Deprecated
-  @Override
-  public void postDeleteTableHandler(
-      final ObserverContext<MasterCoprocessorEnvironment> ctx, TableName tableName)
-      throws IOException {
-  }
-
-  @Override
-  public void postCompletedDeleteTableAction(
-      final ObserverContext<MasterCoprocessorEnvironment> ctx, final 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 {
-  }
-
-  /**
-   * Called before {@link org.apache.hadoop.hbase.master.HMaster} truncates a
-   * table.  Called as part of truncate table handler and it is sync
-   * to the truncate RPC call.
-   * It can't bypass the default action, e.g., ctx.bypass() won't have effect.
-   * @param ctx the environment to interact with the framework and master
-   * @param tableName the name of the table
-   * @throws IOException if something went wrong
-   * @deprecated As of release 2.0.0, this will be removed in HBase 3.0.0
-   *     (<a href="https://issues.apache.org/jira/browse/HBASE-15575">HBASE-15575</a>).
-   *     Use {@link #preTruncateTableAction(ObserverContext, TableName)}.
-   */
-  @Deprecated
-  @Override
-  public void preTruncateTableHandler(
-      final ObserverContext<MasterCoprocessorEnvironment> ctx, TableName tableName)
-      throws IOException {
-  }
-
-  @Override
-  public void preTruncateTableAction(
-      final ObserverContext<MasterCoprocessorEnvironment> ctx, final TableName tableName)
-      throws IOException {
-  }
-
-  /**
-   * Called after {@link org.apache.hadoop.hbase.master.HMaster} truncates a
-   * table.  Called as part of truncate table handler and it is sync to the
-   * truncate RPC call.
-   * It can't bypass the default action, e.g., ctx.bypass() won't have effect.
-   * @param ctx the environment to interact with the framework and master
-   * @param tableName the name of the table
-   * @throws IOException if something went wrong
-   * @deprecated As of release 2.0.0, this will be removed in HBase 3.0.0
-   *     (<a href="https://issues.apache.org/jira/browse/HBASE-15575">HBASE-15575</a>).
-   *     Use {@link #postCompletedTruncateTableAction(ObserverContext, TableName)}.
-   */
-  @Deprecated
-  @Override
-  public void postTruncateTableHandler(
-      final ObserverContext<MasterCoprocessorEnvironment> ctx, TableName tableName)
-      throws IOException {
-  }
-
-  @Override
-  public void postCompletedTruncateTableAction(
-      final ObserverContext<MasterCoprocessorEnvironment> ctx, final TableName tableName)
-      throws IOException {
-  }
-
-  @Override
-  public void preModifyTable(ObserverContext<MasterCoprocessorEnvironment> ctx,
-      TableName tableName, HTableDescriptor htd) throws IOException {
-  }
-
-  @Override
-  public void postModifyTable(ObserverContext<MasterCoprocessorEnvironment> ctx,
-      TableName tableName, HTableDescriptor htd) throws IOException {
-  }
-
-  /**
-   * Called prior to modifying a table's properties.  Called as part of modify
-   * table handler and it is async to the modify table RPC call.
-   * It can't bypass the default action, e.g., ctx.bypass() won't have effect.
-   * @param ctx the environment to interact with the framework and master
-   * @param tableName the name of the table
-   * @param htd the HTableDescriptor
-   * @throws IOException if something went wrong
-   * @deprecated As of release 2.0.0, this will be removed in HBase 3.0.0
-   *     (<a href="https://issues.apache.org/jira/browse/HBASE-15575">HBASE-15575</a>).
-   *     Use {@link #preModifyTableAction(ObserverContext, TableName, HTableDescriptor)}.
-   */
-  @Deprecated
-  @Override
-  public void preModifyTableHandler(
-      ObserverContext<MasterCoprocessorEnvironment> ctx, TableName tableName,
-      HTableDescriptor htd) throws IOException {
-  }
-
-  @Override
-  public void preModifyTableAction(
-      final ObserverContext<MasterCoprocessorEnvironment> ctx,
-      final TableName tableName,
-      final HTableDescriptor htd) throws IOException {
-  }
-
-  /**
-   * Called after to modifying a table's properties.  Called as part of modify
-   * table handler and it is async to the modify table RPC call.
-   * It can't bypass the default action, e.g., ctx.bypass() won't have effect.
-   * @param ctx the environment to interact with the framework and master
-   * @param tableName the name of the table
-   * @param htd the HTableDescriptor
-   * @throws IOException if something went wrong
-   * @deprecated As of release 2.0.0, this will be removed in HBase 3.0.0
-   *     (<a href="https://issues.apache.org/jira/browse/HBASE-13645">HBASE-13645</a>).
-   *     Use {@link #postCompletedModifyTableAction(ObserverContext, TableName, HTableDescriptor)}.
-   */
-  @Deprecated
-  @Override
-  public void postModifyTableHandler(
-      ObserverContext<MasterCoprocessorEnvironment> ctx, TableName tableName,
-      HTableDescriptor htd) throws IOException {
-  }
-
-  @Override
-  public void postCompletedModifyTableAction(
-      final ObserverContext<MasterCoprocessorEnvironment> ctx,
-      final TableName tableName,
-      final 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 preGetNamespaceDescriptor(ObserverContext<MasterCoprocessorEnvironment> ctx,
-      String namespace) throws IOException {
-  }
-
-  @Override
-  public void postGetNamespaceDescriptor(ObserverContext<MasterCoprocessorEnvironment> ctx,
-      NamespaceDescriptor ns) throws IOException {
-  }
-
-  @Override
-  public void preListNamespaceDescriptors(ObserverContext<MasterCoprocessorEnvironment> ctx,
-      List<NamespaceDescriptor> descriptors) throws IOException {
-  }
-
-  @Override
-  public void postListNamespaceDescriptors(ObserverContext<MasterCoprocessorEnvironment> ctx,
-      List<NamespaceDescriptor> descriptors) throws IOException {
-  }
-
-  /**
-   * Called prior to adding a new column family to the table.  Called as part of
-   * add column RPC call.
-   * @param ctx the environment to interact with the framework and master
-   * @param tableName the name of the table
-   * @param columnFamily the HColumnDescriptor
-   * @throws IOException if something went wrong
-   * @deprecated As of release 2.0.0, this will be removed in HBase 3.0.0
-   *             (<a href="https://issues.apache.org/jira/browse/HBASE-13645">HBASE-13645</a>).
-   *             Use {@link #preAddColumnFamily(ObserverContext, TableName, HColumnDescriptor)}.
-   */
-  @Deprecated
-  @Override
-  public void preAddColumn(ObserverContext<MasterCoprocessorEnvironment> ctx,
-      TableName tableName, HColumnDescriptor columnFamily) throws IOException {
-  }
-
-  @Override
-  public void preAddColumnFamily(ObserverContext<MasterCoprocessorEnvironment> ctx,
-      TableName tableName, HColumnDescriptor columnFamily) throws IOException {
-  }
-
-  /**
-   * Called after the new column family has been created.  Called as part of
-   * add column RPC call.
-   * @param ctx the environment to interact with the framework and master
-   * @param tableName the name of the table
-   * @param columnFamily the HColumnDescriptor
-   * @throws IOException if something went wrong
-   * @deprecated As of release 2.0.0, this will be removed in HBase 3.0.0
-   *             (<a href="https://issues.apache.org/jira/browse/HBASE-13645">HBASE-13645</a>).
-   *             Use {@link #postAddColumnFamily(ObserverContext, TableName, HColumnDescriptor)}.
-   */
-  @Deprecated
-  @Override
-  public void postAddColumn(ObserverContext<MasterCoprocessorEnvironment> ctx,
-      TableName tableName, HColumnDescriptor columnFamily) throws IOException {
-  }
-
-  @Override
-  public void postAddColumnFamily(ObserverContext<MasterCoprocessorEnvironment> ctx,
-      TableName tableName, HColumnDescriptor columnFamily) throws IOException {
-  }
-
-  /**
-   * Called prior to adding a new column family to the table.  Called as part of
-   * add column handler.
-   * @param ctx the environment to interact with the framework and master
-   * @param tableName the name of the table
-   * @param columnFamily the HColumnDescriptor
-   * @throws IOException if something went wrong
-   * @deprecated As of release 2.0.0, this will be removed in HBase 3.0.0
-   *          (<a href="https://issues.apache.org/jira/browse/HBASE-13645">HBASE-13645</a>). Use
-   *          {@link #preAddColumnFamilyAction(ObserverContext, TableName, HColumnDescriptor)}.
-   */
-  @Deprecated
-  @Override
-  public void preAddColumnHandler(
-      ObserverContext<MasterCoprocessorEnvironment> ctx, TableName tableName,
-      HColumnDescriptor columnFamily) throws IOException {
-  }
-
-  @Override
-  public void preAddColumnFamilyAction(
-      final ObserverContext<MasterCoprocessorEnvironment> ctx,
-      final TableName tableName,
-      final HColumnDescriptor columnFamily) throws IOException {
-  }
-
-  /**
-   * Called after the new column family has been created.  Called as part of
-   * add column handler.
-   * @param ctx the environment to interact with the framework and master
-   * @param tableName the name of the table
-   * @param columnFamily the HColumnDescriptor
-   * @throws IOException if something went wrong
-   * @deprecated As of release 2.0.0, this will be removed in HBase 3.0.0
-   *     (<a href="https://issues.apache.org/jira/browse/HBASE-13645">HBASE-13645</a>). Use
-   *     {@link #postCompletedAddColumnFamilyAction(ObserverContext, TableName, HColumnDescriptor)}.
-   */
-  @Deprecated
-  @Override
-  public void postAddColumnHandler(
-      ObserverContext<MasterCoprocessorEnvironment> ctx, TableName tableName,
-      HColumnDescriptor columnFamily) throws IOException {
-  }
-
-  @Override
-  public void postCompletedAddColumnFamilyAction(
-      final ObserverContext<MasterCoprocessorEnvironment> ctx,
-      final TableName tableName,
-      final HColumnDescriptor columnFamily) throws IOException {
-  }
-
-  /**
-   * Called prior to modifying a column family's attributes.  Called as part of
-   * modify column RPC call.
-   * @param ctx the environment to interact with the framework and master
-   * @param tableName the name of the table
-   * @param columnFamily the HColumnDescriptor
-   * @throws IOException if something went wrong
-   * @deprecated As of release 2.0.0, this will be removed in HBase 3.0.0
-   *             (<a href="https://issues.apache.org/jira/browse/HBASE-13645">HBASE-13645</a>).
-   *             Use {@link #preModifyColumnFamily(ObserverContext, TableName, HColumnDescriptor)}.
-   */
-  @Deprecated
-  @Override
-  public void preModifyColumn(ObserverContext<MasterCoprocessorEnvironment> ctx,
-      TableName tableName, HColumnDescriptor columnFamily) throws IOException {
-  }
-
-  @Override
-  public void preModifyColumnFamily(ObserverContext<MasterCoprocessorEnvironment> ctx,
-      TableName tableName, HColumnDescriptor columnFamily) throws IOException {
-  }
-
-  /**
-   * Called after the column family has been updated.  Called as part of modify
-   * column RPC call.
-   * @param ctx the environment to interact with the framework and master
-   * @param tableName the name of the table
-   * @param columnFamily the HColumnDescriptor
-   * @throws IOException if something went wrong
-   * @deprecated As of release 2.0.0, this will be removed in HBase 3.0.0
-   *             (<a href="https://issues.apache.org/jira/browse/HBASE-13645">HBASE-13645</a>).
-   *             Use {@link #postModifyColumnFamily(ObserverContext, TableName, HColumnDescriptor)}.
-   */
-  @Deprecated
-  @Override
-  public void postModifyColumn(ObserverContext<MasterCoprocessorEnvironment> ctx,
-      TableName tableName, HColumnDescriptor columnFamily) throws IOException {
-  }
-
-  @Override
-  public void postModifyColumnFamily(ObserverContext<MasterCoprocessorEnvironment> ctx,
-      TableName tableName, HColumnDescriptor columnFamily) throws IOException {
-  }
-
-  /**
-   * Called prior to modifying a column family's attributes.  Called as part of
-   * modify column handler.
-   * @param ctx the environment to interact with the framework and master
-   * @param tableName the name of the table
-   * @param columnFamily the HColumnDescriptor
-   * @throws IOException if something went wrong
-   * @deprecated As of release 2.0.0, this will be removed in HBase 3.0.0
-   *     (<a href="https://issues.apache.org/jira/browse/HBASE-13645">HBASE-13645</a>).
-   *     Use {@link #preModifyColumnFamilyAction(ObserverContext, TableName, HColumnDescriptor)}.
-   */
-  @Deprecated
-  @Override
-  public void preModifyColumnHandler(
-      ObserverContext<MasterCoprocessorEnvironment> ctx, TableName tableName,
-      HColumnDescriptor columnFamily) throws IOException {
-  }
-
-  @Override
-  public void preModifyColumnFamilyAction(
-      final ObserverContext<MasterCoprocessorEnvironment> ctx,
-      final TableName tableName,
-      final HColumnDescriptor columnFamily) throws IOException {
-  }
-
-  /**
-   * Called after the column family has been updated.  Called as part of modify
-   * column handler.
-   * @param ctx the environment to interact with the framework and master
-   * @param tableName the name of the table
-   * @param columnFamily the HColumnDescriptor
-   * @throws IOException if something went wrong
-   * @deprecated As of release 2.0.0, this will be removed in HBase 3.0.0
-   *   (<a href="https://issues.apache.org/jira/browse/HBASE-13645">HBASE-13645</a>). Use
-   *   {@link #postCompletedModifyColumnFamilyAction(ObserverContext,TableName,HColumnDescriptor)}.
-   */
-  @Deprecated
-  @Override
-  public void postModifyColumnHandler(
-      ObserverContext<MasterCoprocessorEnvironment> ctx, TableName tableName,
-      HColumnDescriptor columnFamily) throws IOException {
-  }
-
-  @Override
-  public void postCompletedModifyColumnFamilyAction(
-      final ObserverContext<MasterCoprocessorEnvironment> ctx,
-      final TableName tableName,
-      final HColumnDescriptor columnFamily) throws IOException {
-  }
-
-  /**
-   * Called prior to deleting the entire column family.  Called as part of
-   * delete column RPC call.
-   * @param ctx the environment to interact with the framework and master
-   * @param tableName the name of the table
-   * @param columnFamily the column family
-   * @throws IOException if something went wrong
-   * @deprecated As of release 2.0.0, this will be removed in HBase 3.0.0
-   *             (<a href="https://issues.apache.org/jira/browse/HBASE-13645">HBASE-13645</a>).
-   *             Use {@link #preDeleteColumnFamily(ObserverContext, TableName, byte[])}.
-   */
-  @Deprecated
-  @Override
-  public void preDeleteColumn(ObserverContext<MasterCoprocessorEnvironment> ctx,
-      TableName tableName, byte[] columnFamily) throws IOException {
-  }
-
-  @Override
-  public void preDeleteColumnFamily(ObserverContext<MasterCoprocessorEnvironment> ctx,
-      TableName tableName, byte[] columnFamily) throws IOException {
-  }
-
-  /**
-   * Called after the column family has been deleted.  Called as part of delete
-   * column RPC call.
-   * @param ctx the environment to interact with the framework and master
-   * @param tableName the name of the table
-   * @param columnFamily the column family
-   * @throws IOException if something went wrong
-   * @deprecated As of release 2.0.0, this will be removed in HBase 3.0.0
-   *             (<a href="https://issues.apache.org/jira/browse/HBASE-13645">HBASE-13645</a>).
-   *             Use {@link #postDeleteColumnFamily(ObserverContext, TableName, byte[])}.
-   */
-  @Deprecated
-  @Override
-  public void postDeleteColumn(ObserverContext<MasterCoprocessorEnvironment> ctx,
-      TableName tableName, byte[] columnFamily) throws IOException {
-  }
-
-  @Override
-  public void postDeleteColumnFamily(ObserverContext<MasterCoprocessorEnvironment> ctx,
-      TableName tableName, byte[] columnFamily) throws IOException {
-  }
-
-  /**
-   * Called prior to deleting the entire column family.  Called as part of
-   * delete column handler.
-   * @param ctx the environment to interact with the framework and master
-   * @param tableName the name of the table
-   * @param columnFamily the column family
-   * @throws IOException if something went wrong
-   * @deprecated As of release 2.0.0, this will be removed in HBase 3.0.0
-   *             (<a href="https://issues.apache.org/jira/browse/HBASE-13645">HBASE-13645</a>).
-   *             Use {@link #preDeleteColumnFamilyAction(ObserverContext, TableName, byte[])}.
-   */
-  @Deprecated
-  @Override
-  public void preDeleteColumnHandler(
-      ObserverContext<MasterCoprocessorEnvironment> ctx, TableName tableName,
-      byte[] columnFamily) throws IOException {
-  }
-
-  @Override
-  public void preDeleteColumnFamilyAction(
-      final ObserverContext<MasterCoprocessorEnvironment> ctx,
-      final TableName tableName,
-      final byte[] columnFamily) throws IOException {
-  }
-
-  /**
-   * Called after the column family has been deleted.  Called as part of
-   * delete column handler.
-   * @param ctx the environment to interact with the framework and master
-   * @param tableName the name of the table
-   * @param columnFamily the column family
-   * @throws IOException if something went wrong
-   * @deprecated As of release 2.0.0, this will be removed in HBase 3.0.0
-   *         (<a href="https://issues.apache.org/jira/browse/HBASE-13645">HBASE-13645</a>).
-   *         Use {@link #postCompletedDeleteColumnFamilyAction(ObserverContext, TableName, byte[])}.
-   */
-  @Deprecated
-  @Override
-  public void postDeleteColumnHandler(
-      ObserverContext<MasterCoprocessorEnvironment> ctx, TableName tableName,
-      byte[] columnFamily) throws IOException {
-  }
-
-  @Override
-  public void postCompletedDeleteColumnFamilyAction(
-      final ObserverContext<MasterCoprocessorEnvironment> ctx,
-      final TableName tableName,
-      final byte[] columnFamily) throws IOException {
-  }
-
-
-  @Override
-  public void preEnableTable(ObserverContext<MasterCoprocessorEnvironment> ctx,
-      TableName tableName) throws IOException {
-  }
-
-  @Override
-  public void postEnableTable(ObserverContext<MasterCoprocessorEnvironment> ctx,
-      TableName tableName) throws IOException {
-  }
-
-  /**
-   * Called prior to enabling a table.  Called as part of enable table handler
-   * and it is async to the enable table RPC call.
-   * It can't bypass the default action, e.g., ctx.bypass() won't have effect.
-   * @param ctx the environment to interact with the framework and master
-   * @param tableName the name of the table
-   * @throws IOException if something went wrong
-   * @deprecated As of release 2.0.0, this will be removed in HBase 3.0.0
-   *     (<a href="https://issues.apache.org/jira/browse/HBASE-15575">HBASE-15575</a>).
-   *     Use {@link #preEnableTableAction(ObserverContext, TableName)}.
-   */
-  @Deprecated
-  @Override
-  public void preEnableTableHandler(
-      ObserverContext<MasterCoprocessorEnvironment> ctx, TableName tableName)
-      throws IOException {
-  }
-
-  @Override
-  public void preEnableTableAction(
-      ObserverContext<MasterCoprocessorEnvironment> ctx, final TableName tableName)
-      throws IOException {
-  }
-
-  /**
-   * Called after the enableTable operation has been requested.  Called as part
-   * of enable table handler and it is async to the enable table RPC call.
-   * @param ctx the environment to interact with the framework and master
-   * @param tableName the name of the table
-   * @throws IOException if something went wrong
-   * @deprecated As of release 2.0.0, this will be removed in HBase 3.0.0
-   *     (<a href="https://issues.apache.org/jira/browse/HBASE-15575">HBASE-15575</a>).
-   *     Use {@link #postCompletedEnableTableAction(ObserverContext, TableName)}.
-   */
-  @Deprecated
-  @Override
-  public void postEnableTableHandler(
-      ObserverContext<MasterCoprocessorEnvironment> ctx, TableName tableName)
-      throws IOException {
-  }
-
-  @Override
-  public void postCompletedEnableTableAction(
-      ObserverContext<MasterCoprocessorEnvironment> ctx, final 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 {
-  }
-
-  /**
-   * Called prior to disabling a table.  Called as part of disable table handler
-   * and it is asyn to the disable table RPC call.
-   * It can't bypass the default action, e.g., ctx.bypass() won't have effect.
-   * @param ctx the environment to interact with the framework and master
-   * @param tableName the name of the table
-   * @throws IOException if something went wrong
-   * @deprecated As of release 2.0.0, this will be removed in HBase 3.0.0
-   *     (<a href="https://issues.apache.org/jira/browse/HBASE-15575">HBASE-15575</a>).
-   *     Use {@link #preDisableTableAction(ObserverContext, TableName)}.
-   */
-  @Deprecated
-  @Override
-  public void preDisableTableHandler(
-      ObserverContext<MasterCoprocessorEnvironment> ctx, TableName tableName)
-      throws IOException {
-  }
-
-  @Override
-  public void preDisableTableAction(
-      ObserverContext<MasterCoprocessorEnvironment> ctx, final TableName tableName)
-      throws IOException {
-  }
-
-  /**
-   * Called after the disableTable operation has been requested.  Called as part
-   * of disable table handler and it is asyn to the disable table RPC call.
-   * @param ctx the environment to interact with the framework and master
-   * @param tableName the name of the table
-   * @throws IOException if something went wrong
-   * @deprecated As of release 2.0.0, this will be removed in HBase 3.0.0
-   *     (<a href="https://issues.apache.org/jira/browse/HBASE-15575">HBASE-15575</a>).
-   *     Use {@link #postCompletedDisableTableAction(ObserverContext, TableName)}.
-   */
-  @Deprecated
-  @Override
-  public void postDisableTableHandler(
-      ObserverContext<MasterCoprocessorEnvironment> ctx, TableName tableName)
-      throws IOException {
-  }
-
-  @Override
-  public void postCompletedDisableTableAction(
-      ObserverContext<MasterCoprocessorEnvironment> ctx, final TableName tableName)
-      throws IOException {
-  }
-
-  @Override
-  public void preMergeRegions(
-      final ObserverContext<MasterCoprocessorEnvironment> ctx,
-      final HRegionInfo[] regionsToMerge) throws IOException {
-  }
-
-  @Override
-  public void postMergeRegions(
-      final ObserverContext<MasterCoprocessorEnvironment> ctx,
-      final HRegionInfo[] regionsToMerge) throws IOException {
-  }
-
-  @Override
-  public void preAbortProcedure(
-      ObserverContext<MasterCoprocessorEnvironment> ctx,
-      final ProcedureExecutor<MasterProcedureEnv> procEnv,
-      final long procId) throws IOException {
-  }
-
-  @Override
-  public void postAbortProcedure(ObserverContext<MasterCoprocessorEnvironment> ctx)
-      throws IOException {
-  }
-
-  @Override
-  public void preListProcedures(ObserverContext<MasterCoprocessorEnvironment> ctx)
-      throws IOException {
-  }
-
-  @Override
-  public void postListProcedures(
-      ObserverContext<MasterCoprocessorEnvironment> ctx,
-      List<ProcedureInfo> procInfoList) 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 boolean preSetSplitOrMergeEnabled(final ObserverContext<MasterCoprocessorEnvironment> ctx,
-      final boolean newValue, final MasterSwitchType switchType) throws IOException {
-    return false;
-  }
-
-  @Override
-  public void postSetSplitOrMergeEnabled(final ObserverContext<MasterCoprocessorEnvironment> ctx,
-      final boolean newValue, final MasterSwitchType switchType) throws IOException {
-  }
-
-  @Override
-  public void preSplitRegion(
-      final ObserverContext<MasterCoprocessorEnvironment> c,
-      final TableName tableName,
-      final byte[] splitRow) throws IOException {
-  }
-
-  @Override
-  public void preSplitRegionAction(
-      final ObserverContext<MasterCoprocessorEnvironment> c,
-      final TableName tableName,
-      final byte[] splitRow) throws IOException {
-  }
-
-  @Override
-  public void postCompletedSplitRegionAction(
-      final ObserverContext<MasterCoprocessorEnvironment> c,
-      final HRegionInfo regionInfoA,
-      final HRegionInfo regionInfoB) throws IOException {
-  }
-
-  @Override
-  public void preSplitRegionBeforePONRAction(
-      final ObserverContext<MasterCoprocessorEnvironment> ctx,
-      final byte[] splitKey,
-      final List<Mutation> metaEntries) throws IOException {
-  }
-
-  @Override
-  public void preSplitRegionAfterPONRAction(
-      final ObserverContext<MasterCoprocessorEnvironment> ctx) throws IOException {
-  }
-
-  @Override
-  public void postRollBackSplitRegionAction(final ObserverContext<MasterCoprocessorEnvironment> ctx)
-      throws IOException {
-  }
-
-  @Override
-  public void preMergeRegionsAction(
-      final ObserverContext<MasterCoprocessorEnvironment> ctx,
-      final HRegionInfo[] regionsToMerge) throws IOException {
-  }
-
-  @Override
-  public void postCompletedMergeRegionsAction(
-      final ObserverContext<MasterCoprocessorEnvironment> c,
-      final HRegionInfo[] regionsToMerge,
-      final HRegionInfo mergedRegion) throws IOException {
-  }
-
-  @Override
-  public void preMergeRegionsCommitAction(
-      final ObserverContext<MasterCoprocessorEnvironment> ctx,
-      final HRegionInfo[] regionsToMerge,
-      final List<Mutation> metaEntries) throws IOException {
-  }
-
-  @Override
-  public void postMergeRegionsCommitAction(
-      final ObserverContext<MasterCoprocessorEnvironment> ctx,
-      final HRegionInfo[] regionsToMerge,
-      final HRegionInfo mergedRegion) throws IOException {
-  }
-
-  @Override
-  public void postRollBackMergeRegionsAction(
-      final ObserverContext<MasterCoprocessorEnvironment> ctx,
-      final HRegionInfo[] regionsToMerge) 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 preListSnapshot(final ObserverContext<MasterCoprocessorEnvironment> ctx,
-      final SnapshotDescription snapshot) throws IOException {
-  }
-
-  @Override
-  public void postListSnapshot(final ObserverContext<MasterCoprocessorEnvironment> ctx,
-      final SnapshotDescription snapshot) 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, String regex)
-      throws IOException {
-  }
-
-  @Override
-  public void postGetTableDescriptors(ObserverContext<MasterCoprocessorEnvironment> ctx,
-      List<TableName> tableNamesList, List<HTableDescriptor> descriptors,
-      String regex) throws IOException {
-  }
-
-  @Override
-  public void preGetTableNames(ObserverContext<MasterCoprocessorEnvironment> ctx,
-      List<HTableDescriptor> descriptors, String regex) throws IOException {
-  }
-
-  @Override
-  public void postGetTableNames(ObserverContext<MasterCoprocessorEnvironment> ctx,
-      List<HTableDescriptor> descriptors, String regex) 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 preSetUserQuota(final ObserverContext<MasterCoprocessorEnvironment> ctx,
-      final String userName, final Quotas quotas) throws IOException {
-  }
-
-  @Override
-  public void postSetUserQuota(final ObserverContext<MasterCoprocessorEnvironment> ctx,
-      final String userName, final Quotas quotas) throws IOException {
-  }
-
-  @Override
-  public void preSetUserQuota(final ObserverContext<MasterCoprocessorEnvironment> ctx,
-      final String userName, final TableName tableName, final Quotas quotas) throws IOException {
-  }
-
-  @Override
-  public void postSetUserQuota(final ObserverContext<MasterCoprocessorEnvironment> ctx,
-      final String userName, final TableName tableName, final Quotas quotas) throws IOException {
-  }
-
-  @Override
-  public void preSetUserQuota(final ObserverContext<MasterCoprocessorEnvironment> ctx,
-      final String userName, final String namespace, final Quotas quotas) throws IOException {
-  }
-
-  @Override
-  public void postSetUserQuota(final ObserverContext<MasterCoprocessorEnvironment> ctx,
-      final String userName, final String namespace, final Quotas quotas) throws IOException {
-  }
-
-  @Override
-  public void preSetTableQuota(final ObserverContext<MasterCoprocessorEnvironment> ctx,
-      final TableName tableName, final Quotas quotas) throws IOException {
-  }
-
-  @Override
-  public void postSetTableQuota(final ObserverContext<MasterCoprocessorEnvironment> ctx,
-      final TableName tableName, final Quotas quotas) throws IOException {
-  }
-
-  @Override
-  public void preSetNamespaceQuota(final ObserverContext<MasterCoprocessorEnvironment> ctx,
-      final String namespace, final Quotas quotas) throws IOException {
-  }
-
-  @Override
-  public void postSetNamespaceQuota(final ObserverContext<MasterCoprocessorEnvironment> ctx,
-      final String namespace, final Quotas quotas) throws IOException {
-  }
-
-  @Override
-  public void preMoveServers(ObserverContext<MasterCoprocessorEnvironment> ctx, Set<Address>
-      servers, String targetGroup) throws IOException {
-  }
-
-  @Override
-  public void postMoveServers(ObserverContext<MasterCoprocessorEnvironment> ctx, Set<Address>
-      servers, String targetGroup) throws IOException {
-  }
-
-  @Override
-  public void preMoveTables(ObserverContext<MasterCoprocessorEnvironment> ctx, Set<TableName>
-      tables, String targetGroup) throws IOException {
-  }
-
-  @Override
-  public void postMoveTables(ObserverContext<MasterCoprocessorEnvironment> ctx,
-      Set<TableName> tables, String targetGroup) throws IOException {
-  }
-
-  @Override
-  public void preAddRSGroup(ObserverContext<MasterCoprocessorEnvironment> ctx, String name)
-      throws IOException {
-  }
-
-  @Override
-  public void postAddRSGroup(ObserverContext<MasterCoprocessorEnvironment> ctx, String name)
-      throws IOException {
-  }
-
-  @Override
-  public void preRemoveRSGroup(ObserverContext<MasterCoprocessorEnvironment> ctx, String name)
-      throws IOException {
-
-  }
-
-  @Override
-  public void postRemoveRSGroup(ObserverContext<MasterCoprocessorEnvironment> ctx, String name)
-      throws IOException {
-  }
-
-  @Override
-  public void preBalanceRSGroup(ObserverContext<MasterCoprocessorEnvironment> ctx, String groupName)
-      throws IOException {
-  }
-
-  @Override
-  public void postBalanceRSGroup(ObserverContext<MasterCoprocessorEnvironment> ctx,
-      String groupName, boolean balancerRan) throws IOException {
-  }
-
-  @Override
-  public void preRequestLock(ObserverContext<MasterCoprocessorEnvironment> ctx, String namespace,
-      TableName tableName, HRegionInfo[] regionInfos, LockProcedure.LockType type,
-      String description) throws IOException {
-  }
-
-  @Override
-  public void postRequestLock(ObserverContext<MasterCoprocessorEnvironment> ctx, String namespace,
-      TableName tableName, HRegionInfo[] regionInfos, LockProcedure.LockType type,
-      String description) throws IOException {
-  }
-
-  @Override
-  public void preLockHeartbeat(ObserverContext<MasterCoprocessorEnvironment> ctx,
-      LockProcedure proc, boolean keepAlive) throws IOException {
-  }
-
-  @Override
-  public void postLockHeartbeat(ObserverContext<MasterCoprocessorEnvironment> ctx,
-      LockProcedure proc, boolean keepAlive) throws IOException {
-  }
-}

http://git-wip-us.apache.org/repos/asf/hbase/blob/f444b3b5/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
deleted file mode 100644
index f5cc4de..0000000
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/coprocessor/BaseRegionObserver.java
+++ /dev/null
@@ -1,559 +0,0 @@
-/*
- * 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 com.google.common.collect.ImmutableList;
-
-import java.io.IOException;
-import java.util.List;
-import java.util.Map;
-import java.util.NavigableSet;
-
-import org.apache.hadoop.fs.FileSystem;
-import org.apache.hadoop.fs.Path;
-import org.apache.hadoop.hbase.Cell;
-import org.apache.hadoop.hbase.CoprocessorEnvironment;
-import org.apache.hadoop.hbase.HBaseInterfaceAudience;
-import org.apache.hadoop.hbase.HRegionInfo;
-import org.apache.hadoop.hbase.classification.InterfaceAudience;
-import org.apache.hadoop.hbase.classification.InterfaceStability;
-import org.apache.hadoop.hbase.client.Append;
-import org.apache.hadoop.hbase.client.Delete;
-import org.apache.hadoop.hbase.client.Durability;
-import org.apache.hadoop.hbase.client.Get;
-import org.apache.hadoop.hbase.client.Increment;
-import org.apache.hadoop.hbase.client.Mutation;
-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.filter.ByteArrayComparable;
-import org.apache.hadoop.hbase.filter.CompareFilter.CompareOp;
-import org.apache.hadoop.hbase.io.FSDataInputStreamWrapper;
-import org.apache.hadoop.hbase.io.Reference;
-import org.apache.hadoop.hbase.io.hfile.CacheConfig;
-import org.apache.hadoop.hbase.regionserver.InternalScanner;
-import org.apache.hadoop.hbase.regionserver.KeyValueScanner;
-import org.apache.hadoop.hbase.regionserver.MiniBatchOperationInProgress;
-import org.apache.hadoop.hbase.regionserver.Region;
-import org.apache.hadoop.hbase.regionserver.Region.Operation;
-import org.apache.hadoop.hbase.regionserver.RegionScanner;
-import org.apache.hadoop.hbase.regionserver.ScanType;
-import org.apache.hadoop.hbase.regionserver.Store;
-import org.apache.hadoop.hbase.regionserver.StoreFile;
-import org.apache.hadoop.hbase.regionserver.StoreFileReader;
-import org.apache.hadoop.hbase.regionserver.compactions.CompactionRequest;
-import org.apache.hadoop.hbase.regionserver.querymatcher.DeleteTracker;
-import org.apache.hadoop.hbase.regionserver.wal.WALEdit;
-import org.apache.hadoop.hbase.util.Pair;
-import org.apache.hadoop.hbase.wal.WALKey;
-
-/**
- * An abstract class that implements RegionObserver.
- * By extending it, you can create your own region observer without
- * overriding all abstract methods of RegionObserver.
- */
-@InterfaceAudience.LimitedPrivate(HBaseInterfaceAudience.COPROC)
-@InterfaceStability.Evolving
-public class BaseRegionObserver implements RegionObserver {
-  @Override
-  public void start(CoprocessorEnvironment e) throws IOException { }
-
-  @Override
-  public void stop(CoprocessorEnvironment e) throws IOException { }
-
-  @Override
-  public void preOpen(ObserverContext<RegionCoprocessorEnvironment> e) throws IOException { }
-
-  @Override
-  public void postOpen(ObserverContext<RegionCoprocessorEnvironment> e) { }
-
-  @Override
-  public void postLogReplay(ObserverContext<RegionCoprocessorEnvironment> e) { }
-
-  @Override
-  public void preClose(ObserverContext<RegionCoprocessorEnvironment> c, boolean abortRequested)
-      throws IOException { }
-
-  @Override
-  public void postClose(ObserverContext<RegionCoprocessorEnvironment> e,
-      boolean abortRequested) { }
-
-  @Override
-  public InternalScanner preFlushScannerOpen(final ObserverContext<RegionCoprocessorEnvironment> c,
-      final Store store, final KeyValueScanner memstoreScanner, final InternalScanner s)
-      throws IOException {
-    return s;
-  }
-
-  @Override
-  public InternalScanner preFlushScannerOpen(final ObserverContext<RegionCoprocessorEnvironment> c,
-      final Store store, final KeyValueScanner memstoreScanner, final InternalScanner s,
-      final long readPoint) throws IOException {
-    return preFlushScannerOpen(c, store, memstoreScanner, s);
-  }
-
-  @Override
-  public void preFlush(ObserverContext<RegionCoprocessorEnvironment> e) throws IOException {
-  }
-
-  @Override
-  public void postFlush(ObserverContext<RegionCoprocessorEnvironment> e) throws IOException {
-  }
-
-  @Override
-  public InternalScanner preFlush(ObserverContext<RegionCoprocessorEnvironment> e, Store store,
-      InternalScanner scanner) throws IOException {
-    return scanner;
-  }
-
-  @Override
-  public void postFlush(ObserverContext<RegionCoprocessorEnvironment> e, Store store,
-      StoreFile resultFile) throws IOException {
-  }
-
-  @Override
-  public void preSplit(ObserverContext<RegionCoprocessorEnvironment> e) throws IOException {
-  }
-
-  @Override
-  public void preSplit(ObserverContext<RegionCoprocessorEnvironment> c,
-      byte[] splitRow) throws IOException {
-  }
-
-  @Override
-  public void preSplitBeforePONR(ObserverContext<RegionCoprocessorEnvironment> ctx,
-      byte[] splitKey, List<Mutation> metaEntries) throws IOException {
-  }
-
-  @Override
-  public void preSplitAfterPONR(
-      ObserverContext<RegionCoprocessorEnvironment> ctx) throws IOException {
-  }
-
-  @Override
-  public void preRollBackSplit(ObserverContext<RegionCoprocessorEnvironment> ctx)
-      throws IOException {
-  }
-
-  @Override
-  public void postRollBackSplit(
-      ObserverContext<RegionCoprocessorEnvironment> ctx) throws IOException {
-  }
-
-  @Override
-  public void postCompleteSplit(
-      ObserverContext<RegionCoprocessorEnvironment> ctx) throws IOException {
-  }
-
-  @Override
-  public void postSplit(ObserverContext<RegionCoprocessorEnvironment> e, Region l, Region r)
-      throws IOException {
-  }
-
-  @Override
-  public void preCompactSelection(final ObserverContext<RegionCoprocessorEnvironment> c,
-      final Store store, final List<StoreFile> candidates) throws IOException { }
-
-  @Override
-  public void preCompactSelection(final ObserverContext<RegionCoprocessorEnvironment> c,
-      final Store store, final List<StoreFile> candidates, final CompactionRequest request)
-      throws IOException {
-    preCompactSelection(c, store, candidates);
-  }
-
-  @Override
-  public void postCompactSelection(final ObserverContext<RegionCoprocessorEnvironment> c,
-      final Store store, final ImmutableList<StoreFile> selected) { }
-
-  @Override
-  public void postCompactSelection(final ObserverContext<RegionCoprocessorEnvironment> c,
-      final Store store, final ImmutableList<StoreFile> selected, CompactionRequest request) {
-    postCompactSelection(c, store, selected);
-  }
-
-  @Override
-  public InternalScanner preCompact(ObserverContext<RegionCoprocessorEnvironment> e,
-      final Store store, final InternalScanner scanner, final ScanType scanType)
-      throws IOException {
-    return scanner;
-  }
-
-  @Override
-  public InternalScanner preCompact(ObserverContext<RegionCoprocessorEnvironment> e,
-      final Store store, final InternalScanner scanner, final ScanType scanType,
-      CompactionRequest request) throws IOException {
-    return preCompact(e, store, scanner, scanType);
-  }
-
-  @Override
-  public InternalScanner preCompactScannerOpen(
-      final ObserverContext<RegionCoprocessorEnvironment> c, final Store store,
-      List<? extends KeyValueScanner> scanners, final ScanType scanType, final long earliestPutTs,
-      final InternalScanner s) throws IOException {
-    return s;
-  }
-
-  @Override
-  public InternalScanner preCompactScannerOpen(
-      final ObserverContext<RegionCoprocessorEnvironment> c, final Store store,
-      List<? extends KeyValueScanner> scanners, final ScanType scanType, final long earliestPutTs,
-      final InternalScanner s, CompactionRequest request) throws IOException {
-    return preCompactScannerOpen(c, store, scanners, scanType, earliestPutTs, s);
-  }
-
-  @Override
-  public InternalScanner preCompactScannerOpen(ObserverContext<RegionCoprocessorEnvironment> c,
-      Store store, List<? extends KeyValueScanner> scanners, ScanType scanType, long earliestPutTs,
-      InternalScanner s, CompactionRequest request, long readPoint) throws IOException {
-    return preCompactScannerOpen(c, store, scanners, scanType, earliestPutTs, s, request);
-  }
-
-  @Override
-  public void postCompact(ObserverContext<RegionCoprocessorEnvironment> e, final Store store,
-      final StoreFile resultFile) throws IOException {
-  }
-
-@Override
-  public void postCompact(ObserverContext<RegionCoprocessorEnvironment> e, final Store store,
-      final StoreFile resultFile, CompactionRequest request) throws IOException {
-    postCompact(e, store, resultFile);
-  }
-
-  @Override
-  public void preGetOp(final ObserverContext<RegionCoprocessorEnvironment> e,
-      final Get get, final List<Cell> results) throws IOException {
-  }
-
-  @Override
-  public void postGetOp(final ObserverContext<RegionCoprocessorEnvironment> e,
-      final Get get, final List<Cell> results) throws IOException {
-  }
-
-  @Override
-  public boolean preExists(final ObserverContext<RegionCoprocessorEnvironment> e,
-      final Get get, final boolean exists) throws IOException {
-    return exists;
-  }
-
-  @Override
-  public boolean postExists(final ObserverContext<RegionCoprocessorEnvironment> e,
-      final Get get, boolean exists) throws IOException {
-    return exists;
-  }
-
-  @Override
-  public void prePut(final ObserverContext<RegionCoprocessorEnvironment> e,
-      final Put put, final WALEdit edit, final Durability durability) throws IOException {
-  }
-
-  @Override
-  public void postPut(final ObserverContext<RegionCoprocessorEnvironment> e,
-      final Put put, final WALEdit edit, final Durability durability) throws IOException {
-  }
-
-  @Override
-  public void preDelete(final ObserverContext<RegionCoprocessorEnvironment> e, final Delete delete,
-      final WALEdit edit, final Durability durability) throws IOException {
-  }
-
-  @Override
-  public void prePrepareTimeStampForDeleteVersion(
-      final ObserverContext<RegionCoprocessorEnvironment> e, final Mutation delete,
-      final Cell cell, final byte[] byteNow, final Get get) throws IOException {
-  }
-
-  @Override
-  public void postDelete(final ObserverContext<RegionCoprocessorEnvironment> e,
-      final Delete delete, final WALEdit edit, final Durability durability)
-      throws IOException {
-  }
-
-  @Override
-  public void preBatchMutate(final ObserverContext<RegionCoprocessorEnvironment> c,
-      final MiniBatchOperationInProgress<Mutation> miniBatchOp) throws IOException {
-  }
-
-  @Override
-  public void postBatchMutate(final ObserverContext<RegionCoprocessorEnvironment> c,
-      final MiniBatchOperationInProgress<Mutation> miniBatchOp) throws IOException {
-  }
-
-  @Override
-  public void postBatchMutateIndispensably(final ObserverContext<RegionCoprocessorEnvironment> ctx,
-      MiniBatchOperationInProgress<Mutation> miniBatchOp, final boolean success) throws IOException {
-  }
-
-  @Override
-  public boolean preCheckAndPut(final ObserverContext<RegionCoprocessorEnvironment> e,
-      final byte [] row, final byte [] family, final byte [] qualifier,
-      final CompareOp compareOp, final ByteArrayComparable comparator,
-      final Put put, final boolean result) throws IOException {
-    return result;
-  }
-
-  @Override
-  public boolean preCheckAndPutAfterRowLock(
-      final ObserverContext<RegionCoprocessorEnvironment> e,
-      final byte[] row, final byte[] family, final byte[] qualifier, final CompareOp compareOp,
-      final ByteArrayComparable comparator, final Put put,
-      final boolean result) throws IOException {
-    return result;
-  }
-
-  @Override
-  public boolean postCheckAndPut(final ObserverContext<RegionCoprocessorEnvironment> e,
-      final byte [] row, final byte [] family, final byte [] qualifier,
-      final CompareOp compareOp, final ByteArrayComparable comparator,
-      final Put put, final boolean result) throws IOException {
-    return result;
-  }
-
-  @Override
-  public boolean preCheckAndDelete(final ObserverContext<RegionCoprocessorEnvironment> e,
-      final byte [] row, final byte [] family, final byte [] qualifier,
-      final CompareOp compareOp, final ByteArrayComparable comparator,
-      final Delete delete, final boolean result) throws IOException {
-    return result;
-  }
-
-  @Override
-  public boolean preCheckAndDeleteAfterRowLock(
-      final ObserverContext<RegionCoprocessorEnvironment> e,
-      final byte[] row, final byte[] family, final byte[] qualifier, final CompareOp compareOp,
-      final ByteArrayComparable comparator, final Delete delete,
-      final boolean result) throws IOException {
-    return result;
-  }
-
-  @Override
-  public boolean postCheckAndDelete(final ObserverContext<RegionCoprocessorEnvironment> e,
-      final byte [] row, final byte [] family, final byte [] qualifier,
-      final CompareOp compareOp, final ByteArrayComparable comparator,
-      final Delete delete, final boolean result) throws IOException {
-    return result;
-  }
-
-  @Override
-  public Result preAppend(final ObserverContext<RegionCoprocessorEnvironment> e,
-      final Append append) throws IOException {
-    return null;
-  }
-
-  @Override
-  public Result preAppendAfterRowLock(final ObserverContext<RegionCoprocessorEnvironment> e,
-      final Append append) throws IOException {
-    return null;
-  }
-
-  @Override
-  public Result postAppend(final ObserverContext<RegionCoprocessorEnvironment> e,
-      final Append append, final Result result) throws IOException {
-    return result;
-  }
-
-  @Override
-  public long preIncrementColumnValue(final ObserverContext<RegionCoprocessorEnvironment> e,
-      final byte [] row, final byte [] family, final byte [] qualifier,
-      final long amount, final boolean writeToWAL) throws IOException {
-    return amount;
-  }
-
-  @Override
-  public long postIncrementColumnValue(final ObserverContext<RegionCoprocessorEnvironment> e,
-      final byte [] row, final byte [] family, final byte [] qualifier,
-      final long amount, final boolean writeToWAL, long result)
-      throws IOException {
-    return result;
-  }
-
-  @Override
-  public Result preIncrement(final ObserverContext<RegionCoprocessorEnvironment> e,
-      final Increment increment) throws IOException {
-    return null;
-  }
-
-  @Override
-  public Result preIncrementAfterRowLock(final ObserverContext<RegionCoprocessorEnvironment> e,
-      final Increment increment) throws IOException {
-    return null;
-  }
-
-  @Override
-  public Result postIncrement(final ObserverContext<RegionCoprocessorEnvironment> e,
-      final Increment increment, final Result result) throws IOException {
-    return result;
-  }
-
-  @Override
-  public RegionScanner preScannerOpen(final ObserverContext<RegionCoprocessorEnvironment> e,
-      final Scan scan, final RegionScanner s) throws IOException {
-    return s;
-  }
-
-  @Override
-  public KeyValueScanner preStoreScannerOpen(final ObserverContext<RegionCoprocessorEnvironment> c,
-      final Store store, final Scan scan, final NavigableSet<byte[]> targetCols,
-      final KeyValueScanner s) throws IOException {
-    return s;
-  }
-
-  @Override
-  public KeyValueScanner preStoreScannerOpen(final ObserverContext<RegionCoprocessorEnvironment> c,
-      final Store store, final Scan scan, final NavigableSet<byte[]> targetCols,
-      final KeyValueScanner s, final long readPt) throws IOException {
-    return preStoreScannerOpen(c, store, scan, targetCols, s);
-  }
-
-  @Override
-  public RegionScanner postScannerOpen(final ObserverContext<RegionCoprocessorEnvironment> e,
-      final Scan scan, final RegionScanner s) throws IOException {
-    return s;
-  }
-
-  @Override
-  public boolean preScannerNext(final ObserverContext<RegionCoprocessorEnvironment> e,
-      final InternalScanner s, final List<Result> results,
-      final int limit, final boolean hasMore) throws IOException {
-    return hasMore;
-  }
-
-  @Override
-  public boolean postScannerNext(final ObserverContext<RegionCoprocessorEnvironment> e,
-      final InternalScanner s, final List<Result> results, final int limit,
-      final boolean hasMore) throws IOException {
-    return hasMore;
-  }
-
-  @Override
-  @Deprecated
-  public boolean postScannerFilterRow(final ObserverContext<RegionCoprocessorEnvironment> e,
-      final InternalScanner s, final byte[] currentRow, final int offset, final short length,
-      final boolean hasMore) throws IOException {
-    return hasMore;
-  }
-
-  @Override
-  public boolean postScannerFilterRow(final ObserverContext<RegionCoprocessorEnvironment> e,
-      final InternalScanner s, final Cell curRowCell, final boolean hasMore) throws IOException {
-    return postScannerFilterRow(e, s, curRowCell.getRowArray(), curRowCell.getRowOffset(),
-        curRowCell.getRowLength(), hasMore);
-  }
-
-  @Override
-  public void preScannerClose(final ObserverContext<RegionCoprocessorEnvironment> e,
-      final InternalScanner s) throws IOException {
-  }
-
-  @Override
-  public void postScannerClose(final ObserverContext<RegionCoprocessorEnvironment> e,
-      final InternalScanner s) throws IOException {
-  }
-
-  @Override
-  public void preReplayWALs(ObserverContext<? extends RegionCoprocessorEnvironment> env,
-      HRegionInfo info, Path edits) throws IOException {
-  }
-
-  @Override
-  public void postReplayWALs(ObserverContext<? extends RegionCoprocessorEnvironment> env,
-      HRegionInfo info, Path edits) throws IOException {
-  }
-
-  /**
-   * Implementers should override this version of the method and leave the deprecated one as-is.
-   */
-  @Override
-  public void preWALRestore(ObserverContext<? extends RegionCoprocessorEnvironment> env,
-      HRegionInfo info, WALKey logKey, WALEdit logEdit) throws IOException {
-  }
-
-  /**
-   * Implementers should override this version of the method and leave the deprecated one as-is.
-   */
-  @Override
-  public void postWALRestore(ObserverContext<? extends RegionCoprocessorEnvironment> env,
-      HRegionInfo info, WALKey logKey, WALEdit logEdit) throws IOException {
-  }
-
-  @Override
-  public void preBulkLoadHFile(final ObserverContext<RegionCoprocessorEnvironment> ctx,
-    List<Pair<byte[], String>> familyPaths) throws IOException {
-  }
-
-  @Override
-  public void preCommitStoreFile(final ObserverContext<RegionCoprocessorEnvironment> ctx,
-      final byte[] family, final List<Pair<Path, Path>> pairs) throws IOException {
-  }
-
-  @Override
-  public void postCommitStoreFile(final ObserverContext<RegionCoprocessorEnvironment> ctx,
-      final byte[] family, Path srcPath, Path dstPath) throws IOException {
-  }
-
-  @Override
-  public boolean postBulkLoadHFile(ObserverContext<RegionCoprocessorEnvironment> ctx,
-    List<Pair<byte[], String>> stagingFamilyPaths, Map<byte[], List<Path>> finalPaths,
-    boolean hasLoaded) throws IOException {
-    return postBulkLoadHFile(ctx, stagingFamilyPaths, hasLoaded);
-  }
-
-  @Override
-  public boolean postBulkLoadHFile(ObserverContext<RegionCoprocessorEnvironment> ctx,
-    List<Pair<byte[], String>> stagingFamilyPaths, boolean hasLoaded) throws IOException {
-    return hasLoaded;
-  }
-
-  @Override
-  public StoreFileReader preStoreFileReaderOpen(ObserverContext<RegionCoprocessorEnvironment> ctx,
-      FileSystem fs, Path p, FSDataInputStreamWrapper in, long size, CacheConfig cacheConf,
-      Reference r, StoreFileReader reader) throws IOException {
-    return reader;
-  }
-
-  @Override
-  public StoreFileReader postStoreFileReaderOpen(ObserverContext<RegionCoprocessorEnvironment> ctx,
-      FileSystem fs, Path p, FSDataInputStreamWrapper in, long size, CacheConfig cacheConf,
-      Reference r, StoreFileReader reader) throws IOException {
-    return reader;
-  }
-
-  @Override
-  public Cell postMutationBeforeWAL(ObserverContext<RegionCoprocessorEnvironment> ctx,
-      MutationType opType, Mutation mutation, Cell oldCell, Cell newCell) throws IOException {
-    return newCell;
-  }
-
-  @Override
-  public void postStartRegionOperation(final ObserverContext<RegionCoprocessorEnvironment> ctx,
-      Operation op) throws IOException {
-  }
-
-  @Override
-  public void postCloseRegionOperation(final ObserverContext<RegionCoprocessorEnvironment> ctx,
-      Operation op) throws IOException {
-  }
-
-  @Override
-  public DeleteTracker postInstantiateDeleteTracker(
-      final ObserverContext<RegionCoprocessorEnvironment> ctx, DeleteTracker delTracker)
-      throws IOException {
-    return delTracker;
-  }
-}

http://git-wip-us.apache.org/repos/asf/hbase/blob/f444b3b5/hbase-server/src/main/java/org/apache/hadoop/hbase/coprocessor/BaseRegionServerObserver.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/coprocessor/BaseRegionServerObserver.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/coprocessor/BaseRegionServerObserver.java
deleted file mode 100644
index 7308d6b..0000000
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/coprocessor/BaseRegionServerObserver.java
+++ /dev/null
@@ -1,99 +0,0 @@
-/*
- * 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 java.io.IOException;
-import java.util.List;
-
-import org.apache.hadoop.hbase.classification.InterfaceAudience;
-import org.apache.hadoop.hbase.classification.InterfaceStability;
-import org.apache.hadoop.hbase.CellScanner;
-import org.apache.hadoop.hbase.CoprocessorEnvironment;
-import org.apache.hadoop.hbase.HBaseInterfaceAudience;
-import org.apache.hadoop.hbase.client.Mutation;
-import org.apache.hadoop.hbase.shaded.protobuf.generated.AdminProtos.WALEntry;
-import org.apache.hadoop.hbase.regionserver.Region;
-import org.apache.hadoop.hbase.replication.ReplicationEndpoint;
-
-/**
- * An abstract class that implements RegionServerObserver.
- * By extending it, you can create your own region server observer without
- * overriding all abstract methods of RegionServerObserver.
- */
-@InterfaceAudience.LimitedPrivate(HBaseInterfaceAudience.COPROC)
-@InterfaceStability.Evolving
-public class BaseRegionServerObserver implements RegionServerObserver {
-
-  @Override
-  public void preStopRegionServer(ObserverContext<RegionServerCoprocessorEnvironment> env)
-      throws IOException { }
-
-  @Override
-  public void start(CoprocessorEnvironment env) throws IOException { }
-
-  @Override
-  public void stop(CoprocessorEnvironment env) throws IOException { }
-
-  @Override
-  public void preMerge(ObserverContext<RegionServerCoprocessorEnvironment> ctx, Region regionA,
-      Region regionB) throws IOException { }
-
-  @Override
-  public void postMerge(ObserverContext<RegionServerCoprocessorEnvironment> c, Region regionA,
-      Region regionB, Region mergedRegion) throws IOException { }
-
-  @Override
-  public void preMergeCommit(ObserverContext<RegionServerCoprocessorEnvironment> ctx,
-      Region regionA, Region regionB, List<Mutation> metaEntries) throws IOException { }
-
-  @Override
-  public void postMergeCommit(ObserverContext<RegionServerCoprocessorEnvironment> ctx,
-      Region regionA, Region regionB, Region mergedRegion) throws IOException { }
-
-  @Override
-  public void preRollBackMerge(ObserverContext<RegionServerCoprocessorEnvironment> ctx,
-      Region regionA, Region regionB) throws IOException { }
-
-  @Override
-  public void postRollBackMerge(ObserverContext<RegionServerCoprocessorEnvironment> ctx,
-      Region regionA, Region regionB) throws IOException { }
-
-  @Override
-  public void preRollWALWriterRequest(ObserverContext<RegionServerCoprocessorEnvironment> ctx)
-      throws IOException { }
-
-  @Override
-  public void postRollWALWriterRequest(ObserverContext<RegionServerCoprocessorEnvironment> ctx)
-      throws IOException { }
-
-  @Override
-  public ReplicationEndpoint postCreateReplicationEndPoint(
-      ObserverContext<RegionServerCoprocessorEnvironment> ctx, ReplicationEndpoint endpoint) {
-    return endpoint;
-  }
-
-  @Override
-  public void preReplicateLogEntries(ObserverContext<RegionServerCoprocessorEnvironment> ctx,
-      List<WALEntry> entries, CellScanner cells) throws IOException { }
-
-  @Override
-  public void postReplicateLogEntries(ObserverContext<RegionServerCoprocessorEnvironment> ctx,
-      List<WALEntry> entries, CellScanner cells) throws IOException { }
-}

http://git-wip-us.apache.org/repos/asf/hbase/blob/f444b3b5/hbase-server/src/main/java/org/apache/hadoop/hbase/coprocessor/BaseWALObserver.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/coprocessor/BaseWALObserver.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/coprocessor/BaseWALObserver.java
deleted file mode 100644
index 8507db7..0000000
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/coprocessor/BaseWALObserver.java
+++ /dev/null
@@ -1,69 +0,0 @@
-/**
- * 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 java.io.IOException;
-
-import org.apache.hadoop.fs.Path;
-import org.apache.hadoop.hbase.CoprocessorEnvironment;
-import org.apache.hadoop.hbase.HBaseInterfaceAudience;
-import org.apache.hadoop.hbase.HRegionInfo;
-import org.apache.hadoop.hbase.classification.InterfaceAudience;
-import org.apache.hadoop.hbase.classification.InterfaceStability;
-import org.apache.hadoop.hbase.regionserver.wal.WALEdit;
-import org.apache.hadoop.hbase.wal.WALKey;
-
-/**
- * An abstract class that implements WALObserver.
- * By extending it, you can create your own WAL observer without
- * overriding all abstract methods of WALObserver.
- */
-@InterfaceAudience.LimitedPrivate(HBaseInterfaceAudience.COPROC)
-@InterfaceStability.Evolving
-public class BaseWALObserver implements WALObserver {
-  @Override
-  public void start(CoprocessorEnvironment e) throws IOException { }
-
-  @Override
-  public void stop(CoprocessorEnvironment e) throws IOException { }
-
-  /**
-   * Implementers should override this method and leave the deprecated version as-is.
-   */
-  @Override
-  public boolean preWALWrite(ObserverContext<? extends WALCoprocessorEnvironment> ctx,
-      HRegionInfo info, WALKey logKey, WALEdit logEdit) throws IOException {
-    return false;
-  }
-
-  /**
-   * Implementers should override this method and leave the deprecated version as-is.
-   */
-  @Override
-  public void postWALWrite(ObserverContext<? extends WALCoprocessorEnvironment> ctx,
-      HRegionInfo info, WALKey logKey, WALEdit logEdit) throws IOException {}
-
-  @Override
-  public void preWALRoll(ObserverContext<? extends WALCoprocessorEnvironment> ctx,
-      Path oldPath, Path newPath) throws IOException { }
-
-  @Override
-  public void postWALRoll(ObserverContext<? extends WALCoprocessorEnvironment> ctx,
-      Path oldPath, Path newPath) throws IOException { }
-}

http://git-wip-us.apache.org/repos/asf/hbase/blob/f444b3b5/hbase-server/src/main/java/org/apache/hadoop/hbase/coprocessor/BulkLoadObserver.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/coprocessor/BulkLoadObserver.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/coprocessor/BulkLoadObserver.java
index 20910be..5e84cca 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/coprocessor/BulkLoadObserver.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/coprocessor/BulkLoadObserver.java
@@ -30,6 +30,21 @@ import org.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos.CleanupBul
 
 /**
  * Coprocessors implement this interface to observe and mediate bulk load operations.
+ * <br><br>
+ *
+ * <h3>Exception Handling</h3>
+ * For all functions, exception handling is done as follows:
+ * <ul>
+ *   <li>Exceptions of type {@link IOException} are reported back to client.</li>
+ *   <li>For any other kind of exception:
+ *     <ul>
+ *       <li>If the configuration {@link CoprocessorHost#ABORT_ON_ERROR_KEY} is set to true, then
+ *         the server aborts.</li>
+ *       <li>Otherwise, coprocessor is removed from the server and
+ *         {@link org.apache.hadoop.hbase.DoNotRetryIOException} is returned to the client.</li>
+ *     </ul>
+ *   </li>
+ * </ul>
  */
 @InterfaceAudience.LimitedPrivate(HBaseInterfaceAudience.COPROC)
 @InterfaceStability.Evolving
@@ -38,17 +53,15 @@ public interface BulkLoadObserver extends Coprocessor {
       * Called as part of SecureBulkLoadEndpoint.prepareBulkLoad() RPC call.
       * It can't bypass the default action, e.g., ctx.bypass() won't have effect.
       * @param ctx the environment to interact with the framework and master
-      * @throws IOException
       */
-    void prePrepareBulkLoad(ObserverContext<RegionCoprocessorEnvironment> ctx,
-                            PrepareBulkLoadRequest request) throws IOException;
+    default void prePrepareBulkLoad(ObserverContext<RegionCoprocessorEnvironment> ctx,
+        PrepareBulkLoadRequest request) throws IOException {}
 
     /**
       * Called as part of SecureBulkLoadEndpoint.cleanupBulkLoad() RPC call.
       * It can't bypass the default action, e.g., ctx.bypass() won't have effect.
       * @param ctx the environment to interact with the framework and master
-      * @throws IOException
       */
-    void preCleanupBulkLoad(ObserverContext<RegionCoprocessorEnvironment> ctx,
-                            CleanupBulkLoadRequest request) throws IOException;
+    default void preCleanupBulkLoad(ObserverContext<RegionCoprocessorEnvironment> ctx,
+      CleanupBulkLoadRequest request) throws IOException {}
 }

http://git-wip-us.apache.org/repos/asf/hbase/blob/f444b3b5/hbase-server/src/main/java/org/apache/hadoop/hbase/coprocessor/CoprocessorHost.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/coprocessor/CoprocessorHost.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/coprocessor/CoprocessorHost.java
index 993fa16..1d58bf9 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/coprocessor/CoprocessorHost.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/coprocessor/CoprocessorHost.java
@@ -45,7 +45,6 @@ import org.apache.hadoop.hbase.DoNotRetryIOException;
 import org.apache.hadoop.hbase.HBaseInterfaceAudience;
 import org.apache.hadoop.hbase.HConstants;
 import org.apache.hadoop.hbase.TableName;
-import org.apache.hadoop.hbase.client.HTable;
 import org.apache.hadoop.hbase.client.HTableWrapper;
 import org.apache.hadoop.hbase.client.Table;
 import org.apache.hadoop.hbase.util.CoprocessorClassLoader;
@@ -584,6 +583,10 @@ public abstract class CoprocessorHost<E extends CoprocessorEnvironment> {
    * @param e Throwable object thrown by coprocessor.
    * @exception IOException Exception
    */
+  // Note to devs: Class comments of all observers ({@link MasterObserver}, {@link WALObserver},
+  // etc) mention this nuance of our exception handling so that coprocessor can throw appropriate
+  // exceptions depending on situation. If any changes are made to this logic, make sure to
+  // update all classes' comments.
   protected void handleCoprocessorThrowable(final CoprocessorEnvironment env, final Throwable e)
       throws IOException {
     if (e instanceof IOException) {

http://git-wip-us.apache.org/repos/asf/hbase/blob/f444b3b5/hbase-server/src/main/java/org/apache/hadoop/hbase/coprocessor/EndpointObserver.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/coprocessor/EndpointObserver.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/coprocessor/EndpointObserver.java
index 1076437..0646e13 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/coprocessor/EndpointObserver.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/coprocessor/EndpointObserver.java
@@ -32,6 +32,21 @@ import com.google.protobuf.Service;
 /**
  * Coprocessors implement this interface to observe and mediate endpoint invocations
  * on a region.
+ * <br><br>
+ *
+ * <h3>Exception Handling</h3>
+ * For all functions, exception handling is done as follows:
+ * <ul>
+ *   <li>Exceptions of type {@link IOException} are reported back to client.</li>
+ *   <li>For any other kind of exception:
+ *     <ul>
+ *       <li>If the configuration {@link CoprocessorHost#ABORT_ON_ERROR_KEY} is set to true, then
+ *         the server aborts.</li>
+ *       <li>Otherwise, coprocessor is removed from the server and
+ *         {@link org.apache.hadoop.hbase.DoNotRetryIOException} is returned to the client.</li>
+ *     </ul>
+ *   </li>
+ * </ul>
  */
 @InterfaceAudience.LimitedPrivate(HBaseInterfaceAudience.COPROC)
 @InterfaceStability.Evolving
@@ -45,13 +60,15 @@ public interface EndpointObserver extends Coprocessor {
    * effect in this hook.
    * @param ctx the environment provided by the region server
    * @param service the endpoint service
+   * @param request  Request message expected by given {@code Service}'s method (by the name
+   *   {@code methodName}).
    * @param methodName the invoked service method
-   * @param request the request message
    * @return the possibly modified message
-   * @throws IOException
    */
-  Message preEndpointInvocation(ObserverContext<RegionCoprocessorEnvironment> ctx, Service service,
-      String methodName, Message request) throws IOException;
+  default Message preEndpointInvocation(ObserverContext<RegionCoprocessorEnvironment> ctx,
+      Service service, String methodName, Message request) throws IOException {
+    return request;
+  }
 
   /**
    * Called after an Endpoint service method is invoked. The response message can be
@@ -59,11 +76,12 @@ public interface EndpointObserver extends Coprocessor {
    * @param ctx the environment provided by the region server
    * @param service the endpoint service
    * @param methodName the invoked service method
-   * @param request the request message
-   * @param responseBuilder the response message builder
-   * @throws IOException
+   * @param request  Request message expected by given {@code Service}'s method (by the name
+   *   {@code methodName}).
+   * @param responseBuilder Builder for final response to the client, with original response from
+   *   Service's method merged into it.
    */
-  void postEndpointInvocation(ObserverContext<RegionCoprocessorEnvironment> ctx, Service service,
-      String methodName, Message request, Message.Builder responseBuilder) throws IOException;
-
+  default void postEndpointInvocation(ObserverContext<RegionCoprocessorEnvironment> ctx,
+      Service service, String methodName, Message request, Message.Builder responseBuilder)
+      throws IOException {}
 }


Mime
View raw message