@InterfaceAudience.Private public class RSGroupAdminEndpoint extends Object implements MasterCoprocessor, MasterObserver
| Modifier and Type | Class and Description |
|---|---|
private class |
RSGroupAdminEndpoint.RSGroupAdminServiceImpl
Implementation of RSGroupAdminService defined in RSGroupAdmin.proto.
|
Coprocessor.State| Modifier and Type | Field and Description |
|---|---|
private AccessChecker |
accessChecker |
private RSGroupAdminServer |
groupAdminServer |
private org.apache.hadoop.hbase.protobuf.generated.RSGroupAdminProtos.RSGroupAdminService |
groupAdminService |
private RSGroupInfoManager |
groupInfoManager |
private static org.slf4j.Logger |
LOG |
private MasterServices |
master |
private UserProvider |
userProvider
Provider for mapping principal names to Users
|
PRIORITY_HIGHEST, PRIORITY_LOWEST, PRIORITY_SYSTEM, PRIORITY_USER, VERSION| Constructor and Description |
|---|
RSGroupAdminEndpoint() |
| Modifier and Type | Method and Description |
|---|---|
(package private) void |
assignTableToGroup(TableDescriptor desc) |
void |
checkPermission(String request) |
private User |
getActiveUser()
Returns the active user to which authorization checks should be applied.
|
(package private) RSGroupInfoManager |
getGroupInfoManager() |
Optional<MasterObserver> |
getMasterObserver() |
Iterable<com.google.protobuf.Service> |
getServices()
Coprocessor endpoints providing protobuf services should override this method.
|
void |
postClearDeadServers(ObserverContext<MasterCoprocessorEnvironment> ctx,
List<ServerName> servers,
List<ServerName> notClearedServers)
Called after clear dead region servers.
|
void |
postDeleteTable(ObserverContext<MasterCoprocessorEnvironment> ctx,
TableName tableName)
Called after the deleteTable operation has been requested.
|
void |
preCloneSnapshot(ObserverContext<MasterCoprocessorEnvironment> ctx,
SnapshotDescription snapshot,
TableDescriptor desc)
Called before a snapshot is cloned.
|
void |
preCreateNamespace(ObserverContext<MasterCoprocessorEnvironment> ctx,
NamespaceDescriptor ns)
Called before a new namespace is created by
HMaster. |
void |
preCreateTableAction(ObserverContext<MasterCoprocessorEnvironment> ctx,
TableDescriptor desc,
RegionInfo[] regions)
Called before a new table is created by
HMaster. |
void |
preModifyNamespace(ObserverContext<MasterCoprocessorEnvironment> ctx,
NamespaceDescriptor ns)
Called prior to modifying a namespace's properties.
|
(package private) boolean |
rsgroupHasServersOnline(TableDescriptor desc) |
void |
start(CoprocessorEnvironment env)
Called by the
CoprocessorEnvironment during it's own startup to initialize the
coprocessor. |
void |
stop(CoprocessorEnvironment env)
Called by the
CoprocessorEnvironment during it's own shutdown to stop the
coprocessor. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitpostAbortProcedure, postAddReplicationPeer, postAddRSGroup, postAssign, postBalance, postBalanceRSGroup, postBalanceSwitch, postCloneSnapshot, postCompletedCreateTableAction, postCompletedDeleteTableAction, postCompletedDisableTableAction, postCompletedEnableTableAction, postCompletedMergeRegionsAction, postCompletedModifyTableAction, postCompletedModifyTableAction, postCompletedSnapshotAction, postCompletedSplitRegionAction, postCompletedTruncateTableAction, postCreateNamespace, postCreateTable, postDecommissionRegionServers, postDeleteNamespace, postDeleteSnapshot, postDisableReplicationPeer, postDisableTable, postEnableReplicationPeer, postEnableTable, postGetClusterMetrics, postGetLocks, postGetNamespaceDescriptor, postGetProcedures, postGetReplicationPeerConfig, postGetTableDescriptors, postGetTableNames, postGetUserPermissions, postGrant, postHasUserPermissions, postIsRpcThrottleEnabled, postListDecommissionedRegionServers, postListNamespaceDescriptors, postListNamespaces, postListReplicationPeers, postListSnapshot, postLockHeartbeat, postMergeRegions, postMergeRegionsCommitAction, postModifyNamespace, postModifyNamespace, postModifyTable, postModifyTable, postMove, postMoveServers, postMoveServersAndTables, postMoveTables, postRecommissionRegionServer, postRegionOffline, postRemoveReplicationPeer, postRemoveRSGroup, postRemoveServers, postRenameRSGroup, postRequestLock, postRestoreSnapshot, postRevoke, postRollBackMergeRegionsAction, postRollBackSplitRegionAction, postSetNamespaceQuota, postSetRegionServerQuota, postSetSplitOrMergeEnabled, postSetTableQuota, postSetUserQuota, postSetUserQuota, postSetUserQuota, postSnapshot, postStartMaster, postSwitchExceedThrottleQuota, postSwitchRpcThrottle, postTableFlush, postTruncateTable, postUnassign, postUpdateReplicationPeerConfig, preAbortProcedure, preAddReplicationPeer, preAddRSGroup, preAssign, preBalance, preBalanceRSGroup, preBalanceSwitch, preClearDeadServers, preCreateTable, preCreateTableRegionsInfos, preDecommissionRegionServers, preDeleteNamespace, preDeleteSnapshot, preDeleteTable, preDeleteTableAction, preDisableReplicationPeer, preDisableTable, preDisableTableAction, preEnableReplicationPeer, preEnableTable, preEnableTableAction, preGetClusterMetrics, preGetLocks, preGetNamespaceDescriptor, preGetProcedures, preGetReplicationPeerConfig, preGetTableDescriptors, preGetTableNames, preGetUserPermissions, preGrant, preHasUserPermissions, preIsRpcThrottleEnabled, preListDecommissionedRegionServers, preListNamespaceDescriptors, preListNamespaces, preListReplicationPeers, preListSnapshot, preLockHeartbeat, preMasterInitialization, preMergeRegions, preMergeRegionsAction, preMergeRegionsCommitAction, preModifyNamespace, preModifyTable, preModifyTable, preModifyTableAction, preModifyTableAction, preMove, preMoveServers, preMoveServersAndTables, preMoveTables, preRecommissionRegionServer, preRegionOffline, preRemoveReplicationPeer, preRemoveRSGroup, preRemoveServers, preRenameRSGroup, preRequestLock, preRestoreSnapshot, preRevoke, preSetNamespaceQuota, preSetRegionServerQuota, preSetSplitOrMergeEnabled, preSetTableQuota, preSetUserQuota, preSetUserQuota, preSetUserQuota, preShutdown, preSnapshot, preSplitRegion, preSplitRegionAction, preSplitRegionAfterMETAAction, preSplitRegionBeforeMETAAction, preStopMaster, preSwitchExceedThrottleQuota, preSwitchRpcThrottle, preTableFlush, preTruncateTable, preTruncateTableAction, preUnassign, preUpdateReplicationPeerConfigprivate static final org.slf4j.Logger LOG
private MasterServices master
private RSGroupInfoManager groupInfoManager
private RSGroupAdminServer groupAdminServer
private final org.apache.hadoop.hbase.protobuf.generated.RSGroupAdminProtos.RSGroupAdminService groupAdminService
private AccessChecker accessChecker
private UserProvider userProvider
public RSGroupAdminEndpoint()
public void start(CoprocessorEnvironment env) throws IOException
CoprocessorCoprocessorEnvironment during it's own startup to initialize the
coprocessor.start in interface CoprocessorIOExceptionpublic void stop(CoprocessorEnvironment env)
CoprocessorCoprocessorEnvironment during it's own shutdown to stop the
coprocessor.stop in interface Coprocessorpublic Iterable<com.google.protobuf.Service> getServices()
CoprocessorgetServices in interface CoprocessorServices or empty collection. Implementations should never
return null.public Optional<MasterObserver> getMasterObserver()
getMasterObserver in interface MasterCoprocessorRSGroupInfoManager getGroupInfoManager()
boolean rsgroupHasServersOnline(TableDescriptor desc) throws IOException
IOExceptionvoid assignTableToGroup(TableDescriptor desc) throws IOException
IOExceptionpublic void preCreateTableAction(ObserverContext<MasterCoprocessorEnvironment> ctx, TableDescriptor desc, RegionInfo[] regions) throws IOException
MasterObserverHMaster. Called as part of create
table procedure and it is async to the create RPC call.preCreateTableAction in interface MasterObserverctx - the environment to interact with the framework and masterdesc - the TableDescriptor for the tableregions - the initial regions created for the tableIOExceptionpublic void postDeleteTable(ObserverContext<MasterCoprocessorEnvironment> ctx, TableName tableName) throws IOException
MasterObserverpostDeleteTable in interface MasterObserverctx - the environment to interact with the framework and mastertableName - the name of the tableIOExceptionpublic void preCreateNamespace(ObserverContext<MasterCoprocessorEnvironment> ctx, NamespaceDescriptor ns) throws IOException
MasterObserverHMaster.preCreateNamespace in interface MasterObserverctx - the environment to interact with the framework and masterns - the NamespaceDescriptor for the tableIOExceptionpublic void preModifyNamespace(ObserverContext<MasterCoprocessorEnvironment> ctx, NamespaceDescriptor ns) throws IOException
MasterObserverpreModifyNamespace in interface MasterObserverctx - the environment to interact with the framework and masterns - after modify operation, namespace will have this descriptorIOExceptionpublic void preCloneSnapshot(ObserverContext<MasterCoprocessorEnvironment> ctx, SnapshotDescription snapshot, TableDescriptor desc) throws IOException
MasterObserverpreCloneSnapshot in interface MasterObserverctx - the environment to interact with the framework and mastersnapshot - the SnapshotDescriptor for the snapshotdesc - the TableDescriptor of the table to createIOExceptionpublic void postClearDeadServers(ObserverContext<MasterCoprocessorEnvironment> ctx, List<ServerName> servers, List<ServerName> notClearedServers) throws IOException
MasterObserverpostClearDeadServers in interface MasterObserverIOExceptionpublic void checkPermission(String request) throws IOException
IOExceptionprivate User getActiveUser() throws IOException
IOExceptionCopyright © 2007–2020 The Apache Software Foundation. All rights reserved.