@InterfaceAudience.LimitedPrivate(value="Configuration") public class AccessController extends BaseMasterAndRegionObserver implements RegionServerObserver, AccessControlProtos.AccessControlService.Interface, CoprocessorService, EndpointObserver, BulkLoadObserver
AccessController performs authorization checks for HBase operations
based on:
Permission.Action values)AccessDeniedException
will be thrown for the operation.
To perform authorization checks, AccessController relies on the
RpcServerEngine being loaded to provide
the user identities for remote requests.
The access control lists used for authorization can be manipulated via the
exposed AccessControlProtos.AccessControlService Interface implementation, and the associated
grant, revoke, and user_permission HBase shell
commands.
Coprocessor.StateRegionObserver.MutationType| Modifier and Type | Field and Description |
|---|---|
static Log |
LOG |
PRIORITY_HIGHEST, PRIORITY_LOWEST, PRIORITY_SYSTEM, PRIORITY_USER, VERSION| Constructor and Description |
|---|
AccessController() |
| Modifier and Type | Method and Description |
|---|---|
void |
checkPermissions(RpcController controller,
AccessControlProtos.CheckPermissionsRequest request,
<any> done)
rpc CheckPermissions(.hbase.pb.CheckPermissionsRequest) returns (.hbase.pb.CheckPermissionsResponse); |
TableAuthManager |
getAuthManager() |
Region |
getRegion() |
Service |
getService() |
void |
getUserPermissions(RpcController controller,
AccessControlProtos.GetUserPermissionsRequest request,
<any> done)
rpc GetUserPermissions(.hbase.pb.GetUserPermissionsRequest) returns (.hbase.pb.GetUserPermissionsResponse); |
void |
grant(RpcController controller,
AccessControlProtos.GrantRequest request,
<any> done)
rpc Grant(.hbase.pb.GrantRequest) returns (.hbase.pb.GrantResponse); |
void |
postAbortProcedure(ObserverContext<MasterCoprocessorEnvironment> ctx)
Called after a abortProcedure request has been processed.
|
ReplicationEndpoint |
postCreateReplicationEndPoint(ObserverContext<RegionServerCoprocessorEnvironment> ctx,
ReplicationEndpoint endpoint)
This will be called after the replication endpoint is instantiated.
|
void |
postCreateTableHandler(ObserverContext<MasterCoprocessorEnvironment> c,
HTableDescriptor desc,
HRegionInfo[] regions)
Called after the createTable operation has been requested.
|
void |
postDelete(ObserverContext<RegionCoprocessorEnvironment> c,
Delete delete,
WALEdit edit,
Durability durability)
Called after the client deletes a value.
|
void |
postDeleteColumn(ObserverContext<MasterCoprocessorEnvironment> c,
TableName tableName,
byte[] col)
Called after the column family has been deleted.
|
void |
postDeleteNamespace(ObserverContext<MasterCoprocessorEnvironment> ctx,
java.lang.String namespace)
Called after the deleteNamespace operation has been requested.
|
void |
postDeleteTable(ObserverContext<MasterCoprocessorEnvironment> c,
TableName tableName)
Called after the deleteTable operation has been requested.
|
void |
postEndpointInvocation(ObserverContext<RegionCoprocessorEnvironment> ctx,
Service service,
java.lang.String methodName,
Message request,
Message.Builder responseBuilder)
Called after an Endpoint service method is invoked.
|
void |
postGetTableDescriptors(ObserverContext<MasterCoprocessorEnvironment> ctx,
java.util.List<TableName> tableNamesList,
java.util.List<HTableDescriptor> descriptors,
java.lang.String regex)
Called after a getTableDescriptors request has been processed.
|
void |
postGetTableNames(ObserverContext<MasterCoprocessorEnvironment> ctx,
java.util.List<HTableDescriptor> descriptors,
java.lang.String regex)
Called after a getTableNames request has been processed.
|
void |
postListNamespaceDescriptors(ObserverContext<MasterCoprocessorEnvironment> ctx,
java.util.List<NamespaceDescriptor> descriptors)
Called after a listNamespaceDescriptors request has been processed.
|
void |
postListProcedures(ObserverContext<MasterCoprocessorEnvironment> ctx,
java.util.List<ProcedureInfo> procInfoList)
Called after a listProcedures request has been processed.
|
void |
postLogReplay(ObserverContext<RegionCoprocessorEnvironment> c)
Called after the log replay on the region is over.
|
void |
postMerge(ObserverContext<RegionServerCoprocessorEnvironment> c,
Region regionA,
Region regionB,
Region mergedRegion)
called after the regions merge.
|
void |
postMergeCommit(ObserverContext<RegionServerCoprocessorEnvironment> ctx,
Region regionA,
Region regionB,
Region mergedRegion)
This will be called after PONR step as part of regions merge transaction.
|
void |
postModifyTable(ObserverContext<MasterCoprocessorEnvironment> c,
TableName tableName,
HTableDescriptor htd)
Called after the modifyTable operation has been requested.
|
Cell |
postMutationBeforeWAL(ObserverContext<RegionCoprocessorEnvironment> ctx,
RegionObserver.MutationType opType,
Mutation mutation,
Cell oldCell,
Cell newCell)
Called after a new cell has been created during an increment operation, but before
it is committed to the WAL or memstore.
|
void |
postOpen(ObserverContext<RegionCoprocessorEnvironment> c)
Called after the region is reported as open to the master.
|
void |
postPut(ObserverContext<RegionCoprocessorEnvironment> c,
Put put,
WALEdit edit,
Durability durability)
Called after the client stores a value.
|
void |
postReplicateLogEntries(ObserverContext<RegionServerCoprocessorEnvironment> ctx,
java.util.List<AdminProtos.WALEntry> entries,
CellScanner cells)
This will be called after executing replication request to shipping log entries.
|
void |
postRollBackMerge(ObserverContext<RegionServerCoprocessorEnvironment> ctx,
Region regionA,
Region regionB)
This will be called after the roll back of the regions merge.
|
void |
postRollWALWriterRequest(ObserverContext<RegionServerCoprocessorEnvironment> ctx)
This will be called after executing user request to roll a region server WAL.
|
void |
postScannerClose(ObserverContext<RegionCoprocessorEnvironment> c,
InternalScanner s)
Called after the client closes a scanner.
|
RegionScanner |
postScannerOpen(ObserverContext<RegionCoprocessorEnvironment> c,
Scan scan,
RegionScanner s)
Called after the client opens a new scanner.
|
void |
postStartMaster(ObserverContext<MasterCoprocessorEnvironment> ctx)
Called immediately after an active master instance has completed
initialization.
|
void |
postTruncateTable(ObserverContext<MasterCoprocessorEnvironment> ctx,
TableName tableName)
Called after the truncateTable operation has been requested.
|
void |
preAbortProcedure(ObserverContext<MasterCoprocessorEnvironment> ctx,
ProcedureExecutor<MasterProcedureEnv> procEnv,
long procId)
Called before a abortProcedure request has been processed.
|
void |
preAddColumn(ObserverContext<MasterCoprocessorEnvironment> c,
TableName tableName,
HColumnDescriptor column)
Called prior to adding a new column family to the table.
|
void |
preAddRSGroup(ObserverContext<MasterCoprocessorEnvironment> ctx,
java.lang.String name)
Called before a new region server group is added
|
Result |
preAppend(ObserverContext<RegionCoprocessorEnvironment> c,
Append append)
Called before Append.
|
Result |
preAppendAfterRowLock(ObserverContext<RegionCoprocessorEnvironment> c,
Append append)
Called before Append but after acquiring rowlock.
|
void |
preAssign(ObserverContext<MasterCoprocessorEnvironment> c,
HRegionInfo regionInfo)
Called prior to assigning a specific region.
|
void |
preBalance(ObserverContext<MasterCoprocessorEnvironment> c)
Called prior to requesting rebalancing of the cluster regions, though after
the initial checks for regions in transition and the balance switch flag.
|
void |
preBalanceRSGroup(ObserverContext<MasterCoprocessorEnvironment> ctx,
java.lang.String groupName)
Called before a region server group is removed
|
boolean |
preBalanceSwitch(ObserverContext<MasterCoprocessorEnvironment> c,
boolean newValue)
Called prior to modifying the flag used to enable/disable region balancing.
|
void |
preBatchMutate(ObserverContext<RegionCoprocessorEnvironment> c,
MiniBatchOperationInProgress<Mutation> miniBatchOp)
This will be called for every batch mutation operation happening at the server.
|
void |
preBulkLoadHFile(ObserverContext<RegionCoprocessorEnvironment> ctx,
java.util.List<Pair<byte[],java.lang.String>> familyPaths)
Verifies user has CREATE privileges on
the Column Families involved in the bulkLoadHFile
request.
|
boolean |
preCheckAndDelete(ObserverContext<RegionCoprocessorEnvironment> c,
byte[] row,
byte[] family,
byte[] qualifier,
CompareFilter.CompareOp compareOp,
ByteArrayComparable comparator,
Delete delete,
boolean result)
Called before checkAndDelete.
|
boolean |
preCheckAndDeleteAfterRowLock(ObserverContext<RegionCoprocessorEnvironment> c,
byte[] row,
byte[] family,
byte[] qualifier,
CompareFilter.CompareOp compareOp,
ByteArrayComparable comparator,
Delete delete,
boolean result)
Called before checkAndDelete but after acquiring rowock.
|
boolean |
preCheckAndPut(ObserverContext<RegionCoprocessorEnvironment> c,
byte[] row,
byte[] family,
byte[] qualifier,
CompareFilter.CompareOp compareOp,
ByteArrayComparable comparator,
Put put,
boolean result)
Called before checkAndPut.
|
boolean |
preCheckAndPutAfterRowLock(ObserverContext<RegionCoprocessorEnvironment> c,
byte[] row,
byte[] family,
byte[] qualifier,
CompareFilter.CompareOp compareOp,
ByteArrayComparable comparator,
Put put,
boolean result)
Called before checkAndPut but after acquiring rowlock.
|
void |
preCleanupBulkLoad(ObserverContext<RegionCoprocessorEnvironment> ctx,
SecureBulkLoadProtos.CleanupBulkLoadRequest request)
Authorization security check for
SecureBulkLoadProtocol.cleanupBulkLoad()
|
void |
preCloneSnapshot(ObserverContext<MasterCoprocessorEnvironment> ctx,
HBaseProtos.SnapshotDescription snapshot,
HTableDescriptor hTableDescriptor)
Called before a snapshot is cloned.
|
void |
preClose(ObserverContext<RegionCoprocessorEnvironment> e,
boolean abortRequested)
Called before the region is reported as closed to the master.
|
InternalScanner |
preCompact(ObserverContext<RegionCoprocessorEnvironment> e,
Store store,
InternalScanner scanner,
ScanType scanType)
Called prior to writing the
StoreFiles selected for compaction into a new
StoreFile. |
void |
preCreateNamespace(ObserverContext<MasterCoprocessorEnvironment> ctx,
NamespaceDescriptor ns)
Called before a new namespace is created by
HMaster. |
void |
preCreateTable(ObserverContext<MasterCoprocessorEnvironment> c,
HTableDescriptor desc,
HRegionInfo[] regions)
Called before a new table is created by
HMaster. |
void |
preDelete(ObserverContext<RegionCoprocessorEnvironment> c,
Delete delete,
WALEdit edit,
Durability durability)
Called before the client deletes a value.
|
void |
preDeleteColumn(ObserverContext<MasterCoprocessorEnvironment> c,
TableName tableName,
byte[] col)
Called prior to deleting the entire column family.
|
void |
preDeleteNamespace(ObserverContext<MasterCoprocessorEnvironment> ctx,
java.lang.String namespace)
Called before
HMaster deletes a
namespace
It can't bypass the default action, e.g., ctx.bypass() won't have effect. |
void |
preDeleteSnapshot(ObserverContext<MasterCoprocessorEnvironment> ctx,
HBaseProtos.SnapshotDescription snapshot)
Called before a snapshot is deleted.
|
void |
preDeleteTable(ObserverContext<MasterCoprocessorEnvironment> c,
TableName tableName)
Called before
HMaster deletes a
table. |
void |
preDisableTable(ObserverContext<MasterCoprocessorEnvironment> c,
TableName tableName)
Called prior to disabling a table.
|
void |
preEnableTable(ObserverContext<MasterCoprocessorEnvironment> c,
TableName tableName)
Called prior to enabling a table.
|
Message |
preEndpointInvocation(ObserverContext<RegionCoprocessorEnvironment> ctx,
Service service,
java.lang.String methodName,
Message request)
Called before an Endpoint service method is invoked.
|
boolean |
preExists(ObserverContext<RegionCoprocessorEnvironment> c,
Get get,
boolean exists)
Called before the client tests for existence using a Get.
|
void |
preFlush(ObserverContext<RegionCoprocessorEnvironment> e)
Called before the memstore is flushed to disk.
|
void |
preGetClosestRowBefore(ObserverContext<RegionCoprocessorEnvironment> c,
byte[] row,
byte[] family,
Result result)
Called before a client makes a GetClosestRowBefore request.
|
void |
preGetNamespaceDescriptor(ObserverContext<MasterCoprocessorEnvironment> ctx,
java.lang.String namespace)
Called before a getNamespaceDescriptor request has been processed.
|
void |
preGetOp(ObserverContext<RegionCoprocessorEnvironment> c,
Get get,
java.util.List<Cell> result)
Called before the client performs a Get
|
void |
preGetTableDescriptors(ObserverContext<MasterCoprocessorEnvironment> ctx,
java.util.List<TableName> tableNamesList,
java.util.List<HTableDescriptor> descriptors,
java.lang.String regex)
Called before a getTableDescriptors request has been processed.
|
Result |
preIncrement(ObserverContext<RegionCoprocessorEnvironment> c,
Increment increment)
Called before Increment.
|
Result |
preIncrementAfterRowLock(ObserverContext<RegionCoprocessorEnvironment> c,
Increment increment)
Called before Increment but after acquiring rowlock.
|
long |
preIncrementColumnValue(ObserverContext<RegionCoprocessorEnvironment> c,
byte[] row,
byte[] family,
byte[] qualifier,
long amount,
boolean writeToWAL)
Called before incrementColumnValue
|
void |
preListProcedures(ObserverContext<MasterCoprocessorEnvironment> ctx)
Called before a listProcedures request has been processed.
|
void |
preListSnapshot(ObserverContext<MasterCoprocessorEnvironment> ctx,
HBaseProtos.SnapshotDescription snapshot)
Called before listSnapshots request has been processed.
|
void |
preMerge(ObserverContext<RegionServerCoprocessorEnvironment> ctx,
Region regionA,
Region regionB)
Called before the regions merge.
|
void |
preMergeCommit(ObserverContext<RegionServerCoprocessorEnvironment> ctx,
Region regionA,
Region regionB,
java.util.List<Mutation> metaEntries)
This will be called before PONR step as part of regions merge transaction.
|
void |
preModifyColumn(ObserverContext<MasterCoprocessorEnvironment> c,
TableName tableName,
HColumnDescriptor descriptor)
Called prior to modifying a column family's attributes.
|
void |
preModifyNamespace(ObserverContext<MasterCoprocessorEnvironment> ctx,
NamespaceDescriptor ns)
Called prior to modifying a namespace's properties.
|
void |
preModifyTable(ObserverContext<MasterCoprocessorEnvironment> c,
TableName tableName,
HTableDescriptor htd)
Called prior to modifying a table's properties.
|
void |
preMove(ObserverContext<MasterCoprocessorEnvironment> c,
HRegionInfo region,
ServerName srcServer,
ServerName destServer)
Called prior to moving a given region from one region server to another.
|
void |
preMoveServers(ObserverContext<MasterCoprocessorEnvironment> ctx,
java.util.Set<HostAndPort> servers,
java.lang.String targetGroup)
Called before servers are moved to target region server group
|
void |
preMoveTables(ObserverContext<MasterCoprocessorEnvironment> ctx,
java.util.Set<TableName> tables,
java.lang.String targetGroup)
Called before tables are moved to target region server group
|
void |
preOpen(ObserverContext<RegionCoprocessorEnvironment> e)
Called before the region is reported as open to the master.
|
void |
prePrepareBulkLoad(ObserverContext<RegionCoprocessorEnvironment> ctx,
SecureBulkLoadProtos.PrepareBulkLoadRequest request)
Authorization check for
SecureBulkLoadProtocol.prepareBulkLoad()
|
void |
prePut(ObserverContext<RegionCoprocessorEnvironment> c,
Put put,
WALEdit edit,
Durability durability)
Called before the client stores a value.
|
void |
preRegionOffline(ObserverContext<MasterCoprocessorEnvironment> c,
HRegionInfo regionInfo)
Called prior to marking a given region as offline.
|
void |
preRemoveRSGroup(ObserverContext<MasterCoprocessorEnvironment> ctx,
java.lang.String name)
Called before a region server group is removed
|
void |
preReplicateLogEntries(ObserverContext<RegionServerCoprocessorEnvironment> ctx,
java.util.List<AdminProtos.WALEntry> entries,
CellScanner cells)
This will be called before executing replication request to shipping log entries.
|
void |
preRestoreSnapshot(ObserverContext<MasterCoprocessorEnvironment> ctx,
HBaseProtos.SnapshotDescription snapshot,
HTableDescriptor hTableDescriptor)
Called before a snapshot is restored.
|
void |
preRollBackMerge(ObserverContext<RegionServerCoprocessorEnvironment> ctx,
Region regionA,
Region regionB)
This will be called before the roll back of the regions merge.
|
void |
preRollWALWriterRequest(ObserverContext<RegionServerCoprocessorEnvironment> ctx)
This will be called before executing user request to roll a region server WAL.
|
void |
preScannerClose(ObserverContext<RegionCoprocessorEnvironment> c,
InternalScanner s)
Called before the client closes a scanner.
|
boolean |
preScannerNext(ObserverContext<RegionCoprocessorEnvironment> c,
InternalScanner s,
java.util.List<Result> result,
int limit,
boolean hasNext)
Called before the client asks for the next row on a scanner.
|
RegionScanner |
preScannerOpen(ObserverContext<RegionCoprocessorEnvironment> c,
Scan scan,
RegionScanner s)
Called before the client opens a new scanner.
|
void |
preSetNamespaceQuota(ObserverContext<MasterCoprocessorEnvironment> ctx,
java.lang.String namespace,
QuotaProtos.Quotas quotas)
Called before the quota for the namespace is stored.
|
void |
preSetTableQuota(ObserverContext<MasterCoprocessorEnvironment> ctx,
TableName tableName,
QuotaProtos.Quotas quotas)
Called before the quota for the table is stored.
|
void |
preSetUserQuota(ObserverContext<MasterCoprocessorEnvironment> ctx,
java.lang.String userName,
QuotaProtos.Quotas quotas)
Called before the quota for the user is stored.
|
void |
preSetUserQuota(ObserverContext<MasterCoprocessorEnvironment> ctx,
java.lang.String userName,
java.lang.String namespace,
QuotaProtos.Quotas quotas)
Called before the quota for the user on the specified namespace is stored.
|
void |
preSetUserQuota(ObserverContext<MasterCoprocessorEnvironment> ctx,
java.lang.String userName,
TableName tableName,
QuotaProtos.Quotas quotas)
Called before the quota for the user on the specified table is stored.
|
void |
preShutdown(ObserverContext<MasterCoprocessorEnvironment> c)
Called prior to shutting down the full HBase cluster, including this
HMaster process. |
void |
preSnapshot(ObserverContext<MasterCoprocessorEnvironment> ctx,
HBaseProtos.SnapshotDescription snapshot,
HTableDescriptor hTableDescriptor)
Called before a new snapshot is taken.
|
void |
preSplit(ObserverContext<RegionCoprocessorEnvironment> e)
Called before the region is split.
|
void |
preSplit(ObserverContext<RegionCoprocessorEnvironment> e,
byte[] splitRow)
Called before the region is split.
|
void |
preStopMaster(ObserverContext<MasterCoprocessorEnvironment> c)
Called immediately prior to stopping this
HMaster process. |
void |
preStopRegionServer(ObserverContext<RegionServerCoprocessorEnvironment> env)
Called before stopping region server.
|
void |
preTableFlush(ObserverContext<MasterCoprocessorEnvironment> ctx,
TableName tableName)
Called before the table memstore is flushed to disk.
|
void |
preTruncateTable(ObserverContext<MasterCoprocessorEnvironment> c,
TableName tableName)
Called before
HMaster truncates a
table. |
void |
preUnassign(ObserverContext<MasterCoprocessorEnvironment> c,
HRegionInfo regionInfo,
boolean force)
Called prior to unassigning a given region.
|
void |
requireNamespacePermission(java.lang.String request,
java.lang.String namespace,
Permission.Action... permissions)
Checks that the user has the given global or namespace permission.
|
void |
requireNamespacePermission(java.lang.String request,
java.lang.String namespace,
TableName tableName,
java.util.Map<byte[],? extends java.util.Collection<byte[]>> familyMap,
Permission.Action... permissions)
Checks that the user has the given global or namespace permission.
|
void |
revoke(RpcController controller,
AccessControlProtos.RevokeRequest request,
<any> done)
rpc Revoke(.hbase.pb.RevokeRequest) returns (.hbase.pb.RevokeResponse); |
void |
start(CoprocessorEnvironment env) |
void |
stop(CoprocessorEnvironment env) |
postAddColumn, postAddColumnHandler, postAddRSGroup, postAssign, postBalance, postBalanceRSGroup, postBalanceSwitch, postCloneSnapshot, postCreateNamespace, postCreateTable, postDeleteColumnHandler, postDeleteSnapshot, postDeleteTableHandler, postDisableTable, postDisableTableHandler, postEnableTable, postEnableTableHandler, postGetNamespaceDescriptor, postGetTableDescriptors, postListSnapshot, postModifyColumn, postModifyColumnHandler, postModifyNamespace, postModifyTableHandler, postMove, postMoveServers, postMoveTables, postRegionOffline, postRemoveRSGroup, postRestoreSnapshot, postSetNamespaceQuota, postSetTableQuota, postSetUserQuota, postSetUserQuota, postSetUserQuota, postSnapshot, postTableFlush, postTruncateTableHandler, postUnassign, preAddColumnHandler, preCreateTableHandler, preDeleteColumnHandler, preDeleteTableHandler, preDisableTableHandler, preEnableTableHandler, preGetTableDescriptors, preGetTableNames, preListNamespaceDescriptors, preMasterInitialization, preModifyColumnHandler, preModifyTableHandler, preTruncateTableHandlerpostAppend, postBatchMutate, postBatchMutateIndispensably, postBulkLoadHFile, postBulkLoadHFile, postCheckAndDelete, postCheckAndPut, postClose, postCloseRegionOperation, postCommitStoreFile, postCompact, postCompact, postCompactSelection, postCompactSelection, postCompleteSplit, postExists, postFlush, postFlush, postGetClosestRowBefore, postGetOp, postIncrement, postIncrementColumnValue, postInstantiateDeleteTracker, postRollBackSplit, postScannerFilterRow, postScannerNext, postSplit, postStartRegionOperation, postStoreFileReaderOpen, postWALRestore, postWALRestore, preCommitStoreFile, preCompact, preCompactScannerOpen, preCompactScannerOpen, preCompactSelection, preCompactSelection, preFlush, preFlushScannerOpen, prePrepareTimeStampForDeleteVersion, preRollBackSplit, preSplitAfterPONR, preSplitBeforePONR, preStoreFileReaderOpen, preStoreScannerOpen, preWALRestore, preWALRestorepublic Region getRegion()
public TableAuthManager getAuthManager()
public void requireNamespacePermission(java.lang.String request,
java.lang.String namespace,
Permission.Action... permissions)
throws java.io.IOException
namespace - permissions - Actions being requestedjava.io.IOExceptionpublic void requireNamespacePermission(java.lang.String request,
java.lang.String namespace,
TableName tableName,
java.util.Map<byte[],? extends java.util.Collection<byte[]>> familyMap,
Permission.Action... permissions)
throws java.io.IOException
namespace - permissions - Actions being requestedjava.io.IOExceptionpublic void start(CoprocessorEnvironment env) throws java.io.IOException
start in interface Coprocessorstart in class BaseMasterAndRegionObserverjava.io.IOExceptionpublic void stop(CoprocessorEnvironment env)
stop in interface Coprocessorstop in class BaseMasterAndRegionObserverpublic void preCreateTable(ObserverContext<MasterCoprocessorEnvironment> c, HTableDescriptor desc, HRegionInfo[] regions) throws java.io.IOException
MasterObserverHMaster. Called as part of create
table RPC call.
It can't bypass the default action, e.g., ctx.bypass() won't have effect.preCreateTable in interface MasterObserverpreCreateTable in class BaseMasterAndRegionObserverc - the environment to interact with the framework and masterdesc - the HTableDescriptor for the tableregions - the initial regions created for the tablejava.io.IOExceptionpublic void postCreateTableHandler(ObserverContext<MasterCoprocessorEnvironment> c, HTableDescriptor desc, HRegionInfo[] regions) throws java.io.IOException
MasterObserverpostCreateTableHandler in interface MasterObserverpostCreateTableHandler in class BaseMasterAndRegionObserverc - the environment to interact with the framework and masterdesc - the HTableDescriptor for the tableregions - the initial regions created for the tablejava.io.IOExceptionpublic void preDeleteTable(ObserverContext<MasterCoprocessorEnvironment> c, TableName tableName) throws java.io.IOException
MasterObserverHMaster deletes a
table. Called as part of delete table RPC call.
It can't bypass the default action, e.g., ctx.bypass() won't have effect.preDeleteTable in interface MasterObserverpreDeleteTable in class BaseMasterAndRegionObserverc - the environment to interact with the framework and mastertableName - the name of the tablejava.io.IOExceptionpublic void postDeleteTable(ObserverContext<MasterCoprocessorEnvironment> c, TableName tableName) throws java.io.IOException
MasterObserverpostDeleteTable in interface MasterObserverpostDeleteTable in class BaseMasterAndRegionObserverc - the environment to interact with the framework and mastertableName - the name of the tablejava.io.IOExceptionpublic void preTruncateTable(ObserverContext<MasterCoprocessorEnvironment> c, TableName tableName) throws java.io.IOException
MasterObserverHMaster truncates a
table. Called as part of truncate table RPC call.
It can't bypass the default action, e.g., ctx.bypass() won't have effect.preTruncateTable in interface MasterObserverpreTruncateTable in class BaseMasterAndRegionObserverc - the environment to interact with the framework and mastertableName - the name of the tablejava.io.IOExceptionpublic void postTruncateTable(ObserverContext<MasterCoprocessorEnvironment> ctx, TableName tableName) throws java.io.IOException
MasterObserverpostTruncateTable in interface MasterObserverpostTruncateTable in class BaseMasterAndRegionObserverctx - the environment to interact with the framework and mastertableName - the name of the tablejava.io.IOExceptionpublic void preModifyTable(ObserverContext<MasterCoprocessorEnvironment> c, TableName tableName, HTableDescriptor htd) throws java.io.IOException
MasterObserverpreModifyTable in interface MasterObserverpreModifyTable in class BaseMasterAndRegionObserverc - the environment to interact with the framework and mastertableName - the name of the tablehtd - the HTableDescriptorjava.io.IOExceptionpublic void postModifyTable(ObserverContext<MasterCoprocessorEnvironment> c, TableName tableName, HTableDescriptor htd) throws java.io.IOException
MasterObserverpostModifyTable in interface MasterObserverpostModifyTable in class BaseMasterAndRegionObserverc - the environment to interact with the framework and mastertableName - the name of the tablehtd - the HTableDescriptorjava.io.IOExceptionpublic void preAddColumn(ObserverContext<MasterCoprocessorEnvironment> c, TableName tableName, HColumnDescriptor column) throws java.io.IOException
MasterObserverpreAddColumn in interface MasterObserverpreAddColumn in class BaseMasterAndRegionObserverc - the environment to interact with the framework and mastertableName - the name of the tablecolumn - the HColumnDescriptorjava.io.IOExceptionpublic void preModifyColumn(ObserverContext<MasterCoprocessorEnvironment> c, TableName tableName, HColumnDescriptor descriptor) throws java.io.IOException
MasterObserverpreModifyColumn in interface MasterObserverpreModifyColumn in class BaseMasterAndRegionObserverc - the environment to interact with the framework and mastertableName - the name of the tabledescriptor - the HColumnDescriptorjava.io.IOExceptionpublic void preDeleteColumn(ObserverContext<MasterCoprocessorEnvironment> c, TableName tableName, byte[] col) throws java.io.IOException
MasterObserverpreDeleteColumn in interface MasterObserverpreDeleteColumn in class BaseMasterAndRegionObserverc - the environment to interact with the framework and mastertableName - the name of the tablecol - the columnjava.io.IOExceptionpublic void postDeleteColumn(ObserverContext<MasterCoprocessorEnvironment> c, TableName tableName, byte[] col) throws java.io.IOException
MasterObserverpostDeleteColumn in interface MasterObserverpostDeleteColumn in class BaseMasterAndRegionObserverc - the environment to interact with the framework and mastertableName - the name of the tablecol - the columnjava.io.IOExceptionpublic void preEnableTable(ObserverContext<MasterCoprocessorEnvironment> c, TableName tableName) throws java.io.IOException
MasterObserverpreEnableTable in interface MasterObserverpreEnableTable in class BaseMasterAndRegionObserverc - the environment to interact with the framework and mastertableName - the name of the tablejava.io.IOExceptionpublic void preDisableTable(ObserverContext<MasterCoprocessorEnvironment> c, TableName tableName) throws java.io.IOException
MasterObserverpreDisableTable in interface MasterObserverpreDisableTable in class BaseMasterAndRegionObserverc - the environment to interact with the framework and mastertableName - the name of the tablejava.io.IOExceptionpublic void preAbortProcedure(ObserverContext<MasterCoprocessorEnvironment> ctx, ProcedureExecutor<MasterProcedureEnv> procEnv, long procId) throws java.io.IOException
MasterObserverpreAbortProcedure in interface MasterObserverpreAbortProcedure in class BaseMasterAndRegionObserverctx - the environment to interact with the framework and masterjava.io.IOExceptionpublic void postAbortProcedure(ObserverContext<MasterCoprocessorEnvironment> ctx) throws java.io.IOException
MasterObserverpostAbortProcedure in interface MasterObserverpostAbortProcedure in class BaseMasterAndRegionObserverctx - the environment to interact with the framework and masterjava.io.IOExceptionpublic void preListProcedures(ObserverContext<MasterCoprocessorEnvironment> ctx) throws java.io.IOException
MasterObserverpreListProcedures in interface MasterObserverpreListProcedures in class BaseMasterAndRegionObserverctx - the environment to interact with the framework and masterjava.io.IOExceptionpublic void postListProcedures(ObserverContext<MasterCoprocessorEnvironment> ctx, java.util.List<ProcedureInfo> procInfoList) throws java.io.IOException
MasterObserverpostListProcedures in interface MasterObserverpostListProcedures in class BaseMasterAndRegionObserverctx - the environment to interact with the framework and masterprocInfoList - the list of procedures about to be returnedjava.io.IOExceptionpublic void preMove(ObserverContext<MasterCoprocessorEnvironment> c, HRegionInfo region, ServerName srcServer, ServerName destServer) throws java.io.IOException
MasterObserverpreMove in interface MasterObserverpreMove in class BaseMasterAndRegionObserverc - the environment to interact with the framework and masterregion - the HRegionInfosrcServer - the source ServerNamedestServer - the destination ServerNamejava.io.IOExceptionpublic void preAssign(ObserverContext<MasterCoprocessorEnvironment> c, HRegionInfo regionInfo) throws java.io.IOException
MasterObserverpreAssign in interface MasterObserverpreAssign in class BaseMasterAndRegionObserverc - the environment to interact with the framework and masterregionInfo - the regionInfo of the regionjava.io.IOExceptionpublic void preUnassign(ObserverContext<MasterCoprocessorEnvironment> c, HRegionInfo regionInfo, boolean force) throws java.io.IOException
MasterObserverpreUnassign in interface MasterObserverpreUnassign in class BaseMasterAndRegionObserverc - the environment to interact with the framework and masterforce - whether to force unassignment or notjava.io.IOExceptionpublic void preRegionOffline(ObserverContext<MasterCoprocessorEnvironment> c, HRegionInfo regionInfo) throws java.io.IOException
MasterObserverctx.bypass() will not have any
impact on this hook.preRegionOffline in interface MasterObserverpreRegionOffline in class BaseMasterAndRegionObserverc - the environment to interact with the framework and masterjava.io.IOExceptionpublic void preBalance(ObserverContext<MasterCoprocessorEnvironment> c) throws java.io.IOException
MasterObserverpreBalance in interface MasterObserverpreBalance in class BaseMasterAndRegionObserverc - the environment to interact with the framework and masterjava.io.IOExceptionpublic boolean preBalanceSwitch(ObserverContext<MasterCoprocessorEnvironment> c, boolean newValue) throws java.io.IOException
MasterObserverpreBalanceSwitch in interface MasterObserverpreBalanceSwitch in class BaseMasterAndRegionObserverc - the coprocessor instance's environmentnewValue - the new flag value submitted in the calljava.io.IOExceptionpublic void preShutdown(ObserverContext<MasterCoprocessorEnvironment> c) throws java.io.IOException
MasterObserverHMaster process.preShutdown in interface MasterObserverpreShutdown in class BaseMasterAndRegionObserverjava.io.IOExceptionpublic void preStopMaster(ObserverContext<MasterCoprocessorEnvironment> c) throws java.io.IOException
MasterObserverHMaster process.preStopMaster in interface MasterObserverpreStopMaster in class BaseMasterAndRegionObserverjava.io.IOExceptionpublic void postStartMaster(ObserverContext<MasterCoprocessorEnvironment> ctx) throws java.io.IOException
MasterObserverpostStartMaster in interface MasterObserverpostStartMaster in class BaseMasterAndRegionObserverjava.io.IOExceptionpublic void preSnapshot(ObserverContext<MasterCoprocessorEnvironment> ctx, HBaseProtos.SnapshotDescription snapshot, HTableDescriptor hTableDescriptor) throws java.io.IOException
MasterObserverpreSnapshot in interface MasterObserverpreSnapshot in class BaseMasterAndRegionObserverctx - the environment to interact with the framework and mastersnapshot - the SnapshotDescriptor for the snapshothTableDescriptor - the hTableDescriptor of the table to snapshotjava.io.IOExceptionpublic void preListSnapshot(ObserverContext<MasterCoprocessorEnvironment> ctx, HBaseProtos.SnapshotDescription snapshot) throws java.io.IOException
MasterObserverpreListSnapshot in interface MasterObserverpreListSnapshot in class BaseMasterAndRegionObserverctx - the environment to interact with the framework and mastersnapshot - the SnapshotDescriptor of the snapshot to listjava.io.IOExceptionpublic void preCloneSnapshot(ObserverContext<MasterCoprocessorEnvironment> ctx, HBaseProtos.SnapshotDescription snapshot, HTableDescriptor hTableDescriptor) throws java.io.IOException
MasterObserverpreCloneSnapshot in interface MasterObserverpreCloneSnapshot in class BaseMasterAndRegionObserverctx - the environment to interact with the framework and mastersnapshot - the SnapshotDescriptor for the snapshothTableDescriptor - the hTableDescriptor of the table to createjava.io.IOExceptionpublic void preRestoreSnapshot(ObserverContext<MasterCoprocessorEnvironment> ctx, HBaseProtos.SnapshotDescription snapshot, HTableDescriptor hTableDescriptor) throws java.io.IOException
MasterObserverpreRestoreSnapshot in interface MasterObserverpreRestoreSnapshot in class BaseMasterAndRegionObserverctx - the environment to interact with the framework and mastersnapshot - the SnapshotDescriptor for the snapshothTableDescriptor - the hTableDescriptor of the table to restorejava.io.IOExceptionpublic void preDeleteSnapshot(ObserverContext<MasterCoprocessorEnvironment> ctx, HBaseProtos.SnapshotDescription snapshot) throws java.io.IOException
MasterObserverpreDeleteSnapshot in interface MasterObserverpreDeleteSnapshot in class BaseMasterAndRegionObserverctx - the environment to interact with the framework and mastersnapshot - the SnapshotDescriptor of the snapshot to deletejava.io.IOExceptionpublic void preCreateNamespace(ObserverContext<MasterCoprocessorEnvironment> ctx, NamespaceDescriptor ns) throws java.io.IOException
MasterObserverHMaster.
It can't bypass the default action, e.g., ctx.bypass() won't have effect.preCreateNamespace in interface MasterObserverpreCreateNamespace in class BaseMasterAndRegionObserverctx - the environment to interact with the framework and masterns - the NamespaceDescriptor for the tablejava.io.IOExceptionpublic void preDeleteNamespace(ObserverContext<MasterCoprocessorEnvironment> ctx, java.lang.String namespace) throws java.io.IOException
MasterObserverHMaster deletes a
namespace
It can't bypass the default action, e.g., ctx.bypass() won't have effect.preDeleteNamespace in interface MasterObserverpreDeleteNamespace in class BaseMasterAndRegionObserverctx - the environment to interact with the framework and masternamespace - the name of the namespacejava.io.IOExceptionpublic void postDeleteNamespace(ObserverContext<MasterCoprocessorEnvironment> ctx, java.lang.String namespace) throws java.io.IOException
MasterObserverpostDeleteNamespace in interface MasterObserverpostDeleteNamespace in class BaseMasterAndRegionObserverctx - the environment to interact with the framework and masternamespace - the name of the namespacejava.io.IOExceptionpublic void preModifyNamespace(ObserverContext<MasterCoprocessorEnvironment> ctx, NamespaceDescriptor ns) throws java.io.IOException
MasterObserverpreModifyNamespace in interface MasterObserverpreModifyNamespace in class BaseMasterAndRegionObserverctx - the environment to interact with the framework and masterns - the NamespaceDescriptorjava.io.IOExceptionpublic void preGetNamespaceDescriptor(ObserverContext<MasterCoprocessorEnvironment> ctx, java.lang.String namespace) throws java.io.IOException
MasterObserverpreGetNamespaceDescriptor in interface MasterObserverpreGetNamespaceDescriptor in class BaseMasterAndRegionObserverctx - the environment to interact with the framework and masternamespace - the name of the namespacejava.io.IOExceptionpublic void postListNamespaceDescriptors(ObserverContext<MasterCoprocessorEnvironment> ctx, java.util.List<NamespaceDescriptor> descriptors) throws java.io.IOException
MasterObserverpostListNamespaceDescriptors in interface MasterObserverpostListNamespaceDescriptors in class BaseMasterAndRegionObserverctx - the environment to interact with the framework and masterdescriptors - the list of descriptors about to be returnedjava.io.IOExceptionpublic void preTableFlush(ObserverContext<MasterCoprocessorEnvironment> ctx, TableName tableName) throws java.io.IOException
MasterObserverpreTableFlush in interface MasterObserverpreTableFlush in class BaseMasterAndRegionObserverctx - the environment to interact with the framework and mastertableName - the name of the tablejava.io.IOExceptionpublic void preOpen(ObserverContext<RegionCoprocessorEnvironment> e) throws java.io.IOException
RegionObserverpreOpen in interface RegionObserverpreOpen in class BaseRegionObservere - the environment provided by the region serverjava.io.IOException - if an error occurred on the coprocessorpublic void postOpen(ObserverContext<RegionCoprocessorEnvironment> c)
RegionObserverpostOpen in interface RegionObserverpostOpen in class BaseRegionObserverc - the environment provided by the region serverpublic void postLogReplay(ObserverContext<RegionCoprocessorEnvironment> c)
RegionObserverpostLogReplay in interface RegionObserverpostLogReplay in class BaseRegionObserverc - the environment provided by the region serverpublic void preFlush(ObserverContext<RegionCoprocessorEnvironment> e) throws java.io.IOException
RegionObserverpreFlush in interface RegionObserverpreFlush in class BaseRegionObservere - the environment provided by the region serverjava.io.IOException - if an error occurred on the coprocessorpublic void preSplit(ObserverContext<RegionCoprocessorEnvironment> e) throws java.io.IOException
RegionObserverpreSplit in interface RegionObserverpreSplit in class BaseRegionObservere - the environment provided by the region server
(e.getRegion() returns the parent region)java.io.IOException - if an error occurred on the coprocessorpublic void preSplit(ObserverContext<RegionCoprocessorEnvironment> e, byte[] splitRow) throws java.io.IOException
RegionObserverpreSplit in interface RegionObserverpreSplit in class BaseRegionObservere - the environment provided by the region server
(e.getRegion() returns the parent region)java.io.IOException - if an error occurred on the coprocessorpublic InternalScanner preCompact(ObserverContext<RegionCoprocessorEnvironment> e, Store store, InternalScanner scanner, ScanType scanType) throws java.io.IOException
RegionObserverStoreFiles selected for compaction into a new
StoreFile. To override or modify the compaction process, implementing classes have two
options:
InternalScanner with a custom implementation that is returned
from this method. The custom scanner can then inspect
KeyValues from the wrapped
scanner, applying its own policy to what gets written.ObserverContext.bypass() and provide a
custom implementation for writing of new StoreFiles. Note: any implementations
bypassing core compaction using this approach must write out new store files themselves or the
existing data will no longer be available after compaction.preCompact in interface RegionObserverpreCompact in class BaseRegionObservere - the environment provided by the region serverstore - the store being compactedscanner - the scanner over existing data used in the store file rewritingscanType - type of Scannull unless the
implementation is writing new store files on its own.java.io.IOException - if an error occurred on the coprocessorpublic void preGetClosestRowBefore(ObserverContext<RegionCoprocessorEnvironment> c, byte[] row, byte[] family, Result result) throws java.io.IOException
RegionObserverCall CoprocessorEnvironment#bypass to skip default actions
Call CoprocessorEnvironment#complete to skip any subsequent chained coprocessors
preGetClosestRowBefore in interface RegionObserverpreGetClosestRowBefore in class BaseRegionObserverc - the environment provided by the region serverrow - the rowfamily - the familyresult - The result to return to the client if default processing
is bypassed. Can be modified. Will not be used if default processing
is not bypassed.java.io.IOException - if an error occurred on the coprocessorpublic void preGetOp(ObserverContext<RegionCoprocessorEnvironment> c, Get get, java.util.List<Cell> result) throws java.io.IOException
RegionObserverCall CoprocessorEnvironment#bypass to skip default actions
Call CoprocessorEnvironment#complete to skip any subsequent chained coprocessors
preGetOp in interface RegionObserverpreGetOp in class BaseRegionObserverc - the environment provided by the region serverget - the Get requestresult - The result to return to the client if default processing
is bypassed. Can be modified. Will not be used if default processing
is not bypassed.java.io.IOException - if an error occurred on the coprocessorpublic boolean preExists(ObserverContext<RegionCoprocessorEnvironment> c, Get get, boolean exists) throws java.io.IOException
RegionObserverCall CoprocessorEnvironment#bypass to skip default actions
Call CoprocessorEnvironment#complete to skip any subsequent chained coprocessors
preExists in interface RegionObserverpreExists in class BaseRegionObserverc - the environment provided by the region serverget - the Get requestjava.io.IOException - if an error occurred on the coprocessorpublic void prePut(ObserverContext<RegionCoprocessorEnvironment> c, Put put, WALEdit edit, Durability durability) throws java.io.IOException
RegionObserverCall CoprocessorEnvironment#bypass to skip default actions
Call CoprocessorEnvironment#complete to skip any subsequent chained coprocessors
prePut in interface RegionObserverprePut in class BaseRegionObserverc - the environment provided by the region serverput - The Put objectedit - The WALEdit object that will be written to the waldurability - Persistence guarantee for this Putjava.io.IOException - if an error occurred on the coprocessorpublic void postPut(ObserverContext<RegionCoprocessorEnvironment> c, Put put, WALEdit edit, Durability durability)
RegionObserverCall CoprocessorEnvironment#complete to skip any subsequent chained coprocessors
postPut in interface RegionObserverpostPut in class BaseRegionObserverc - the environment provided by the region serverput - The Put objectedit - The WALEdit object for the waldurability - Persistence guarantee for this Putpublic void preDelete(ObserverContext<RegionCoprocessorEnvironment> c, Delete delete, WALEdit edit, Durability durability) throws java.io.IOException
RegionObserverCall CoprocessorEnvironment#bypass to skip default actions
Call CoprocessorEnvironment#complete to skip any subsequent chained coprocessors
preDelete in interface RegionObserverpreDelete in class BaseRegionObserverc - the environment provided by the region serverdelete - The Delete objectedit - The WALEdit object for the waldurability - Persistence guarantee for this Deletejava.io.IOException - if an error occurred on the coprocessorpublic void preBatchMutate(ObserverContext<RegionCoprocessorEnvironment> c, MiniBatchOperationInProgress<Mutation> miniBatchOp) throws java.io.IOException
RegionObserverMiniBatchOperationInProgress.setOperationStatus(int, OperationStatus)),
RegionObserver can make Region to skip these Mutations.preBatchMutate in interface RegionObserverpreBatchMutate in class BaseRegionObserverc - the environment provided by the region serverminiBatchOp - batch of Mutations getting applied to region.java.io.IOException - if an error occurred on the coprocessorpublic void postDelete(ObserverContext<RegionCoprocessorEnvironment> c, Delete delete, WALEdit edit, Durability durability) throws java.io.IOException
RegionObserverCall CoprocessorEnvironment#complete to skip any subsequent chained coprocessors
postDelete in interface RegionObserverpostDelete in class BaseRegionObserverc - the environment provided by the region serverdelete - The Delete objectedit - The WALEdit object for the waldurability - Persistence guarantee for this Deletejava.io.IOException - if an error occurred on the coprocessorpublic boolean preCheckAndPut(ObserverContext<RegionCoprocessorEnvironment> c, byte[] row, byte[] family, byte[] qualifier, CompareFilter.CompareOp compareOp, ByteArrayComparable comparator, Put put, boolean result) throws java.io.IOException
RegionObserverCall CoprocessorEnvironment#bypass to skip default actions
Call CoprocessorEnvironment#complete to skip any subsequent chained coprocessors
preCheckAndPut in interface RegionObserverpreCheckAndPut in class BaseRegionObserverc - the environment provided by the region serverrow - row to checkfamily - column familyqualifier - column qualifiercompareOp - the comparison operationcomparator - the comparatorput - data to put if check succeedsjava.io.IOException - if an error occurred on the coprocessorpublic boolean preCheckAndPutAfterRowLock(ObserverContext<RegionCoprocessorEnvironment> c, byte[] row, byte[] family, byte[] qualifier, CompareFilter.CompareOp compareOp, ByteArrayComparable comparator, Put put, boolean result) throws java.io.IOException
RegionObserverNote: Caution to be taken for not doing any long time operation in this hook. Row will be locked for longer time. Trying to acquire lock on another row, within this, can lead to potential deadlock.
Call CoprocessorEnvironment#bypass to skip default actions
Call CoprocessorEnvironment#complete to skip any subsequent chained coprocessors
preCheckAndPutAfterRowLock in interface RegionObserverpreCheckAndPutAfterRowLock in class BaseRegionObserverc - the environment provided by the region serverrow - row to checkfamily - column familyqualifier - column qualifiercompareOp - the comparison operationcomparator - the comparatorput - data to put if check succeedsjava.io.IOException - if an error occurred on the coprocessorpublic boolean preCheckAndDelete(ObserverContext<RegionCoprocessorEnvironment> c, byte[] row, byte[] family, byte[] qualifier, CompareFilter.CompareOp compareOp, ByteArrayComparable comparator, Delete delete, boolean result) throws java.io.IOException
RegionObserverCall CoprocessorEnvironment#bypass to skip default actions
Call CoprocessorEnvironment#complete to skip any subsequent chained coprocessors
preCheckAndDelete in interface RegionObserverpreCheckAndDelete in class BaseRegionObserverc - the environment provided by the region serverrow - row to checkfamily - column familyqualifier - column qualifiercompareOp - the comparison operationcomparator - the comparatordelete - delete to commit if check succeedsjava.io.IOException - if an error occurred on the coprocessorpublic boolean preCheckAndDeleteAfterRowLock(ObserverContext<RegionCoprocessorEnvironment> c, byte[] row, byte[] family, byte[] qualifier, CompareFilter.CompareOp compareOp, ByteArrayComparable comparator, Delete delete, boolean result) throws java.io.IOException
RegionObserverNote: Caution to be taken for not doing any long time operation in this hook. Row will be locked for longer time. Trying to acquire lock on another row, within this, can lead to potential deadlock.
Call CoprocessorEnvironment#bypass to skip default actions
Call CoprocessorEnvironment#complete to skip any subsequent chained coprocessors
preCheckAndDeleteAfterRowLock in interface RegionObserverpreCheckAndDeleteAfterRowLock in class BaseRegionObserverc - the environment provided by the region serverrow - row to checkfamily - column familyqualifier - column qualifiercompareOp - the comparison operationcomparator - the comparatordelete - delete to commit if check succeedsjava.io.IOException - if an error occurred on the coprocessorpublic long preIncrementColumnValue(ObserverContext<RegionCoprocessorEnvironment> c, byte[] row, byte[] family, byte[] qualifier, long amount, boolean writeToWAL) throws java.io.IOException
RegionObserverCall CoprocessorEnvironment#bypass to skip default actions
Call CoprocessorEnvironment#complete to skip any subsequent chained coprocessors
preIncrementColumnValue in interface RegionObserverpreIncrementColumnValue in class BaseRegionObserverc - the environment provided by the region serverrow - row to checkfamily - column familyqualifier - column qualifieramount - long amount to incrementwriteToWAL - true if the change should be written to the WALjava.io.IOException - if an error occurred on the coprocessorpublic Result preAppend(ObserverContext<RegionCoprocessorEnvironment> c, Append append) throws java.io.IOException
RegionObserverCall CoprocessorEnvironment#bypass to skip default actions
Call CoprocessorEnvironment#complete to skip any subsequent chained coprocessors
preAppend in interface RegionObserverpreAppend in class BaseRegionObserverc - the environment provided by the region serverappend - Append objectjava.io.IOException - if an error occurred on the coprocessorpublic Result preAppendAfterRowLock(ObserverContext<RegionCoprocessorEnvironment> c, Append append) throws java.io.IOException
RegionObserverNote: Caution to be taken for not doing any long time operation in this hook. Row will be locked for longer time. Trying to acquire lock on another row, within this, can lead to potential deadlock.
Call CoprocessorEnvironment#bypass to skip default actions
Call CoprocessorEnvironment#complete to skip any subsequent chained coprocessors
preAppendAfterRowLock in interface RegionObserverpreAppendAfterRowLock in class BaseRegionObserverc - the environment provided by the region serverappend - Append objectjava.io.IOException - if an error occurred on the coprocessorpublic Result preIncrement(ObserverContext<RegionCoprocessorEnvironment> c, Increment increment) throws java.io.IOException
RegionObserverCall CoprocessorEnvironment#bypass to skip default actions
Call CoprocessorEnvironment#complete to skip any subsequent chained coprocessors
preIncrement in interface RegionObserverpreIncrement in class BaseRegionObserverc - the environment provided by the region serverincrement - increment objectjava.io.IOException - if an error occurred on the coprocessorpublic Result preIncrementAfterRowLock(ObserverContext<RegionCoprocessorEnvironment> c, Increment increment) throws java.io.IOException
RegionObserverNote: Caution to be taken for not doing any long time operation in this hook. Row will be locked for longer time. Trying to acquire lock on another row, within this, can lead to potential deadlock.
Call CoprocessorEnvironment#bypass to skip default actions
Call CoprocessorEnvironment#complete to skip any subsequent chained coprocessors
preIncrementAfterRowLock in interface RegionObserverpreIncrementAfterRowLock in class BaseRegionObserverc - the environment provided by the region serverincrement - increment objectjava.io.IOException - if an error occurred on the coprocessorpublic Cell postMutationBeforeWAL(ObserverContext<RegionCoprocessorEnvironment> ctx, RegionObserver.MutationType opType, Mutation mutation, Cell oldCell, Cell newCell) throws java.io.IOException
RegionObserverObserverContext.bypass() has no
effect in this hook.postMutationBeforeWAL in interface RegionObserverpostMutationBeforeWAL in class BaseRegionObserverctx - the environment provided by the region serveropType - the operation typemutation - the current mutationoldCell - old cell containing previous valuenewCell - the new cell containing the computed valuejava.io.IOExceptionpublic RegionScanner preScannerOpen(ObserverContext<RegionCoprocessorEnvironment> c, Scan scan, RegionScanner s) throws java.io.IOException
RegionObserverCall CoprocessorEnvironment#bypass to skip default actions
Call CoprocessorEnvironment#complete to skip any subsequent chained coprocessors
preScannerOpen in interface RegionObserverpreScannerOpen in class BaseRegionObserverc - the environment provided by the region serverscan - the Scan specifications - if not null, the base scannerjava.io.IOException - if an error occurred on the coprocessorpublic RegionScanner postScannerOpen(ObserverContext<RegionCoprocessorEnvironment> c, Scan scan, RegionScanner s) throws java.io.IOException
RegionObserverCall CoprocessorEnvironment#complete to skip any subsequent chained coprocessors
postScannerOpen in interface RegionObserverpostScannerOpen in class BaseRegionObserverc - the environment provided by the region serverscan - the Scan specifications - if not null, the base scannerjava.io.IOException - if an error occurred on the coprocessorpublic boolean preScannerNext(ObserverContext<RegionCoprocessorEnvironment> c, InternalScanner s, java.util.List<Result> result, int limit, boolean hasNext) throws java.io.IOException
RegionObserverCall CoprocessorEnvironment#bypass to skip default actions
Call CoprocessorEnvironment#complete to skip any subsequent chained coprocessors
preScannerNext in interface RegionObserverpreScannerNext in class BaseRegionObserverc - the environment provided by the region servers - the scannerresult - The result to return to the client if default processing
is bypassed. Can be modified. Will not be returned if default processing
is not bypassed.limit - the maximum number of results to returnhasNext - the 'has more' indicationjava.io.IOException - if an error occurred on the coprocessorpublic void preScannerClose(ObserverContext<RegionCoprocessorEnvironment> c, InternalScanner s) throws java.io.IOException
RegionObserverCall CoprocessorEnvironment#bypass to skip default actions
Call CoprocessorEnvironment#complete to skip any subsequent chained coprocessors
preScannerClose in interface RegionObserverpreScannerClose in class BaseRegionObserverc - the environment provided by the region servers - the scannerjava.io.IOException - if an error occurred on the coprocessorpublic void postScannerClose(ObserverContext<RegionCoprocessorEnvironment> c, InternalScanner s) throws java.io.IOException
RegionObserverCall CoprocessorEnvironment#complete to skip any subsequent chained coprocessors
postScannerClose in interface RegionObserverpostScannerClose in class BaseRegionObserverc - the environment provided by the region servers - the scannerjava.io.IOException - if an error occurred on the coprocessorpublic void preBulkLoadHFile(ObserverContext<RegionCoprocessorEnvironment> ctx, java.util.List<Pair<byte[],java.lang.String>> familyPaths) throws java.io.IOException
preBulkLoadHFile in interface RegionObserverpreBulkLoadHFile in class BaseRegionObserverfamilyPaths - pairs of { CF, HFile path } submitted for bulk load. Adding
or removing from this list will add or remove HFiles to be bulk loaded.java.io.IOExceptionpublic void prePrepareBulkLoad(ObserverContext<RegionCoprocessorEnvironment> ctx, SecureBulkLoadProtos.PrepareBulkLoadRequest request) throws java.io.IOException
prePrepareBulkLoad in interface BulkLoadObserverctx - the contextrequest - the requestjava.io.IOExceptionpublic void preCleanupBulkLoad(ObserverContext<RegionCoprocessorEnvironment> ctx, SecureBulkLoadProtos.CleanupBulkLoadRequest request) throws java.io.IOException
preCleanupBulkLoad in interface BulkLoadObserverctx - the contextrequest - the requestjava.io.IOExceptionpublic Message preEndpointInvocation(ObserverContext<RegionCoprocessorEnvironment> ctx, Service service, java.lang.String methodName, Message request) throws java.io.IOException
EndpointObserverObserverContext.bypass() has no
effect in this hook.preEndpointInvocation in interface EndpointObserverctx - the environment provided by the region serverservice - the endpoint servicemethodName - the invoked service methodrequest - the request messagejava.io.IOExceptionpublic void postEndpointInvocation(ObserverContext<RegionCoprocessorEnvironment> ctx, Service service, java.lang.String methodName, Message request, Message.Builder responseBuilder) throws java.io.IOException
EndpointObserverpostEndpointInvocation in interface EndpointObserverctx - the environment provided by the region serverservice - the endpoint servicemethodName - the invoked service methodrequest - the request messageresponseBuilder - the response message builderjava.io.IOExceptionpublic void grant(RpcController controller,
AccessControlProtos.GrantRequest request,
<any> done)
AccessControlProtos.AccessControlService.Interfacerpc Grant(.hbase.pb.GrantRequest) returns (.hbase.pb.GrantResponse);grant in interface AccessControlProtos.AccessControlService.Interfacepublic void revoke(RpcController controller,
AccessControlProtos.RevokeRequest request,
<any> done)
AccessControlProtos.AccessControlService.Interfacerpc Revoke(.hbase.pb.RevokeRequest) returns (.hbase.pb.RevokeResponse);revoke in interface AccessControlProtos.AccessControlService.Interfacepublic void getUserPermissions(RpcController controller,
AccessControlProtos.GetUserPermissionsRequest request,
<any> done)
AccessControlProtos.AccessControlService.Interfacerpc GetUserPermissions(.hbase.pb.GetUserPermissionsRequest) returns (.hbase.pb.GetUserPermissionsResponse);getUserPermissions in interface AccessControlProtos.AccessControlService.Interfacepublic void checkPermissions(RpcController controller,
AccessControlProtos.CheckPermissionsRequest request,
<any> done)
AccessControlProtos.AccessControlService.Interfacerpc CheckPermissions(.hbase.pb.CheckPermissionsRequest) returns (.hbase.pb.CheckPermissionsResponse);checkPermissions in interface AccessControlProtos.AccessControlService.Interfacepublic Service getService()
getService in interface CoprocessorServicepublic void preClose(ObserverContext<RegionCoprocessorEnvironment> e, boolean abortRequested) throws java.io.IOException
RegionObserverpreClose in interface RegionObserverpreClose in class BaseRegionObservere - the environment provided by the region serverabortRequested - true if the region server is abortingjava.io.IOExceptionpublic void preStopRegionServer(ObserverContext<RegionServerCoprocessorEnvironment> env) throws java.io.IOException
RegionServerObserverpreStopRegionServer in interface RegionServerObserverenv - An instance of RegionServerCoprocessorEnvironmentjava.io.IOException - Signals that an I/O exception has occurred.public void preGetTableDescriptors(ObserverContext<MasterCoprocessorEnvironment> ctx, java.util.List<TableName> tableNamesList, java.util.List<HTableDescriptor> descriptors, java.lang.String regex) throws java.io.IOException
MasterObserverpreGetTableDescriptors in interface MasterObserverpreGetTableDescriptors in class BaseMasterAndRegionObserverctx - the environment to interact with the framework and mastertableNamesList - the list of table names, or null if querying for alldescriptors - an empty list, can be filled with what to return if bypassingregex - regular expression used for filtering the table namesjava.io.IOExceptionpublic void postGetTableDescriptors(ObserverContext<MasterCoprocessorEnvironment> ctx, java.util.List<TableName> tableNamesList, java.util.List<HTableDescriptor> descriptors, java.lang.String regex) throws java.io.IOException
MasterObserverpostGetTableDescriptors in interface MasterObserverpostGetTableDescriptors in class BaseMasterAndRegionObserverctx - the environment to interact with the framework and mastertableNamesList - the list of table names, or null if querying for alldescriptors - the list of descriptors about to be returnedregex - regular expression used for filtering the table namesjava.io.IOExceptionpublic void postGetTableNames(ObserverContext<MasterCoprocessorEnvironment> ctx, java.util.List<HTableDescriptor> descriptors, java.lang.String regex) throws java.io.IOException
MasterObserverpostGetTableNames in interface MasterObserverpostGetTableNames in class BaseMasterAndRegionObserverctx - the environment to interact with the framework and masterdescriptors - the list of descriptors about to be returnedregex - regular expression used for filtering the table namesjava.io.IOExceptionpublic void preMerge(ObserverContext<RegionServerCoprocessorEnvironment> ctx, Region regionA, Region regionB) throws java.io.IOException
RegionServerObserverObserverContext.bypass() to skip the merge.preMerge in interface RegionServerObserverjava.io.IOException - if an error occurred on the coprocessorpublic void postMerge(ObserverContext<RegionServerCoprocessorEnvironment> c, Region regionA, Region regionB, Region mergedRegion) throws java.io.IOException
RegionServerObserverpostMerge in interface RegionServerObserverjava.io.IOExceptionpublic void preMergeCommit(ObserverContext<RegionServerCoprocessorEnvironment> ctx, Region regionA, Region regionB, java.util.List<Mutation> metaEntries) throws java.io.IOException
RegionServerObserverObserverContext.bypass() rollback the mergepreMergeCommit in interface RegionServerObservermetaEntries - mutations to execute on hbase:meta atomically with regions merge updates.
Any puts or deletes to execute on hbase:meta can be added to the mutations.java.io.IOExceptionpublic void postMergeCommit(ObserverContext<RegionServerCoprocessorEnvironment> ctx, Region regionA, Region regionB, Region mergedRegion) throws java.io.IOException
RegionServerObserverpostMergeCommit in interface RegionServerObserverjava.io.IOExceptionpublic void preRollBackMerge(ObserverContext<RegionServerCoprocessorEnvironment> ctx, Region regionA, Region regionB) throws java.io.IOException
RegionServerObserverpreRollBackMerge in interface RegionServerObserverjava.io.IOExceptionpublic void postRollBackMerge(ObserverContext<RegionServerCoprocessorEnvironment> ctx, Region regionA, Region regionB) throws java.io.IOException
RegionServerObserverpostRollBackMerge in interface RegionServerObserverjava.io.IOExceptionpublic void preRollWALWriterRequest(ObserverContext<RegionServerCoprocessorEnvironment> ctx) throws java.io.IOException
RegionServerObserverpreRollWALWriterRequest in interface RegionServerObserverctx - An instance of ObserverContextjava.io.IOException - Signals that an I/O exception has occurred.public void postRollWALWriterRequest(ObserverContext<RegionServerCoprocessorEnvironment> ctx) throws java.io.IOException
RegionServerObserverpostRollWALWriterRequest in interface RegionServerObserverctx - An instance of ObserverContextjava.io.IOException - Signals that an I/O exception has occurred.public ReplicationEndpoint postCreateReplicationEndPoint(ObserverContext<RegionServerCoprocessorEnvironment> ctx, ReplicationEndpoint endpoint)
RegionServerObserverpostCreateReplicationEndPoint in interface RegionServerObserverendpoint - - the base endpoint for replicationpublic void preReplicateLogEntries(ObserverContext<RegionServerCoprocessorEnvironment> ctx, java.util.List<AdminProtos.WALEntry> entries, CellScanner cells) throws java.io.IOException
RegionServerObserverpreReplicateLogEntries in interface RegionServerObserverctx - An instance of ObserverContextentries - list of WALEntries to replicatecells - Cells that the WALEntries refer to (if cells is non-null)java.io.IOException - Signals that an I/O exception has occurred.public void postReplicateLogEntries(ObserverContext<RegionServerCoprocessorEnvironment> ctx, java.util.List<AdminProtos.WALEntry> entries, CellScanner cells) throws java.io.IOException
RegionServerObserverpostReplicateLogEntries in interface RegionServerObserverctx - An instance of ObserverContextentries - list of WALEntries to replicatecells - Cells that the WALEntries refer to (if cells is non-null)java.io.IOException - Signals that an I/O exception has occurred.public void preSetUserQuota(ObserverContext<MasterCoprocessorEnvironment> ctx, java.lang.String userName, QuotaProtos.Quotas quotas) throws java.io.IOException
MasterObserverpreSetUserQuota in interface MasterObserverpreSetUserQuota in class BaseMasterAndRegionObserverctx - the environment to interact with the framework and masteruserName - the name of userquotas - the quota settingsjava.io.IOExceptionpublic void preSetUserQuota(ObserverContext<MasterCoprocessorEnvironment> ctx, java.lang.String userName, TableName tableName, QuotaProtos.Quotas quotas) throws java.io.IOException
MasterObserverpreSetUserQuota in interface MasterObserverpreSetUserQuota in class BaseMasterAndRegionObserverctx - the environment to interact with the framework and masteruserName - the name of usertableName - the name of the tablequotas - the quota settingsjava.io.IOExceptionpublic void preSetUserQuota(ObserverContext<MasterCoprocessorEnvironment> ctx, java.lang.String userName, java.lang.String namespace, QuotaProtos.Quotas quotas) throws java.io.IOException
MasterObserverpreSetUserQuota in interface MasterObserverpreSetUserQuota in class BaseMasterAndRegionObserverctx - the environment to interact with the framework and masteruserName - the name of usernamespace - the name of the namespacequotas - the quota settingsjava.io.IOExceptionpublic void preSetTableQuota(ObserverContext<MasterCoprocessorEnvironment> ctx, TableName tableName, QuotaProtos.Quotas quotas) throws java.io.IOException
MasterObserverpreSetTableQuota in interface MasterObserverpreSetTableQuota in class BaseMasterAndRegionObserverctx - the environment to interact with the framework and mastertableName - the name of the tablequotas - the quota settingsjava.io.IOExceptionpublic void preSetNamespaceQuota(ObserverContext<MasterCoprocessorEnvironment> ctx, java.lang.String namespace, QuotaProtos.Quotas quotas) throws java.io.IOException
MasterObserverpreSetNamespaceQuota in interface MasterObserverpreSetNamespaceQuota in class BaseMasterAndRegionObserverctx - the environment to interact with the framework and masternamespace - the name of the namespacequotas - the quota settingsjava.io.IOExceptionpublic void preMoveServers(ObserverContext<MasterCoprocessorEnvironment> ctx, java.util.Set<HostAndPort> servers, java.lang.String targetGroup) throws java.io.IOException
MasterObserverpreMoveServers in interface MasterObserverpreMoveServers in class BaseMasterAndRegionObserverctx - the environment to interact with the framework and masterservers - set of servers to movetargetGroup - destination groupjava.io.IOException - on failurepublic void preMoveTables(ObserverContext<MasterCoprocessorEnvironment> ctx, java.util.Set<TableName> tables, java.lang.String targetGroup) throws java.io.IOException
MasterObserverpreMoveTables in interface MasterObserverpreMoveTables in class BaseMasterAndRegionObserverctx - the environment to interact with the framework and mastertables - set of tables to movetargetGroup - name of groupjava.io.IOException - on failurepublic void preAddRSGroup(ObserverContext<MasterCoprocessorEnvironment> ctx, java.lang.String name) throws java.io.IOException
MasterObserverpreAddRSGroup in interface MasterObserverpreAddRSGroup in class BaseMasterAndRegionObserverctx - the environment to interact with the framework and mastername - group namejava.io.IOException - on failurepublic void preRemoveRSGroup(ObserverContext<MasterCoprocessorEnvironment> ctx, java.lang.String name) throws java.io.IOException
MasterObserverpreRemoveRSGroup in interface MasterObserverpreRemoveRSGroup in class BaseMasterAndRegionObserverctx - the environment to interact with the framework and mastername - group namejava.io.IOException - on failurepublic void preBalanceRSGroup(ObserverContext<MasterCoprocessorEnvironment> ctx, java.lang.String groupName) throws java.io.IOException
MasterObserverpreBalanceRSGroup in interface MasterObserverpreBalanceRSGroup in class BaseMasterAndRegionObserverctx - the environment to interact with the framework and mastergroupName - group namejava.io.IOException - on failure