Package org.apache.hadoop.hbase.rsgroup
Class RSGroupAdminEndpoint
java.lang.Object
org.apache.hadoop.hbase.rsgroup.RSGroupAdminEndpoint
- All Implemented Interfaces:
Coprocessor,MasterCoprocessor,MasterObserver
@Private
public class RSGroupAdminEndpoint
extends Object
implements MasterCoprocessor, MasterObserver
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate classImplementation of RSGroupAdminService defined in RSGroupAdmin.proto.Nested classes/interfaces inherited from interface org.apache.hadoop.hbase.Coprocessor
Coprocessor.State -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate AccessCheckerprivate RSGroupAdminServerprivate final org.apache.hadoop.hbase.protobuf.generated.RSGroupAdminProtos.RSGroupAdminServiceprivate RSGroupInfoManagerprivate static final org.slf4j.Loggerprivate MasterServicesprivate UserProviderProvider for mapping principal names to UsersFields inherited from interface org.apache.hadoop.hbase.Coprocessor
PRIORITY_HIGHEST, PRIORITY_LOWEST, PRIORITY_SYSTEM, PRIORITY_USER, VERSION -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) voidvoidcheckPermission(String request) private RSGroupInfoprivate UserReturns the active user to which authorization checks should be applied.(package private) RSGroupAdminServer(package private) RSGroupInfoManagerIterable<com.google.protobuf.Service>Coprocessor endpoints providing protobuf services should override this method.private voidmoveTableToRSGroup(TableDescriptor desc, RSGroupInfo rsGroupInfo) private voidvoidpostClearDeadServers(ObserverContext<MasterCoprocessorEnvironment> ctx, List<ServerName> servers, List<ServerName> notClearedServers) Called after clear dead region servers.voidpostCompletedModifyTableAction(ObserverContext<MasterCoprocessorEnvironment> ctx, TableName tableName, TableDescriptor oldDescriptor, TableDescriptor currentDescriptor) Called after to modifying a table's properties.voidpostDeleteTable(ObserverContext<MasterCoprocessorEnvironment> ctx, TableName tableName) Called after the deleteTable operation has been requested.voidpreCloneSnapshot(ObserverContext<MasterCoprocessorEnvironment> ctx, SnapshotDescription snapshot, TableDescriptor desc) Called before a snapshot is cloned.voidCalled before a new namespace is created byHMaster.voidpreCreateTableAction(ObserverContext<MasterCoprocessorEnvironment> ctx, TableDescriptor desc, RegionInfo[] regions) Called before a new table is created byHMaster.voidCalled prior to modifying a namespace's properties.voidpreModifyTableAction(ObserverContext<MasterCoprocessorEnvironment> ctx, TableName tableName, TableDescriptor currentDescriptor, TableDescriptor newDescriptor) Called prior to modifying a table's properties.(package private) booleanvoidCalled by theCoprocessorEnvironmentduring it's own startup to initialize the coprocessor.voidCalled by theCoprocessorEnvironmentduring it's own shutdown to stop the coprocessor.private voidvalidateRSGroup(TableDescriptor desc, RSGroupInfo rsGroupInfo) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.hadoop.hbase.coprocessor.MasterObserver
postAbortProcedure, postAddReplicationPeer, postAddRSGroup, postAssign, postBalance, postBalanceRSGroup, postBalanceSwitch, postCloneSnapshot, postCompletedCreateTableAction, postCompletedDeleteTableAction, postCompletedDisableTableAction, postCompletedEnableTableAction, postCompletedMergeRegionsAction, 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, postMasterStoreFlush, postMergeRegions, postMergeRegionsCommitAction, postModifyColumnFamilyStoreFileTracker, postModifyNamespace, postModifyNamespace, postModifyTable, postModifyTable, postModifyTableStoreFileTracker, 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, postTruncateRegion, postTruncateRegionAction, postTruncateTable, postUnassign, postUnassign, postUpdateMasterConfiguration, postUpdateReplicationPeerConfig, postUpdateRSGroupConfig, 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, preMasterStoreFlush, preMergeRegions, preMergeRegionsAction, preMergeRegionsCommitAction, preModifyColumnFamilyStoreFileTracker, preModifyNamespace, preModifyTable, preModifyTable, preModifyTableAction, preModifyTableStoreFileTracker, 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, preTruncateRegion, preTruncateRegionAction, preTruncateTable, preTruncateTableAction, preUnassign, preUnassign, preUpdateMasterConfiguration, preUpdateReplicationPeerConfig, preUpdateRSGroupConfig
-
Field Details
-
LOG
-
master
-
groupInfoManager
-
groupAdminServer
-
groupAdminService
private final org.apache.hadoop.hbase.protobuf.generated.RSGroupAdminProtos.RSGroupAdminService groupAdminService -
accessChecker
-
userProvider
Provider for mapping principal names to Users
-
-
Constructor Details
-
RSGroupAdminEndpoint
public RSGroupAdminEndpoint()
-
-
Method Details
-
start
Description copied from interface:CoprocessorCalled by theCoprocessorEnvironmentduring it's own startup to initialize the coprocessor.- Specified by:
startin interfaceCoprocessor- Throws:
IOException
-
stop
Description copied from interface:CoprocessorCalled by theCoprocessorEnvironmentduring it's own shutdown to stop the coprocessor.- Specified by:
stopin interfaceCoprocessor
-
getServices
Description copied from interface:CoprocessorCoprocessor endpoints providing protobuf services should override this method.- Specified by:
getServicesin interfaceCoprocessor- Returns:
- Iterable of
Services or empty collection. Implementations should never return null.
-
getMasterObserver
- Specified by:
getMasterObserverin interfaceMasterCoprocessor
-
getGroupInfoManager
-
getGroupAdminServer
-
rsgroupHasServersOnline
- Throws:
IOException
-
assignTableToGroup
- Throws:
IOException
-
preCreateTableAction
public void preCreateTableAction(ObserverContext<MasterCoprocessorEnvironment> ctx, TableDescriptor desc, RegionInfo[] regions) throws IOException Description copied from interface:MasterObserverCalled before a new table is created byHMaster. Called as part of create table procedure and it is async to the create RPC call.- Specified by:
preCreateTableActionin interfaceMasterObserver- Parameters:
ctx- the environment to interact with the framework and masterdesc- the TableDescriptor for the tableregions- the initial regions created for the table- Throws:
IOException
-
preModifyTableAction
public void preModifyTableAction(ObserverContext<MasterCoprocessorEnvironment> ctx, TableName tableName, TableDescriptor currentDescriptor, TableDescriptor newDescriptor) throws IOException Description copied from interface:MasterObserverCalled prior to modifying a table's properties. Called as part of modify table procedure and it is async to the modify table RPC call.- Specified by:
preModifyTableActionin interfaceMasterObserver- Parameters:
ctx- the environment to interact with the framework and mastertableName- the name of the tablecurrentDescriptor- current TableDescriptor of the tablenewDescriptor- after modify operation, table will have this descriptor- Throws:
IOException
-
postCompletedModifyTableAction
public void postCompletedModifyTableAction(ObserverContext<MasterCoprocessorEnvironment> ctx, TableName tableName, TableDescriptor oldDescriptor, TableDescriptor currentDescriptor) throws IOException Description copied from interface:MasterObserverCalled after to modifying a table's properties. Called as part of modify table procedure and it is async to the modify table RPC call.- Specified by:
postCompletedModifyTableActionin interfaceMasterObserver- Parameters:
ctx- the environment to interact with the framework and mastertableName- the name of the tableoldDescriptor- descriptor of table before modify operation happenedcurrentDescriptor- current TableDescriptor of the table- Throws:
IOException
-
moveTableToValidRSGroup
- Throws:
IOException
-
validateRSGroup
- Throws:
IOException
-
moveTableToRSGroup
- Throws:
IOException
-
determineRSGroupInfoForTable
- Throws:
IOException
-
postDeleteTable
public void postDeleteTable(ObserverContext<MasterCoprocessorEnvironment> ctx, TableName tableName) throws IOException Description copied from interface:MasterObserverCalled after the deleteTable operation has been requested. Called as part of delete table RPC call.- Specified by:
postDeleteTablein interfaceMasterObserver- Parameters:
ctx- the environment to interact with the framework and mastertableName- the name of the table- Throws:
IOException
-
preCreateNamespace
public void preCreateNamespace(ObserverContext<MasterCoprocessorEnvironment> ctx, NamespaceDescriptor ns) throws IOException Description copied from interface:MasterObserverCalled before a new namespace is created byHMaster.- Specified by:
preCreateNamespacein interfaceMasterObserver- Parameters:
ctx- the environment to interact with the framework and masterns- the NamespaceDescriptor for the table- Throws:
IOException
-
preModifyNamespace
public void preModifyNamespace(ObserverContext<MasterCoprocessorEnvironment> ctx, NamespaceDescriptor ns) throws IOException Description copied from interface:MasterObserverCalled prior to modifying a namespace's properties.- Specified by:
preModifyNamespacein interfaceMasterObserver- Parameters:
ctx- the environment to interact with the framework and masterns- after modify operation, namespace will have this descriptor- Throws:
IOException
-
preCloneSnapshot
public void preCloneSnapshot(ObserverContext<MasterCoprocessorEnvironment> ctx, SnapshotDescription snapshot, TableDescriptor desc) throws IOException Description copied from interface:MasterObserverCalled before a snapshot is cloned. Called as part of restoreSnapshot RPC call.- Specified by:
preCloneSnapshotin interfaceMasterObserver- Parameters:
ctx- the environment to interact with the framework and mastersnapshot- the SnapshotDescriptor for the snapshotdesc- the TableDescriptor of the table to create- Throws:
IOException
-
postClearDeadServers
public void postClearDeadServers(ObserverContext<MasterCoprocessorEnvironment> ctx, List<ServerName> servers, List<ServerName> notClearedServers) throws IOException Description copied from interface:MasterObserverCalled after clear dead region servers.- Specified by:
postClearDeadServersin interfaceMasterObserver- Throws:
IOException
-
checkPermission
- Throws:
IOException
-
getActiveUser
Returns the active user to which authorization checks should be applied. If we are in the context of an RPC call, the remote user is used, otherwise the currently logged in user is used.- Throws:
IOException
-