@InterfaceAudience.Private public class MasterCoprocessorHost extends CoprocessorHost<MasterCoprocessor,MasterCoprocessorEnvironment>
HMaster
interacts with the loaded coprocessors
through this class.Modifier and Type | Class and Description |
---|---|
private static class |
MasterCoprocessorHost.MasterEnvironment
Coprocessor environment extension providing access to master related
services.
|
private static class |
MasterCoprocessorHost.MasterEnvironmentForCoreCoprocessors
Special version of MasterEnvironment that exposes MasterServices for Core Coprocessors only.
|
(package private) class |
MasterCoprocessorHost.MasterObserverOperation |
CoprocessorHost.ObserverGetter<C,O>, CoprocessorHost.ObserverOperationWithoutResult<O>, CoprocessorHost.ObserverOperationWithResult<O,R>
Modifier and Type | Field and Description |
---|---|
private static org.slf4j.Logger |
LOG |
private CoprocessorHost.ObserverGetter<MasterCoprocessor,MasterObserver> |
masterObserverGetter |
private MasterServices |
masterServices |
ABORT_ON_ERROR_KEY, abortable, conf, coprocEnvironments, COPROCESSORS_ENABLED_CONF_KEY, DEFAULT_ABORT_ON_ERROR, DEFAULT_COPROCESSORS_ENABLED, DEFAULT_SKIP_LOAD_DUPLICATE_TABLE_COPROCESSOR, DEFAULT_USER_COPROCESSORS_ENABLED, loadSequence, MASTER_COPROCESSOR_CONF_KEY, pathPrefix, REGION_COPROCESSOR_CONF_KEY, REGIONSERVER_COPROCESSOR_CONF_KEY, SKIP_LOAD_DUPLICATE_TABLE_COPROCESSOR, USER_COPROCESSORS_ENABLED_CONF_KEY, USER_REGION_COPROCESSOR_CONF_KEY, WAL_COPROCESSOR_CONF_KEY
Constructor and Description |
---|
MasterCoprocessorHost(MasterServices services,
org.apache.hadoop.conf.Configuration conf) |
abortServer, abortServer, checkAndLoadInstance, execOperation, execOperationWithResult, execShutdown, findCoprocessor, findCoprocessor, findCoprocessorEnvironment, findCoprocessors, getCoprocessors, getLoadedCoprocessors, handleCoprocessorThrowable, load, load, load, loadSystemCoprocessors, shutdown
private static final org.slf4j.Logger LOG
private MasterServices masterServices
private CoprocessorHost.ObserverGetter<MasterCoprocessor,MasterObserver> masterObserverGetter
public MasterCoprocessorHost(MasterServices services, org.apache.hadoop.conf.Configuration conf)
public MasterCoprocessorHost.MasterEnvironment createEnvironment(MasterCoprocessor instance, int priority, int seq, org.apache.hadoop.conf.Configuration conf)
CoprocessorHost
createEnvironment
in class CoprocessorHost<MasterCoprocessor,MasterCoprocessorEnvironment>
public MasterCoprocessor checkAndGetInstance(Class<?> implClass) throws InstantiationException, IllegalAccessException
CoprocessorHost
checkAndGetInstance
in class CoprocessorHost<MasterCoprocessor,MasterCoprocessorEnvironment>
InstantiationException
IllegalAccessException
public void preCreateNamespace(NamespaceDescriptor ns) throws IOException
IOException
public void postCreateNamespace(NamespaceDescriptor ns) throws IOException
IOException
public void preDeleteNamespace(String namespaceName) throws IOException
IOException
public void postDeleteNamespace(String namespaceName) throws IOException
IOException
public void preModifyNamespace(NamespaceDescriptor currentNsDescriptor, NamespaceDescriptor newNsDescriptor) throws IOException
IOException
public void postModifyNamespace(NamespaceDescriptor oldNsDescriptor, NamespaceDescriptor currentNsDescriptor) throws IOException
IOException
public void preGetNamespaceDescriptor(String namespaceName) throws IOException
IOException
public void postGetNamespaceDescriptor(NamespaceDescriptor ns) throws IOException
IOException
public void preListNamespaceDescriptors(List<NamespaceDescriptor> descriptors) throws IOException
IOException
public void postListNamespaceDescriptors(List<NamespaceDescriptor> descriptors) throws IOException
IOException
public TableDescriptor preCreateTableRegionsInfos(TableDescriptor desc) throws IOException
IOException
public void preCreateTable(TableDescriptor htd, RegionInfo[] regions) throws IOException
IOException
public void postCreateTable(TableDescriptor htd, RegionInfo[] regions) throws IOException
IOException
public void preCreateTableAction(TableDescriptor htd, RegionInfo[] regions, User user) throws IOException
IOException
public void postCompletedCreateTableAction(TableDescriptor htd, RegionInfo[] regions, User user) throws IOException
IOException
public void preDeleteTable(TableName tableName) throws IOException
IOException
public void postDeleteTable(TableName tableName) throws IOException
IOException
public void preDeleteTableAction(TableName tableName, User user) throws IOException
IOException
public void postCompletedDeleteTableAction(TableName tableName, User user) throws IOException
IOException
public void preTruncateTable(TableName tableName) throws IOException
IOException
public void postTruncateTable(TableName tableName) throws IOException
IOException
public void preTruncateTableAction(TableName tableName, User user) throws IOException
IOException
public void postCompletedTruncateTableAction(TableName tableName, User user) throws IOException
IOException
public TableDescriptor preModifyTable(TableName tableName, TableDescriptor currentDescriptor, TableDescriptor newDescriptor) throws IOException
IOException
public void postModifyTable(TableName tableName, TableDescriptor oldDescriptor, TableDescriptor currentDescriptor) throws IOException
IOException
public void preModifyTableAction(TableName tableName, TableDescriptor currentDescriptor, TableDescriptor newDescriptor, User user) throws IOException
IOException
public void postCompletedModifyTableAction(TableName tableName, TableDescriptor oldDescriptor, TableDescriptor currentDescriptor, User user) throws IOException
IOException
public void preEnableTable(TableName tableName) throws IOException
IOException
public void postEnableTable(TableName tableName) throws IOException
IOException
public void preEnableTableAction(TableName tableName, User user) throws IOException
IOException
public void postCompletedEnableTableAction(TableName tableName, User user) throws IOException
IOException
public void preDisableTable(TableName tableName) throws IOException
IOException
public void postDisableTable(TableName tableName) throws IOException
IOException
public void preDisableTableAction(TableName tableName, User user) throws IOException
IOException
public void postCompletedDisableTableAction(TableName tableName, User user) throws IOException
IOException
public void preAbortProcedure(ProcedureExecutor<MasterProcedureEnv> procEnv, long procId) throws IOException
IOException
public void postAbortProcedure() throws IOException
IOException
public void preGetProcedures() throws IOException
IOException
public void postGetProcedures(List<Procedure<?>> procInfoList) throws IOException
IOException
public void preGetLocks() throws IOException
IOException
public void postGetLocks(List<LockedResource> lockedResources) throws IOException
IOException
public void preMove(RegionInfo region, ServerName srcServer, ServerName destServer) throws IOException
IOException
public void postMove(RegionInfo region, ServerName srcServer, ServerName destServer) throws IOException
IOException
public void preAssign(RegionInfo regionInfo) throws IOException
IOException
public void postAssign(RegionInfo regionInfo) throws IOException
IOException
public void preUnassign(RegionInfo regionInfo, boolean force) throws IOException
IOException
public void postUnassign(RegionInfo regionInfo, boolean force) throws IOException
IOException
public void preRegionOffline(RegionInfo regionInfo) throws IOException
IOException
public void postRegionOffline(RegionInfo regionInfo) throws IOException
IOException
public void preMergeRegions(RegionInfo[] regionsToMerge) throws IOException
IOException
public void postMergeRegions(RegionInfo[] regionsToMerge) throws IOException
IOException
public boolean preBalance() throws IOException
IOException
public void postBalance(List<RegionPlan> plans) throws IOException
IOException
public void preSetSplitOrMergeEnabled(boolean newValue, MasterSwitchType switchType) throws IOException
IOException
public void postSetSplitOrMergeEnabled(boolean newValue, MasterSwitchType switchType) throws IOException
IOException
public void preSplitRegion(TableName tableName, byte[] splitRow) throws IOException
tableName
- the table where the region belongs tosplitRow
- the split pointIOException
public void preSplitRegionAction(TableName tableName, byte[] splitRow, User user) throws IOException
tableName
- the table where the region belongs tosplitRow
- the split pointuser
- the userIOException
public void postCompletedSplitRegionAction(RegionInfo regionInfoA, RegionInfo regionInfoB, User user) throws IOException
regionInfoA
- the new left-hand daughter regionregionInfoB
- the new right-hand daughter regionuser
- the userIOException
public void preSplitBeforeMETAAction(byte[] splitKey, List<Mutation> metaEntries, User user) throws IOException
splitKey
- metaEntries
- user
- the userIOException
public void preSplitAfterMETAAction(User user) throws IOException
user
- the userIOException
public void postRollBackSplitRegionAction(User user) throws IOException
user
- the userIOException
public void preMergeRegionsAction(RegionInfo[] regionsToMerge, User user) throws IOException
regionsToMerge
- the regions to mergeuser
- the userIOException
public void postCompletedMergeRegionsAction(RegionInfo[] regionsToMerge, RegionInfo mergedRegion, User user) throws IOException
regionsToMerge
- the regions to mergemergedRegion
- the new merged regionuser
- the userIOException
public void preMergeRegionsCommit(RegionInfo[] regionsToMerge, @MetaMutationAnnotation List<Mutation> metaEntries, User user) throws IOException
regionsToMerge
- the regions to mergemetaEntries
- the meta entryuser
- the userIOException
public void postMergeRegionsCommit(RegionInfo[] regionsToMerge, RegionInfo mergedRegion, User user) throws IOException
regionsToMerge
- the regions to mergemergedRegion
- the new merged regionuser
- the userIOException
public void postRollBackMergeRegionsAction(RegionInfo[] regionsToMerge, User user) throws IOException
regionsToMerge
- the regions to mergeuser
- the userIOException
public void preBalanceSwitch(boolean b) throws IOException
IOException
public void postBalanceSwitch(boolean oldValue, boolean newValue) throws IOException
IOException
public void preShutdown() throws IOException
IOException
public void preStopMaster() throws IOException
IOException
public void preMasterInitialization() throws IOException
IOException
public void postStartMaster() throws IOException
IOException
public void preSnapshot(SnapshotDescription snapshot, TableDescriptor hTableDescriptor) throws IOException
IOException
public void postSnapshot(SnapshotDescription snapshot, TableDescriptor hTableDescriptor) throws IOException
IOException
public void preListSnapshot(SnapshotDescription snapshot) throws IOException
IOException
public void postListSnapshot(SnapshotDescription snapshot) throws IOException
IOException
public void preCloneSnapshot(SnapshotDescription snapshot, TableDescriptor hTableDescriptor) throws IOException
IOException
public void postCloneSnapshot(SnapshotDescription snapshot, TableDescriptor hTableDescriptor) throws IOException
IOException
public void preRestoreSnapshot(SnapshotDescription snapshot, TableDescriptor hTableDescriptor) throws IOException
IOException
public void postRestoreSnapshot(SnapshotDescription snapshot, TableDescriptor hTableDescriptor) throws IOException
IOException
public void preDeleteSnapshot(SnapshotDescription snapshot) throws IOException
IOException
public void postDeleteSnapshot(SnapshotDescription snapshot) throws IOException
IOException
public void preGetTableDescriptors(List<TableName> tableNamesList, List<TableDescriptor> descriptors, String regex) throws IOException
IOException
public void postGetTableDescriptors(List<TableName> tableNamesList, List<TableDescriptor> descriptors, String regex) throws IOException
IOException
public void preGetTableNames(List<TableDescriptor> descriptors, String regex) throws IOException
IOException
public void postGetTableNames(List<TableDescriptor> descriptors, String regex) throws IOException
IOException
public void preTableFlush(TableName tableName) throws IOException
IOException
public void postTableFlush(TableName tableName) throws IOException
IOException
public void preSetUserQuota(String user, GlobalQuotaSettings quotas) throws IOException
IOException
public void postSetUserQuota(String user, GlobalQuotaSettings quotas) throws IOException
IOException
public void preSetUserQuota(String user, TableName table, GlobalQuotaSettings quotas) throws IOException
IOException
public void postSetUserQuota(String user, TableName table, GlobalQuotaSettings quotas) throws IOException
IOException
public void preSetUserQuota(String user, String namespace, GlobalQuotaSettings quotas) throws IOException
IOException
public void postSetUserQuota(String user, String namespace, GlobalQuotaSettings quotas) throws IOException
IOException
public void preSetTableQuota(TableName table, GlobalQuotaSettings quotas) throws IOException
IOException
public void postSetTableQuota(TableName table, GlobalQuotaSettings quotas) throws IOException
IOException
public void preSetNamespaceQuota(String namespace, GlobalQuotaSettings quotas) throws IOException
IOException
public void postSetNamespaceQuota(String namespace, GlobalQuotaSettings quotas) throws IOException
IOException
public void preSetRegionServerQuota(String regionServer, GlobalQuotaSettings quotas) throws IOException
IOException
public void postSetRegionServerQuota(String regionServer, GlobalQuotaSettings quotas) throws IOException
IOException
public void preMoveServersAndTables(Set<Address> servers, Set<TableName> tables, String targetGroup) throws IOException
IOException
public void postMoveServersAndTables(Set<Address> servers, Set<TableName> tables, String targetGroup) throws IOException
IOException
public void preMoveServers(Set<Address> servers, String targetGroup) throws IOException
IOException
public void postMoveServers(Set<Address> servers, String targetGroup) throws IOException
IOException
public void preMoveTables(Set<TableName> tables, String targetGroup) throws IOException
IOException
public void postMoveTables(Set<TableName> tables, String targetGroup) throws IOException
IOException
public void preAddRSGroup(String name) throws IOException
IOException
public void postAddRSGroup(String name) throws IOException
IOException
public void preRemoveRSGroup(String name) throws IOException
IOException
public void postRemoveRSGroup(String name) throws IOException
IOException
public void preBalanceRSGroup(String name) throws IOException
IOException
public void postBalanceRSGroup(String name, boolean balanceRan) throws IOException
IOException
public void preRemoveServers(Set<Address> servers) throws IOException
IOException
public void postRemoveServers(Set<Address> servers) throws IOException
IOException
public void preAddReplicationPeer(String peerId, ReplicationPeerConfig peerConfig) throws IOException
IOException
public void postAddReplicationPeer(String peerId, ReplicationPeerConfig peerConfig) throws IOException
IOException
public void preRemoveReplicationPeer(String peerId) throws IOException
IOException
public void postRemoveReplicationPeer(String peerId) throws IOException
IOException
public void preEnableReplicationPeer(String peerId) throws IOException
IOException
public void postEnableReplicationPeer(String peerId) throws IOException
IOException
public void preDisableReplicationPeer(String peerId) throws IOException
IOException
public void postDisableReplicationPeer(String peerId) throws IOException
IOException
public void preGetReplicationPeerConfig(String peerId) throws IOException
IOException
public void postGetReplicationPeerConfig(String peerId) throws IOException
IOException
public void preUpdateReplicationPeerConfig(String peerId, ReplicationPeerConfig peerConfig) throws IOException
IOException
public void postUpdateReplicationPeerConfig(String peerId, ReplicationPeerConfig peerConfig) throws IOException
IOException
public void preListReplicationPeers(String regex) throws IOException
IOException
public void postListReplicationPeers(String regex) throws IOException
IOException
public void preRequestLock(String namespace, TableName tableName, RegionInfo[] regionInfos, LockType type, String description) throws IOException
IOException
public void postRequestLock(String namespace, TableName tableName, RegionInfo[] regionInfos, LockType type, String description) throws IOException
IOException
public void preLockHeartbeat(LockProcedure proc, boolean keepAlive) throws IOException
IOException
public void postLockHeartbeat(LockProcedure proc, boolean keepAlive) throws IOException
IOException
public void preGetClusterMetrics() throws IOException
IOException
public void postGetClusterMetrics(ClusterMetrics status) throws IOException
IOException
public void preClearDeadServers() throws IOException
IOException
public void postClearDeadServers(List<ServerName> servers, List<ServerName> notClearedServers) throws IOException
IOException
public void preDecommissionRegionServers(List<ServerName> servers, boolean offload) throws IOException
IOException
public void postDecommissionRegionServers(List<ServerName> servers, boolean offload) throws IOException
IOException
public void preListDecommissionedRegionServers() throws IOException
IOException
public void postListDecommissionedRegionServers() throws IOException
IOException
public void preRecommissionRegionServer(ServerName server, List<byte[]> encodedRegionNames) throws IOException
IOException
public void postRecommissionRegionServer(ServerName server, List<byte[]> encodedRegionNames) throws IOException
IOException
public void preSwitchRpcThrottle(boolean enable) throws IOException
IOException
public void postSwitchRpcThrottle(boolean oldValue, boolean newValue) throws IOException
IOException
public void preIsRpcThrottleEnabled() throws IOException
IOException
public void postIsRpcThrottleEnabled(boolean enabled) throws IOException
IOException
public void preSwitchExceedThrottleQuota(boolean enable) throws IOException
IOException
public void postSwitchExceedThrottleQuota(boolean oldValue, boolean newValue) throws IOException
IOException
public void preGrant(UserPermission userPermission, boolean mergeExistingPermissions) throws IOException
IOException
public void postGrant(UserPermission userPermission, boolean mergeExistingPermissions) throws IOException
IOException
public void preRevoke(UserPermission userPermission) throws IOException
IOException
public void postRevoke(UserPermission userPermission) throws IOException
IOException
public void preGetUserPermissions(String userName, String namespace, TableName tableName, byte[] family, byte[] qualifier) throws IOException
IOException
public void postGetUserPermissions(String userName, String namespace, TableName tableName, byte[] family, byte[] qualifier) throws IOException
IOException
public void preHasUserPermissions(String userName, List<Permission> permissions) throws IOException
IOException
public void postHasUserPermissions(String userName, List<Permission> permissions) throws IOException
IOException
Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.