@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, wait
postAbortProcedure, 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, preUpdateReplicationPeerConfig
private 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
Coprocessor
CoprocessorEnvironment
during it's own startup to initialize the
coprocessor.start
in interface Coprocessor
IOException
public void stop(CoprocessorEnvironment env)
Coprocessor
CoprocessorEnvironment
during it's own shutdown to stop the
coprocessor.stop
in interface Coprocessor
public Iterable<com.google.protobuf.Service> getServices()
Coprocessor
getServices
in interface Coprocessor
Service
s or empty collection. Implementations should never
return null.public Optional<MasterObserver> getMasterObserver()
getMasterObserver
in interface MasterCoprocessor
RSGroupInfoManager getGroupInfoManager()
boolean rsgroupHasServersOnline(TableDescriptor desc) throws IOException
IOException
void assignTableToGroup(TableDescriptor desc) throws IOException
IOException
public void preCreateTableAction(ObserverContext<MasterCoprocessorEnvironment> ctx, TableDescriptor desc, RegionInfo[] regions) throws IOException
MasterObserver
HMaster
. Called as part of create
table procedure and it is async to the create RPC call.preCreateTableAction
in interface MasterObserver
ctx
- the environment to interact with the framework and masterdesc
- the TableDescriptor for the tableregions
- the initial regions created for the tableIOException
public void postDeleteTable(ObserverContext<MasterCoprocessorEnvironment> ctx, TableName tableName) throws IOException
MasterObserver
postDeleteTable
in interface MasterObserver
ctx
- the environment to interact with the framework and mastertableName
- the name of the tableIOException
public void preCreateNamespace(ObserverContext<MasterCoprocessorEnvironment> ctx, NamespaceDescriptor ns) throws IOException
MasterObserver
HMaster
.preCreateNamespace
in interface MasterObserver
ctx
- the environment to interact with the framework and masterns
- the NamespaceDescriptor for the tableIOException
public void preModifyNamespace(ObserverContext<MasterCoprocessorEnvironment> ctx, NamespaceDescriptor ns) throws IOException
MasterObserver
preModifyNamespace
in interface MasterObserver
ctx
- the environment to interact with the framework and masterns
- after modify operation, namespace will have this descriptorIOException
public void preCloneSnapshot(ObserverContext<MasterCoprocessorEnvironment> ctx, SnapshotDescription snapshot, TableDescriptor desc) throws IOException
MasterObserver
preCloneSnapshot
in interface MasterObserver
ctx
- the environment to interact with the framework and mastersnapshot
- the SnapshotDescriptor for the snapshotdesc
- the TableDescriptor of the table to createIOException
public void postClearDeadServers(ObserverContext<MasterCoprocessorEnvironment> ctx, List<ServerName> servers, List<ServerName> notClearedServers) throws IOException
MasterObserver
postClearDeadServers
in interface MasterObserver
IOException
public void checkPermission(String request) throws IOException
IOException
private User getActiveUser() throws IOException
IOException
Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.