HBASE-11757 Provide a common base abstract class for both RegionObserver and MasterObserver

This commit is contained in:
Matteo Bertozzi 2014-08-18 20:14:25 +01:00
parent c1c5c88792
commit c45a8832d2
3 changed files with 442 additions and 506 deletions

View File

@ -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 {
}
}

View File

@ -61,7 +61,7 @@ import org.apache.hadoop.hbase.client.Put;
import org.apache.hadoop.hbase.client.Query; import org.apache.hadoop.hbase.client.Query;
import org.apache.hadoop.hbase.client.Result; import org.apache.hadoop.hbase.client.Result;
import org.apache.hadoop.hbase.client.Scan; 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.CoprocessorException;
import org.apache.hadoop.hbase.coprocessor.CoprocessorService; import org.apache.hadoop.hbase.coprocessor.CoprocessorService;
import org.apache.hadoop.hbase.coprocessor.EndpointObserver; 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.io.hfile.HFile;
import org.apache.hadoop.hbase.ipc.RequestContext; import org.apache.hadoop.hbase.ipc.RequestContext;
import org.apache.hadoop.hbase.master.MasterServices; 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.ProtobufUtil;
import org.apache.hadoop.hbase.protobuf.ResponseConverter; import org.apache.hadoop.hbase.protobuf.ResponseConverter;
import org.apache.hadoop.hbase.protobuf.generated.AccessControlProtos; import org.apache.hadoop.hbase.protobuf.generated.AccessControlProtos;
@ -146,8 +145,8 @@ import com.google.protobuf.Service;
* </p> * </p>
*/ */
@InterfaceAudience.Private @InterfaceAudience.Private
public class AccessController extends BaseRegionObserver public class AccessController extends BaseMasterAndRegionObserver
implements MasterObserver, RegionServerObserver, implements RegionServerObserver,
AccessControlService.Interface, CoprocessorService, EndpointObserver { AccessControlService.Interface, CoprocessorService, EndpointObserver {
public static final Log LOG = LogFactory.getLog(AccessController.class); public static final Log LOG = LogFactory.getLog(AccessController.class);
@ -876,14 +875,6 @@ public class AccessController extends BaseRegionObserver
requireGlobalPermission("createTable", Action.CREATE, desc.getTableName(), familyMap); requireGlobalPermission("createTable", Action.CREATE, desc.getTableName(), familyMap);
} }
@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 @Override
public void postCreateTableHandler(ObserverContext<MasterCoprocessorEnvironment> c, public void postCreateTableHandler(ObserverContext<MasterCoprocessorEnvironment> c,
HTableDescriptor desc, HRegionInfo[] regions) throws IOException { HTableDescriptor desc, HRegionInfo[] regions) throws IOException {
@ -927,10 +918,6 @@ public class AccessController extends BaseRegionObserver
requirePermission("deleteTable", tableName, null, null, Action.ADMIN, Action.CREATE); requirePermission("deleteTable", tableName, null, null, Action.ADMIN, Action.CREATE);
} }
@Override
public void preDeleteTableHandler(ObserverContext<MasterCoprocessorEnvironment> c,
TableName tableName) throws IOException {}
@Override @Override
public void postDeleteTable(ObserverContext<MasterCoprocessorEnvironment> c, public void postDeleteTable(ObserverContext<MasterCoprocessorEnvironment> c,
TableName tableName) throws IOException { TableName tableName) throws IOException {
@ -938,24 +925,10 @@ public class AccessController extends BaseRegionObserver
} }
@Override @Override
public void postDeleteTableHandler(ObserverContext<MasterCoprocessorEnvironment> c,
TableName tableName) throws IOException {}
@Override
public void preTruncateTable(ObserverContext<MasterCoprocessorEnvironment> c, TableName tableName) public void preTruncateTable(ObserverContext<MasterCoprocessorEnvironment> c, TableName tableName)
throws IOException { throws IOException {
requirePermission("truncateTable", tableName, null, null, Action.ADMIN, Action.CREATE); 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 @Override
public void preModifyTable(ObserverContext<MasterCoprocessorEnvironment> c, TableName tableName, public void preModifyTable(ObserverContext<MasterCoprocessorEnvironment> c, TableName tableName,
@ -963,10 +936,6 @@ public class AccessController extends BaseRegionObserver
requirePermission("modifyTable", tableName, null, null, Action.ADMIN, Action.CREATE); requirePermission("modifyTable", tableName, null, null, Action.ADMIN, Action.CREATE);
} }
@Override
public void preModifyTableHandler(ObserverContext<MasterCoprocessorEnvironment> c,
TableName tableName, HTableDescriptor htd) throws IOException {}
@Override @Override
public void postModifyTable(ObserverContext<MasterCoprocessorEnvironment> c, public void postModifyTable(ObserverContext<MasterCoprocessorEnvironment> c,
TableName tableName, HTableDescriptor htd) throws IOException { TableName tableName, HTableDescriptor htd) throws IOException {
@ -978,85 +947,36 @@ public class AccessController extends BaseRegionObserver
AccessControlLists.addUserPermission(c.getEnvironment().getConfiguration(), userperm); AccessControlLists.addUserPermission(c.getEnvironment().getConfiguration(), userperm);
} }
@Override
public void postModifyTableHandler(ObserverContext<MasterCoprocessorEnvironment> c,
TableName tableName, HTableDescriptor htd) throws IOException {}
@Override @Override
public void preAddColumn(ObserverContext<MasterCoprocessorEnvironment> c, TableName tableName, public void preAddColumn(ObserverContext<MasterCoprocessorEnvironment> c, TableName tableName,
HColumnDescriptor column) throws IOException { HColumnDescriptor column) throws IOException {
requirePermission("addColumn", tableName, null, null, Action.ADMIN, Action.CREATE); 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 @Override
public void preModifyColumn(ObserverContext<MasterCoprocessorEnvironment> c, TableName tableName, public void preModifyColumn(ObserverContext<MasterCoprocessorEnvironment> c, TableName tableName,
HColumnDescriptor descriptor) throws IOException { HColumnDescriptor descriptor) throws IOException {
requirePermission("modifyColumn", tableName, null, null, Action.ADMIN, Action.CREATE); 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 @Override
public void preDeleteColumn(ObserverContext<MasterCoprocessorEnvironment> c, TableName tableName, public void preDeleteColumn(ObserverContext<MasterCoprocessorEnvironment> c, TableName tableName,
byte[] col) throws IOException { byte[] col) throws IOException {
requirePermission("deleteColumn", tableName, null, null, Action.ADMIN, Action.CREATE); requirePermission("deleteColumn", tableName, null, null, Action.ADMIN, Action.CREATE);
} }
@Override
public void preDeleteColumnHandler(ObserverContext<MasterCoprocessorEnvironment> c,
TableName tableName, byte[] col) throws IOException {}
@Override @Override
public void postDeleteColumn(ObserverContext<MasterCoprocessorEnvironment> c, public void postDeleteColumn(ObserverContext<MasterCoprocessorEnvironment> c,
TableName tableName, byte[] col) throws IOException { TableName tableName, byte[] col) throws IOException {
AccessControlLists.removeTablePermissions(c.getEnvironment().getConfiguration(), tableName, col); AccessControlLists.removeTablePermissions(c.getEnvironment().getConfiguration(), tableName, col);
} }
@Override
public void postDeleteColumnHandler(ObserverContext<MasterCoprocessorEnvironment> c,
TableName tableName, byte[] col) throws IOException {}
@Override @Override
public void preEnableTable(ObserverContext<MasterCoprocessorEnvironment> c, TableName tableName) public void preEnableTable(ObserverContext<MasterCoprocessorEnvironment> c, TableName tableName)
throws IOException { throws IOException {
requirePermission("enableTable", tableName, null, null, Action.ADMIN, Action.CREATE); 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 @Override
public void preDisableTable(ObserverContext<MasterCoprocessorEnvironment> c, TableName tableName) public void preDisableTable(ObserverContext<MasterCoprocessorEnvironment> c, TableName tableName)
throws IOException { throws IOException {
@ -1067,70 +987,36 @@ public class AccessController extends BaseRegionObserver
requirePermission("disableTable", tableName, null, null, Action.ADMIN, Action.CREATE); requirePermission("disableTable", tableName, null, null, Action.ADMIN, Action.CREATE);
} }
@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 @Override
public void preMove(ObserverContext<MasterCoprocessorEnvironment> c, HRegionInfo region, public void preMove(ObserverContext<MasterCoprocessorEnvironment> c, HRegionInfo region,
ServerName srcServer, ServerName destServer) throws IOException { ServerName srcServer, ServerName destServer) throws IOException {
requirePermission("move", region.getTable(), null, null, Action.ADMIN); requirePermission("move", region.getTable(), null, null, Action.ADMIN);
} }
@Override
public void postMove(ObserverContext<MasterCoprocessorEnvironment> c,
HRegionInfo region, ServerName srcServer, ServerName destServer)
throws IOException {}
@Override @Override
public void preAssign(ObserverContext<MasterCoprocessorEnvironment> c, HRegionInfo regionInfo) public void preAssign(ObserverContext<MasterCoprocessorEnvironment> c, HRegionInfo regionInfo)
throws IOException { throws IOException {
requirePermission("assign", regionInfo.getTable(), null, null, Action.ADMIN); requirePermission("assign", regionInfo.getTable(), null, null, Action.ADMIN);
} }
@Override
public void postAssign(ObserverContext<MasterCoprocessorEnvironment> c,
HRegionInfo regionInfo) throws IOException {}
@Override @Override
public void preUnassign(ObserverContext<MasterCoprocessorEnvironment> c, HRegionInfo regionInfo, public void preUnassign(ObserverContext<MasterCoprocessorEnvironment> c, HRegionInfo regionInfo,
boolean force) throws IOException { boolean force) throws IOException {
requirePermission("unassign", regionInfo.getTable(), null, null, Action.ADMIN); requirePermission("unassign", regionInfo.getTable(), null, null, Action.ADMIN);
} }
@Override
public void postUnassign(ObserverContext<MasterCoprocessorEnvironment> c,
HRegionInfo regionInfo, boolean force) throws IOException {}
@Override @Override
public void preRegionOffline(ObserverContext<MasterCoprocessorEnvironment> c, public void preRegionOffline(ObserverContext<MasterCoprocessorEnvironment> c,
HRegionInfo regionInfo) throws IOException { HRegionInfo regionInfo) throws IOException {
requirePermission("regionOffline", regionInfo.getTable(), null, null, Action.ADMIN); requirePermission("regionOffline", regionInfo.getTable(), null, null, Action.ADMIN);
} }
@Override
public void postRegionOffline(ObserverContext<MasterCoprocessorEnvironment> c,
HRegionInfo regionInfo) throws IOException {
}
@Override @Override
public void preBalance(ObserverContext<MasterCoprocessorEnvironment> c) public void preBalance(ObserverContext<MasterCoprocessorEnvironment> c)
throws IOException { throws IOException {
requirePermission("balance", Action.ADMIN); requirePermission("balance", Action.ADMIN);
} }
@Override
public void postBalance(ObserverContext<MasterCoprocessorEnvironment> c, List<RegionPlan> plans)
throws IOException {}
@Override @Override
public boolean preBalanceSwitch(ObserverContext<MasterCoprocessorEnvironment> c, public boolean preBalanceSwitch(ObserverContext<MasterCoprocessorEnvironment> c,
boolean newValue) throws IOException { boolean newValue) throws IOException {
@ -1138,10 +1024,6 @@ public class AccessController extends BaseRegionObserver
return newValue; return newValue;
} }
@Override
public void postBalanceSwitch(ObserverContext<MasterCoprocessorEnvironment> c,
boolean oldValue, boolean newValue) throws IOException {}
@Override @Override
public void preShutdown(ObserverContext<MasterCoprocessorEnvironment> c) public void preShutdown(ObserverContext<MasterCoprocessorEnvironment> c)
throws IOException { throws IOException {
@ -1166,11 +1048,6 @@ public class AccessController extends BaseRegionObserver
} }
} }
@Override
public void preMasterInitialization(
ObserverContext<MasterCoprocessorEnvironment> ctx) throws IOException {
}
@Override @Override
public void preSnapshot(final ObserverContext<MasterCoprocessorEnvironment> ctx, public void preSnapshot(final ObserverContext<MasterCoprocessorEnvironment> ctx,
final SnapshotDescription snapshot, final HTableDescriptor hTableDescriptor) final SnapshotDescription snapshot, final HTableDescriptor hTableDescriptor)
@ -1178,12 +1055,6 @@ public class AccessController extends BaseRegionObserver
requirePermission("snapshot", Action.ADMIN); requirePermission("snapshot", Action.ADMIN);
} }
@Override
public void postSnapshot(final ObserverContext<MasterCoprocessorEnvironment> ctx,
final SnapshotDescription snapshot, final HTableDescriptor hTableDescriptor)
throws IOException {
}
@Override @Override
public void preCloneSnapshot(final ObserverContext<MasterCoprocessorEnvironment> ctx, public void preCloneSnapshot(final ObserverContext<MasterCoprocessorEnvironment> ctx,
final SnapshotDescription snapshot, final HTableDescriptor hTableDescriptor) final SnapshotDescription snapshot, final HTableDescriptor hTableDescriptor)
@ -1191,12 +1062,6 @@ public class AccessController extends BaseRegionObserver
requirePermission("clone", Action.ADMIN); requirePermission("clone", Action.ADMIN);
} }
@Override
public void postCloneSnapshot(final ObserverContext<MasterCoprocessorEnvironment> ctx,
final SnapshotDescription snapshot, final HTableDescriptor hTableDescriptor)
throws IOException {
}
@Override @Override
public void preRestoreSnapshot(final ObserverContext<MasterCoprocessorEnvironment> ctx, public void preRestoreSnapshot(final ObserverContext<MasterCoprocessorEnvironment> ctx,
final SnapshotDescription snapshot, final HTableDescriptor hTableDescriptor) final SnapshotDescription snapshot, final HTableDescriptor hTableDescriptor)
@ -1204,34 +1069,18 @@ public class AccessController extends BaseRegionObserver
requirePermission("restore", Action.ADMIN); requirePermission("restore", Action.ADMIN);
} }
@Override
public void postRestoreSnapshot(final ObserverContext<MasterCoprocessorEnvironment> ctx,
final SnapshotDescription snapshot, final HTableDescriptor hTableDescriptor)
throws IOException {
}
@Override @Override
public void preDeleteSnapshot(final ObserverContext<MasterCoprocessorEnvironment> ctx, public void preDeleteSnapshot(final ObserverContext<MasterCoprocessorEnvironment> ctx,
final SnapshotDescription snapshot) throws IOException { final SnapshotDescription snapshot) throws IOException {
requirePermission("deleteSnapshot", Action.ADMIN); requirePermission("deleteSnapshot", Action.ADMIN);
} }
@Override
public void postDeleteSnapshot(final ObserverContext<MasterCoprocessorEnvironment> ctx,
final SnapshotDescription snapshot) throws IOException {
}
@Override @Override
public void preCreateNamespace(ObserverContext<MasterCoprocessorEnvironment> ctx, public void preCreateNamespace(ObserverContext<MasterCoprocessorEnvironment> ctx,
NamespaceDescriptor ns) throws IOException { NamespaceDescriptor ns) throws IOException {
requireGlobalPermission("createNamespace", Action.ADMIN, ns.getName()); requireGlobalPermission("createNamespace", Action.ADMIN, ns.getName());
} }
@Override
public void postCreateNamespace(ObserverContext<MasterCoprocessorEnvironment> ctx,
NamespaceDescriptor ns) throws IOException {
}
@Override @Override
public void preDeleteNamespace(ObserverContext<MasterCoprocessorEnvironment> ctx, String namespace) public void preDeleteNamespace(ObserverContext<MasterCoprocessorEnvironment> ctx, String namespace)
throws IOException { throws IOException {
@ -1252,22 +1101,12 @@ public class AccessController extends BaseRegionObserver
requireGlobalPermission("modifyNamespace", Action.ADMIN, ns.getName()); requireGlobalPermission("modifyNamespace", Action.ADMIN, ns.getName());
} }
@Override
public void postModifyNamespace(ObserverContext<MasterCoprocessorEnvironment> ctx,
NamespaceDescriptor ns) throws IOException {
}
@Override @Override
public void preTableFlush(final ObserverContext<MasterCoprocessorEnvironment> ctx, public void preTableFlush(final ObserverContext<MasterCoprocessorEnvironment> ctx,
final TableName tableName) throws IOException { final TableName tableName) throws IOException {
requirePermission("flushTable", tableName, null, null, Action.ADMIN, Action.CREATE); requirePermission("flushTable", tableName, null, null, Action.ADMIN, Action.CREATE);
} }
@Override
public void postTableFlush(final ObserverContext<MasterCoprocessorEnvironment> ctx,
final TableName tableName) throws IOException {
}
/* ---- RegionObserver implementation ---- */ /* ---- RegionObserver implementation ---- */
@Override @Override
@ -2324,11 +2163,6 @@ public class AccessController extends BaseRegionObserver
} }
} }
@Override
public void postGetTableDescriptors(ObserverContext<MasterCoprocessorEnvironment> ctx,
List<HTableDescriptor> descriptors) throws IOException {
}
@Override @Override
public void preMerge(ObserverContext<RegionServerCoprocessorEnvironment> ctx, HRegion regionA, public void preMerge(ObserverContext<RegionServerCoprocessorEnvironment> ctx, HRegion regionA,
HRegion regionB) throws IOException { HRegion regionB) throws IOException {

View File

@ -48,13 +48,10 @@ import org.apache.hadoop.hbase.CoprocessorEnvironment;
import org.apache.hadoop.hbase.DoNotRetryIOException; import org.apache.hadoop.hbase.DoNotRetryIOException;
import org.apache.hadoop.hbase.HColumnDescriptor; import org.apache.hadoop.hbase.HColumnDescriptor;
import org.apache.hadoop.hbase.HConstants; import org.apache.hadoop.hbase.HConstants;
import org.apache.hadoop.hbase.HRegionInfo;
import org.apache.hadoop.hbase.HTableDescriptor; import org.apache.hadoop.hbase.HTableDescriptor;
import org.apache.hadoop.hbase.KeyValue; import org.apache.hadoop.hbase.KeyValue;
import org.apache.hadoop.hbase.KeyValue.Type; import org.apache.hadoop.hbase.KeyValue.Type;
import org.apache.hadoop.hbase.KeyValueUtil; 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.TableName;
import org.apache.hadoop.hbase.Tag; import org.apache.hadoop.hbase.Tag;
import org.apache.hadoop.hbase.MetaTableAccessor; 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.Result;
import org.apache.hadoop.hbase.client.Scan; import org.apache.hadoop.hbase.client.Scan;
import org.apache.hadoop.hbase.constraint.ConstraintException; 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.CoprocessorException;
import org.apache.hadoop.hbase.coprocessor.CoprocessorHost; import org.apache.hadoop.hbase.coprocessor.CoprocessorHost;
import org.apache.hadoop.hbase.coprocessor.CoprocessorService; 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.io.util.StreamUtils;
import org.apache.hadoop.hbase.ipc.RequestContext; import org.apache.hadoop.hbase.ipc.RequestContext;
import org.apache.hadoop.hbase.master.MasterServices; 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.ResponseConverter;
import org.apache.hadoop.hbase.protobuf.generated.ClientProtos.RegionActionResult; 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;
import org.apache.hadoop.hbase.protobuf.generated.VisibilityLabelsProtos.GetAuthsRequest; import org.apache.hadoop.hbase.protobuf.generated.VisibilityLabelsProtos.GetAuthsRequest;
import org.apache.hadoop.hbase.protobuf.generated.VisibilityLabelsProtos.GetAuthsResponse; import org.apache.hadoop.hbase.protobuf.generated.VisibilityLabelsProtos.GetAuthsResponse;
@ -133,8 +128,8 @@ import com.google.protobuf.Service;
* visibility labels * visibility labels
*/ */
@InterfaceAudience.Private @InterfaceAudience.Private
public class VisibilityController extends BaseRegionObserver implements MasterObserver, public class VisibilityController extends BaseMasterAndRegionObserver implements
RegionObserver, VisibilityLabelsService.Interface, CoprocessorService { VisibilityLabelsService.Interface, CoprocessorService {
private static final Log LOG = LogFactory.getLog(VisibilityController.class); private static final Log LOG = LogFactory.getLog(VisibilityController.class);
private static final byte[] DUMMY_VALUE = new byte[0]; private static final byte[] DUMMY_VALUE = new byte[0];
@ -249,46 +244,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 @Override
public void preModifyTable(ObserverContext<MasterCoprocessorEnvironment> ctx, public void preModifyTable(ObserverContext<MasterCoprocessorEnvironment> ctx,
TableName tableName, HTableDescriptor htd) throws IOException { TableName tableName, HTableDescriptor htd) throws IOException {
@ -297,21 +252,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 @Override
public void preAddColumn(ObserverContext<MasterCoprocessorEnvironment> ctx, TableName tableName, public void preAddColumn(ObserverContext<MasterCoprocessorEnvironment> ctx, TableName tableName,
HColumnDescriptor column) throws IOException { HColumnDescriptor column) throws IOException {
@ -320,21 +260,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 @Override
public void preModifyColumn(ObserverContext<MasterCoprocessorEnvironment> ctx, public void preModifyColumn(ObserverContext<MasterCoprocessorEnvironment> ctx,
TableName tableName, HColumnDescriptor descriptor) throws IOException { TableName tableName, HColumnDescriptor descriptor) throws IOException {
@ -343,21 +268,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 @Override
public void preDeleteColumn(ObserverContext<MasterCoprocessorEnvironment> ctx, public void preDeleteColumn(ObserverContext<MasterCoprocessorEnvironment> ctx,
TableName tableName, byte[] c) throws IOException { TableName tableName, byte[] c) throws IOException {
@ -366,63 +276,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 @Override
public void preDisableTable(ObserverContext<MasterCoprocessorEnvironment> ctx, TableName tableName) public void preDisableTable(ObserverContext<MasterCoprocessorEnvironment> ctx, TableName tableName)
throws IOException { throws IOException {
@ -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 ******************************/ /****************************** Region related hooks ******************************/
@Override @Override