@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, shutdownprivate 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)
CoprocessorHostcreateEnvironment in class CoprocessorHost<MasterCoprocessor,MasterCoprocessorEnvironment>public MasterCoprocessor checkAndGetInstance(Class<?> implClass) throws InstantiationException, IllegalAccessException
CoprocessorHostcheckAndGetInstance in class CoprocessorHost<MasterCoprocessor,MasterCoprocessorEnvironment>InstantiationExceptionIllegalAccessExceptionpublic void preCreateNamespace(NamespaceDescriptor ns) throws IOException
IOExceptionpublic void postCreateNamespace(NamespaceDescriptor ns) throws IOException
IOExceptionpublic void preDeleteNamespace(String namespaceName) throws IOException
IOExceptionpublic void postDeleteNamespace(String namespaceName) throws IOException
IOExceptionpublic void preModifyNamespace(NamespaceDescriptor currentNsDescriptor, NamespaceDescriptor newNsDescriptor) throws IOException
IOExceptionpublic void postModifyNamespace(NamespaceDescriptor oldNsDescriptor, NamespaceDescriptor currentNsDescriptor) throws IOException
IOExceptionpublic void preGetNamespaceDescriptor(String namespaceName) throws IOException
IOExceptionpublic void postGetNamespaceDescriptor(NamespaceDescriptor ns) throws IOException
IOExceptionpublic void preListNamespaceDescriptors(List<NamespaceDescriptor> descriptors) throws IOException
IOExceptionpublic void postListNamespaceDescriptors(List<NamespaceDescriptor> descriptors) throws IOException
IOExceptionpublic TableDescriptor preCreateTableRegionsInfos(TableDescriptor desc) throws IOException
IOExceptionpublic void preCreateTable(TableDescriptor htd, RegionInfo[] regions) throws IOException
IOExceptionpublic void postCreateTable(TableDescriptor htd, RegionInfo[] regions) throws IOException
IOExceptionpublic void preCreateTableAction(TableDescriptor htd, RegionInfo[] regions, User user) throws IOException
IOExceptionpublic void postCompletedCreateTableAction(TableDescriptor htd, RegionInfo[] regions, User user) throws IOException
IOExceptionpublic void preDeleteTable(TableName tableName) throws IOException
IOExceptionpublic void postDeleteTable(TableName tableName) throws IOException
IOExceptionpublic void preDeleteTableAction(TableName tableName, User user) throws IOException
IOExceptionpublic void postCompletedDeleteTableAction(TableName tableName, User user) throws IOException
IOExceptionpublic void preTruncateTable(TableName tableName) throws IOException
IOExceptionpublic void postTruncateTable(TableName tableName) throws IOException
IOExceptionpublic void preTruncateTableAction(TableName tableName, User user) throws IOException
IOExceptionpublic void postCompletedTruncateTableAction(TableName tableName, User user) throws IOException
IOExceptionpublic TableDescriptor preModifyTable(TableName tableName, TableDescriptor currentDescriptor, TableDescriptor newDescriptor) throws IOException
IOExceptionpublic void postModifyTable(TableName tableName, TableDescriptor oldDescriptor, TableDescriptor currentDescriptor) throws IOException
IOExceptionpublic void preModifyTableAction(TableName tableName, TableDescriptor currentDescriptor, TableDescriptor newDescriptor, User user) throws IOException
IOExceptionpublic void postCompletedModifyTableAction(TableName tableName, TableDescriptor oldDescriptor, TableDescriptor currentDescriptor, User user) throws IOException
IOExceptionpublic void preEnableTable(TableName tableName) throws IOException
IOExceptionpublic void postEnableTable(TableName tableName) throws IOException
IOExceptionpublic void preEnableTableAction(TableName tableName, User user) throws IOException
IOExceptionpublic void postCompletedEnableTableAction(TableName tableName, User user) throws IOException
IOExceptionpublic void preDisableTable(TableName tableName) throws IOException
IOExceptionpublic void postDisableTable(TableName tableName) throws IOException
IOExceptionpublic void preDisableTableAction(TableName tableName, User user) throws IOException
IOExceptionpublic void postCompletedDisableTableAction(TableName tableName, User user) throws IOException
IOExceptionpublic void preAbortProcedure(ProcedureExecutor<MasterProcedureEnv> procEnv, long procId) throws IOException
IOExceptionpublic void postAbortProcedure() throws IOException
IOExceptionpublic void preGetProcedures() throws IOException
IOExceptionpublic void postGetProcedures(List<Procedure<?>> procInfoList) throws IOException
IOExceptionpublic void preGetLocks() throws IOException
IOExceptionpublic void postGetLocks(List<LockedResource> lockedResources) throws IOException
IOExceptionpublic void preMove(RegionInfo region, ServerName srcServer, ServerName destServer) throws IOException
IOExceptionpublic void postMove(RegionInfo region, ServerName srcServer, ServerName destServer) throws IOException
IOExceptionpublic void preAssign(RegionInfo regionInfo) throws IOException
IOExceptionpublic void postAssign(RegionInfo regionInfo) throws IOException
IOExceptionpublic void preUnassign(RegionInfo regionInfo, boolean force) throws IOException
IOExceptionpublic void postUnassign(RegionInfo regionInfo, boolean force) throws IOException
IOExceptionpublic void preRegionOffline(RegionInfo regionInfo) throws IOException
IOExceptionpublic void postRegionOffline(RegionInfo regionInfo) throws IOException
IOExceptionpublic void preMergeRegions(RegionInfo[] regionsToMerge) throws IOException
IOExceptionpublic void postMergeRegions(RegionInfo[] regionsToMerge) throws IOException
IOExceptionpublic boolean preBalance() throws IOException
IOExceptionpublic void postBalance(List<RegionPlan> plans) throws IOException
IOExceptionpublic void preSetSplitOrMergeEnabled(boolean newValue, MasterSwitchType switchType) throws IOException
IOExceptionpublic void postSetSplitOrMergeEnabled(boolean newValue, MasterSwitchType switchType) throws IOException
IOExceptionpublic void preSplitRegion(TableName tableName, byte[] splitRow) throws IOException
tableName - the table where the region belongs tosplitRow - the split pointIOExceptionpublic void preSplitRegionAction(TableName tableName, byte[] splitRow, User user) throws IOException
tableName - the table where the region belongs tosplitRow - the split pointuser - the userIOExceptionpublic void postCompletedSplitRegionAction(RegionInfo regionInfoA, RegionInfo regionInfoB, User user) throws IOException
regionInfoA - the new left-hand daughter regionregionInfoB - the new right-hand daughter regionuser - the userIOExceptionpublic void preSplitBeforeMETAAction(byte[] splitKey, List<Mutation> metaEntries, User user) throws IOException
splitKey - metaEntries - user - the userIOExceptionpublic void preSplitAfterMETAAction(User user) throws IOException
user - the userIOExceptionpublic void postRollBackSplitRegionAction(User user) throws IOException
user - the userIOExceptionpublic void preMergeRegionsAction(RegionInfo[] regionsToMerge, User user) throws IOException
regionsToMerge - the regions to mergeuser - the userIOExceptionpublic void postCompletedMergeRegionsAction(RegionInfo[] regionsToMerge, RegionInfo mergedRegion, User user) throws IOException
regionsToMerge - the regions to mergemergedRegion - the new merged regionuser - the userIOExceptionpublic void preMergeRegionsCommit(RegionInfo[] regionsToMerge, @MetaMutationAnnotation List<Mutation> metaEntries, User user) throws IOException
regionsToMerge - the regions to mergemetaEntries - the meta entryuser - the userIOExceptionpublic void postMergeRegionsCommit(RegionInfo[] regionsToMerge, RegionInfo mergedRegion, User user) throws IOException
regionsToMerge - the regions to mergemergedRegion - the new merged regionuser - the userIOExceptionpublic void postRollBackMergeRegionsAction(RegionInfo[] regionsToMerge, User user) throws IOException
regionsToMerge - the regions to mergeuser - the userIOExceptionpublic void preBalanceSwitch(boolean b) throws IOException
IOExceptionpublic void postBalanceSwitch(boolean oldValue, boolean newValue) throws IOException
IOExceptionpublic void preShutdown() throws IOException
IOExceptionpublic void preStopMaster() throws IOException
IOExceptionpublic void preMasterInitialization() throws IOException
IOExceptionpublic void postStartMaster() throws IOException
IOExceptionpublic void preSnapshot(SnapshotDescription snapshot, TableDescriptor hTableDescriptor) throws IOException
IOExceptionpublic void postSnapshot(SnapshotDescription snapshot, TableDescriptor hTableDescriptor) throws IOException
IOExceptionpublic void preListSnapshot(SnapshotDescription snapshot) throws IOException
IOExceptionpublic void postListSnapshot(SnapshotDescription snapshot) throws IOException
IOExceptionpublic void preCloneSnapshot(SnapshotDescription snapshot, TableDescriptor hTableDescriptor) throws IOException
IOExceptionpublic void postCloneSnapshot(SnapshotDescription snapshot, TableDescriptor hTableDescriptor) throws IOException
IOExceptionpublic void preRestoreSnapshot(SnapshotDescription snapshot, TableDescriptor hTableDescriptor) throws IOException
IOExceptionpublic void postRestoreSnapshot(SnapshotDescription snapshot, TableDescriptor hTableDescriptor) throws IOException
IOExceptionpublic void preDeleteSnapshot(SnapshotDescription snapshot) throws IOException
IOExceptionpublic void postDeleteSnapshot(SnapshotDescription snapshot) throws IOException
IOExceptionpublic void preGetTableDescriptors(List<TableName> tableNamesList, List<TableDescriptor> descriptors, String regex) throws IOException
IOExceptionpublic void postGetTableDescriptors(List<TableName> tableNamesList, List<TableDescriptor> descriptors, String regex) throws IOException
IOExceptionpublic void preGetTableNames(List<TableDescriptor> descriptors, String regex) throws IOException
IOExceptionpublic void postGetTableNames(List<TableDescriptor> descriptors, String regex) throws IOException
IOExceptionpublic void preTableFlush(TableName tableName) throws IOException
IOExceptionpublic void postTableFlush(TableName tableName) throws IOException
IOExceptionpublic void preSetUserQuota(String user, GlobalQuotaSettings quotas) throws IOException
IOExceptionpublic void postSetUserQuota(String user, GlobalQuotaSettings quotas) throws IOException
IOExceptionpublic void preSetUserQuota(String user, TableName table, GlobalQuotaSettings quotas) throws IOException
IOExceptionpublic void postSetUserQuota(String user, TableName table, GlobalQuotaSettings quotas) throws IOException
IOExceptionpublic void preSetUserQuota(String user, String namespace, GlobalQuotaSettings quotas) throws IOException
IOExceptionpublic void postSetUserQuota(String user, String namespace, GlobalQuotaSettings quotas) throws IOException
IOExceptionpublic void preSetTableQuota(TableName table, GlobalQuotaSettings quotas) throws IOException
IOExceptionpublic void postSetTableQuota(TableName table, GlobalQuotaSettings quotas) throws IOException
IOExceptionpublic void preSetNamespaceQuota(String namespace, GlobalQuotaSettings quotas) throws IOException
IOExceptionpublic void postSetNamespaceQuota(String namespace, GlobalQuotaSettings quotas) throws IOException
IOExceptionpublic void preSetRegionServerQuota(String regionServer, GlobalQuotaSettings quotas) throws IOException
IOExceptionpublic void postSetRegionServerQuota(String regionServer, GlobalQuotaSettings quotas) throws IOException
IOExceptionpublic void preMoveServersAndTables(Set<Address> servers, Set<TableName> tables, String targetGroup) throws IOException
IOExceptionpublic void postMoveServersAndTables(Set<Address> servers, Set<TableName> tables, String targetGroup) throws IOException
IOExceptionpublic void preMoveServers(Set<Address> servers, String targetGroup) throws IOException
IOExceptionpublic void postMoveServers(Set<Address> servers, String targetGroup) throws IOException
IOExceptionpublic void preMoveTables(Set<TableName> tables, String targetGroup) throws IOException
IOExceptionpublic void postMoveTables(Set<TableName> tables, String targetGroup) throws IOException
IOExceptionpublic void preAddRSGroup(String name) throws IOException
IOExceptionpublic void postAddRSGroup(String name) throws IOException
IOExceptionpublic void preRemoveRSGroup(String name) throws IOException
IOExceptionpublic void postRemoveRSGroup(String name) throws IOException
IOExceptionpublic void preBalanceRSGroup(String name) throws IOException
IOExceptionpublic void postBalanceRSGroup(String name, boolean balanceRan) throws IOException
IOExceptionpublic void preRemoveServers(Set<Address> servers) throws IOException
IOExceptionpublic void postRemoveServers(Set<Address> servers) throws IOException
IOExceptionpublic void preAddReplicationPeer(String peerId, ReplicationPeerConfig peerConfig) throws IOException
IOExceptionpublic void postAddReplicationPeer(String peerId, ReplicationPeerConfig peerConfig) throws IOException
IOExceptionpublic void preRemoveReplicationPeer(String peerId) throws IOException
IOExceptionpublic void postRemoveReplicationPeer(String peerId) throws IOException
IOExceptionpublic void preEnableReplicationPeer(String peerId) throws IOException
IOExceptionpublic void postEnableReplicationPeer(String peerId) throws IOException
IOExceptionpublic void preDisableReplicationPeer(String peerId) throws IOException
IOExceptionpublic void postDisableReplicationPeer(String peerId) throws IOException
IOExceptionpublic void preGetReplicationPeerConfig(String peerId) throws IOException
IOExceptionpublic void postGetReplicationPeerConfig(String peerId) throws IOException
IOExceptionpublic void preUpdateReplicationPeerConfig(String peerId, ReplicationPeerConfig peerConfig) throws IOException
IOExceptionpublic void postUpdateReplicationPeerConfig(String peerId, ReplicationPeerConfig peerConfig) throws IOException
IOExceptionpublic void preListReplicationPeers(String regex) throws IOException
IOExceptionpublic void postListReplicationPeers(String regex) throws IOException
IOExceptionpublic void preRequestLock(String namespace, TableName tableName, RegionInfo[] regionInfos, LockType type, String description) throws IOException
IOExceptionpublic void postRequestLock(String namespace, TableName tableName, RegionInfo[] regionInfos, LockType type, String description) throws IOException
IOExceptionpublic void preLockHeartbeat(LockProcedure proc, boolean keepAlive) throws IOException
IOExceptionpublic void postLockHeartbeat(LockProcedure proc, boolean keepAlive) throws IOException
IOExceptionpublic void preGetClusterMetrics() throws IOException
IOExceptionpublic void postGetClusterMetrics(ClusterMetrics status) throws IOException
IOExceptionpublic void preClearDeadServers() throws IOException
IOExceptionpublic void postClearDeadServers(List<ServerName> servers, List<ServerName> notClearedServers) throws IOException
IOExceptionpublic void preDecommissionRegionServers(List<ServerName> servers, boolean offload) throws IOException
IOExceptionpublic void postDecommissionRegionServers(List<ServerName> servers, boolean offload) throws IOException
IOExceptionpublic void preListDecommissionedRegionServers() throws IOException
IOExceptionpublic void postListDecommissionedRegionServers() throws IOException
IOExceptionpublic void preRecommissionRegionServer(ServerName server, List<byte[]> encodedRegionNames) throws IOException
IOExceptionpublic void postRecommissionRegionServer(ServerName server, List<byte[]> encodedRegionNames) throws IOException
IOExceptionpublic void preSwitchRpcThrottle(boolean enable) throws IOException
IOExceptionpublic void postSwitchRpcThrottle(boolean oldValue, boolean newValue) throws IOException
IOExceptionpublic void preIsRpcThrottleEnabled() throws IOException
IOExceptionpublic void postIsRpcThrottleEnabled(boolean enabled) throws IOException
IOExceptionpublic void preSwitchExceedThrottleQuota(boolean enable) throws IOException
IOExceptionpublic void postSwitchExceedThrottleQuota(boolean oldValue, boolean newValue) throws IOException
IOExceptionpublic void preGrant(UserPermission userPermission, boolean mergeExistingPermissions) throws IOException
IOExceptionpublic void postGrant(UserPermission userPermission, boolean mergeExistingPermissions) throws IOException
IOExceptionpublic void preRevoke(UserPermission userPermission) throws IOException
IOExceptionpublic void postRevoke(UserPermission userPermission) throws IOException
IOExceptionpublic void preGetUserPermissions(String userName, String namespace, TableName tableName, byte[] family, byte[] qualifier) throws IOException
IOExceptionpublic void postGetUserPermissions(String userName, String namespace, TableName tableName, byte[] family, byte[] qualifier) throws IOException
IOExceptionpublic void preHasUserPermissions(String userName, List<Permission> permissions) throws IOException
IOExceptionpublic void postHasUserPermissions(String userName, List<Permission> permissions) throws IOException
IOExceptionCopyright © 2007–2020 The Apache Software Foundation. All rights reserved.