org.apache.hadoop.hbase.security.access
Class AccessController

java.lang.Object
  extended by org.apache.hadoop.hbase.coprocessor.BaseRegionObserver
      extended by org.apache.hadoop.hbase.security.access.AccessController
All Implemented Interfaces:
Coprocessor, MasterObserver, RegionObserver, RegionServerObserver, CoprocessorProtocol, VersionedProtocol, AccessControllerProtocol

public class AccessController
extends BaseRegionObserver
implements MasterObserver, RegionServerObserver, AccessControllerProtocol

Provides basic authorization checks for data access and administrative operations.

AccessController performs authorization checks for HBase operations based on:

If the authorization check fails, an AccessDeniedException will be thrown for the operation.

To perform authorization checks, AccessController relies on the SecureRpcEngine being loaded to provide the user identities for remote requests.

The access control lists used for authorization can be manipulated via the exposed AccessControllerProtocol implementation, and the associated grant, revoke, and user_permission HBase shell commands.


Nested Class Summary
 
Nested classes/interfaces inherited from interface org.apache.hadoop.hbase.Coprocessor
Coprocessor.State
 
Field Summary
static org.apache.commons.logging.Log LOG
           
 
Fields inherited from interface org.apache.hadoop.hbase.Coprocessor
PRIORITY_HIGHEST, PRIORITY_LOWEST, PRIORITY_SYSTEM, PRIORITY_USER, VERSION
 
Fields inherited from interface org.apache.hadoop.hbase.security.access.AccessControllerProtocol
VERSION
 
Constructor Summary
AccessController()
           
 
Method Summary
 void checkPermissions(Permission[] permissions)
          Checks whether the given Permissions will pass the access checks for the current user.
 ProtocolSignature getProtocolSignature(String protocol, long clientVersion, int clientMethodsHash)
          Return protocol version corresponding to protocol interface.
 long getProtocolVersion(String protocol, long clientVersion)
          Return protocol version corresponding to protocol interface.
 List<UserPermission> getUserPermissions(byte[] tableName)
          Queries the permissions currently stored for the given table, returning a list of currently granted permissions, along with the user or group each is associated with.
 void grant(byte[] user, TablePermission permission)
          Deprecated. 
 void grant(UserPermission perm)
          Grants the given user or group the privilege to perform the given actions
 void postAddColumn(ObserverContext<MasterCoprocessorEnvironment> c, byte[] tableName, HColumnDescriptor column)
          Called after the new column family has been created.
 void postAssign(ObserverContext<MasterCoprocessorEnvironment> c, HRegionInfo regionInfo)
          Called after the region assignment has been requested.
 void postBalance(ObserverContext<MasterCoprocessorEnvironment> c)
          Called after the balancing plan has been submitted.
 void postBalanceSwitch(ObserverContext<MasterCoprocessorEnvironment> c, boolean oldValue, boolean newValue)
          Called after the flag to enable/disable balancing has changed.
 void postCloneSnapshot(ObserverContext<MasterCoprocessorEnvironment> ctx, HBaseProtos.SnapshotDescription snapshot, HTableDescriptor hTableDescriptor)
          Called after a snapshot clone operation has been requested.
 void postCreateTable(ObserverContext<MasterCoprocessorEnvironment> c, HTableDescriptor desc, HRegionInfo[] regions)
          Called after the createTable operation has been requested.
 void postDelete(ObserverContext<RegionCoprocessorEnvironment> c, Delete delete, WALEdit edit, boolean writeToWAL)
          Called after the client deletes a value.
 void postDeleteColumn(ObserverContext<MasterCoprocessorEnvironment> c, byte[] tableName, byte[] col)
          Called after the column family has been deleted.
 void postDeleteSnapshot(ObserverContext<MasterCoprocessorEnvironment> ctx, HBaseProtos.SnapshotDescription snapshot)
          Called after the delete snapshot operation has been requested.
 void postDeleteTable(ObserverContext<MasterCoprocessorEnvironment> c, byte[] tableName)
          Called after the deleteTable operation has been requested.
 void postDisableTable(ObserverContext<MasterCoprocessorEnvironment> c, byte[] tableName)
          Called after the disableTable operation has been requested.
 void postEnableTable(ObserverContext<MasterCoprocessorEnvironment> c, byte[] tableName)
          Called after the enableTable operation has been requested.
 void postModifyColumn(ObserverContext<MasterCoprocessorEnvironment> c, byte[] tableName, HColumnDescriptor descriptor)
          Called after the column family has been updated.
 void postModifyTable(ObserverContext<MasterCoprocessorEnvironment> c, byte[] tableName, HTableDescriptor htd)
          Called after the modifyTable operation has been requested.
 void postMove(ObserverContext<MasterCoprocessorEnvironment> c, HRegionInfo region, ServerName srcServer, ServerName destServer)
          Called after the region move has been requested.
 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, boolean writeToWAL)
          Called after the client stores a value.
 void postRestoreSnapshot(ObserverContext<MasterCoprocessorEnvironment> ctx, HBaseProtos.SnapshotDescription snapshot, HTableDescriptor hTableDescriptor)
          Called after a snapshot restore operation has been requested.
 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 postSnapshot(ObserverContext<MasterCoprocessorEnvironment> ctx, HBaseProtos.SnapshotDescription snapshot, HTableDescriptor hTableDescriptor)
          Called after the snapshot operation has been requested.
 void postStartMaster(ObserverContext<MasterCoprocessorEnvironment> ctx)
          Called immediately after an active master instance has completed initialization.
 void postUnassign(ObserverContext<MasterCoprocessorEnvironment> c, HRegionInfo regionInfo, boolean force)
          Called after the region unassignment has been requested.
 void preAddColumn(ObserverContext<MasterCoprocessorEnvironment> c, byte[] tableName, HColumnDescriptor column)
          Called prior to adding a new column family to the table.
 Result preAppend(ObserverContext<RegionCoprocessorEnvironment> c, Append append)
          Called before Append
 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.
 boolean preBalanceSwitch(ObserverContext<MasterCoprocessorEnvironment> c, boolean newValue)
          Called prior to modifying the flag used to enable/disable region balancing.
 void preBulkLoadHFile(ObserverContext<RegionCoprocessorEnvironment> ctx, List<Pair<byte[],String>> familyPaths)
          Verifies user has WRITE privileges on the Column Families involved in the bulkLoadHFile request.
 boolean preCheckAndDelete(ObserverContext<RegionCoprocessorEnvironment> c, byte[] row, byte[] family, byte[] qualifier, CompareFilter.CompareOp compareOp, WritableByteArrayComparable comparator, Delete delete, boolean result)
          Called before checkAndDelete
 boolean preCheckAndPut(ObserverContext<RegionCoprocessorEnvironment> c, byte[] row, byte[] family, byte[] qualifier, CompareFilter.CompareOp compareOp, WritableByteArrayComparable comparator, Put put, boolean result)
          Called before checkAndPut
 void preCleanupBulkLoad(RegionCoprocessorEnvironment e)
          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)
          Called prior to writing the StoreFiles selected for compaction into a new StoreFile.
 void preCompactSelection(ObserverContext<RegionCoprocessorEnvironment> e, Store store, List<StoreFile> candidates)
          Called prior to selecting the StoreFiles to compact from the list of available candidates.
 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, boolean writeToWAL)
          Called before the client deletes a value.
 void preDeleteColumn(ObserverContext<MasterCoprocessorEnvironment> c, byte[] tableName, byte[] col)
          Called prior to deleting the entire column family.
 void preDeleteSnapshot(ObserverContext<MasterCoprocessorEnvironment> ctx, HBaseProtos.SnapshotDescription snapshot)
          Called before a snapshot is deleted.
 void preDeleteTable(ObserverContext<MasterCoprocessorEnvironment> c, byte[] tableName)
          Called before HMaster deletes a table It can't bypass the default action, e.g., ctx.bypass() won't have effect.
 void preDisableTable(ObserverContext<MasterCoprocessorEnvironment> c, byte[] tableName)
          Called prior to disabling a table.
 void preEnableTable(ObserverContext<MasterCoprocessorEnvironment> c, byte[] tableName)
          Called prior to enabling a table.
 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 preGet(ObserverContext<RegionCoprocessorEnvironment> c, Get get, List<KeyValue> result)
          Called before the client performs a Get
 void preGetClosestRowBefore(ObserverContext<RegionCoprocessorEnvironment> c, byte[] row, byte[] family, Result result)
          Called before a client makes a GetClosestRowBefore request.
 Result preIncrement(ObserverContext<RegionCoprocessorEnvironment> c, Increment increment)
          Called before Increment
 long preIncrementColumnValue(ObserverContext<RegionCoprocessorEnvironment> c, byte[] row, byte[] family, byte[] qualifier, long amount, boolean writeToWAL)
          Called before incrementColumnValue
 void preLockRow(ObserverContext<RegionCoprocessorEnvironment> ctx, byte[] regionName, byte[] row)
          Called before locking a row.
 void preModifyColumn(ObserverContext<MasterCoprocessorEnvironment> c, byte[] tableName, HColumnDescriptor descriptor)
          Called prior to modifying a column family's attributes.
 void preModifyTable(ObserverContext<MasterCoprocessorEnvironment> c, byte[] 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 preOpen(ObserverContext<RegionCoprocessorEnvironment> e)
          Called before the region is reported as open to the master.
 void prePrepareBulkLoad(RegionCoprocessorEnvironment e)
          Authorization check for SecureBulkLoadProtocol.prepareBulkLoad()
 void prePut(ObserverContext<RegionCoprocessorEnvironment> c, Put put, WALEdit edit, boolean writeToWAL)
          Called before the client stores a value.
 void preRestoreSnapshot(ObserverContext<MasterCoprocessorEnvironment> ctx, HBaseProtos.SnapshotDescription snapshot, HTableDescriptor hTableDescriptor)
          Called before a snapshot is restored.
 void preScannerClose(ObserverContext<RegionCoprocessorEnvironment> c, InternalScanner s)
          Called before the client closes a scanner.
 boolean preScannerNext(ObserverContext<RegionCoprocessorEnvironment> c, InternalScanner s, 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 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 preStopMaster(ObserverContext<MasterCoprocessorEnvironment> c)
          Called immediately prior to stopping this HMaster process.
 void preStopRegionServer(ObserverContext<RegionServerCoprocessorEnvironment> env)
          Called before stopping region server.
 void preUnassign(ObserverContext<MasterCoprocessorEnvironment> c, HRegionInfo regionInfo, boolean force)
          Called prior to unassigning a given region.
 void preUnlockRow(ObserverContext<RegionCoprocessorEnvironment> ctx, byte[] regionName, long lockId)
          Called before unlocking a row.
 void requirePermission(String request, Permission.Action perm, RegionCoprocessorEnvironment env, Map<byte[],? extends Collection<?>> families)
          Authorizes that the current user has permission to perform the given action on the set of table column families.
 void revoke(byte[] user, TablePermission permission)
          Deprecated. 
 void revoke(UserPermission perm)
          Revokes a previously granted privilege from a user or group.
 void start(CoprocessorEnvironment env)
           
 void stop(CoprocessorEnvironment env)
           
 
Methods inherited from class org.apache.hadoop.hbase.coprocessor.BaseRegionObserver
postAppend, postBatchMutate, postBulkLoadHFile, postCheckAndDelete, postCheckAndPut, postClose, postCompact, postCompact, postCompactSelection, postCompactSelection, postExists, postFlush, postFlush, postGet, postGetClosestRowBefore, postIncrement, postIncrementColumnValue, postLockRow, postScannerFilterRow, postScannerNext, postSplit, postUnlockRow, postWALRestore, preBatchMutate, preCompact, preCompactScannerOpen, preCompactScannerOpen, preCompactSelection, preFlush, preFlushScannerOpen, preStoreScannerOpen, preWALRestore
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LOG

public static final org.apache.commons.logging.Log LOG
Constructor Detail

AccessController

public AccessController()
Method Detail

requirePermission

public void requirePermission(String request,
                              Permission.Action perm,
                              RegionCoprocessorEnvironment env,
                              Map<byte[],? extends Collection<?>> families)
                       throws IOException
Authorizes that the current user has permission to perform the given action on the set of table column families.

Parameters:
perm - Action that is required
env - The current coprocessor environment
families - The map of column families-qualifiers.
Throws:
AccessDeniedException - if the authorization check failed
IOException

start

public void start(CoprocessorEnvironment env)
           throws IOException
Specified by:
start in interface Coprocessor
Overrides:
start in class BaseRegionObserver
Throws:
IOException

stop

public void stop(CoprocessorEnvironment env)
Specified by:
stop in interface Coprocessor
Overrides:
stop in class BaseRegionObserver

preCreateTable

public void preCreateTable(ObserverContext<MasterCoprocessorEnvironment> c,
                           HTableDescriptor desc,
                           HRegionInfo[] regions)
                    throws IOException
Description copied from interface: MasterObserver
Called before a new table is created by HMaster. It can't bypass the default action, e.g., ctx.bypass() won't have effect.

Specified by:
preCreateTable in interface MasterObserver
Parameters:
c - the environment to interact with the framework and master
desc - the HTableDescriptor for the table
regions - the initial regions created for the table
Throws:
IOException

postCreateTable

public void postCreateTable(ObserverContext<MasterCoprocessorEnvironment> c,
                            HTableDescriptor desc,
                            HRegionInfo[] regions)
                     throws IOException
Description copied from interface: MasterObserver
Called after the createTable operation has been requested.

Specified by:
postCreateTable in interface MasterObserver
Parameters:
c - the environment to interact with the framework and master
desc - the HTableDescriptor for the table
regions - the initial regions created for the table
Throws:
IOException

preDeleteTable

public void preDeleteTable(ObserverContext<MasterCoprocessorEnvironment> c,
                           byte[] tableName)
                    throws IOException
Description copied from interface: MasterObserver
Called before HMaster deletes a table It can't bypass the default action, e.g., ctx.bypass() won't have effect.

Specified by:
preDeleteTable in interface MasterObserver
Parameters:
c - the environment to interact with the framework and master
tableName - the name of the table
Throws:
IOException

postDeleteTable

public void postDeleteTable(ObserverContext<MasterCoprocessorEnvironment> c,
                            byte[] tableName)
                     throws IOException
Description copied from interface: MasterObserver
Called after the deleteTable operation has been requested.

Specified by:
postDeleteTable in interface MasterObserver
Parameters:
c - the environment to interact with the framework and master
tableName - the name of the table
Throws:
IOException

preModifyTable

public void preModifyTable(ObserverContext<MasterCoprocessorEnvironment> c,
                           byte[] tableName,
                           HTableDescriptor htd)
                    throws IOException
Description copied from interface: MasterObserver
Called prior to modifying a table's properties. It can't bypass the default action, e.g., ctx.bypass() won't have effect.

Specified by:
preModifyTable in interface MasterObserver
Parameters:
c - the environment to interact with the framework and master
tableName - the name of the table
htd - the HTableDescriptor
Throws:
IOException

postModifyTable

public void postModifyTable(ObserverContext<MasterCoprocessorEnvironment> c,
                            byte[] tableName,
                            HTableDescriptor htd)
                     throws IOException
Description copied from interface: MasterObserver
Called after the modifyTable operation has been requested.

Specified by:
postModifyTable in interface MasterObserver
Parameters:
c - the environment to interact with the framework and master
tableName - the name of the table
htd - the HTableDescriptor
Throws:
IOException

preAddColumn

public void preAddColumn(ObserverContext<MasterCoprocessorEnvironment> c,
                         byte[] tableName,
                         HColumnDescriptor column)
                  throws IOException
Description copied from interface: MasterObserver
Called prior to adding a new column family to the table.

Specified by:
preAddColumn in interface MasterObserver
Parameters:
c - the environment to interact with the framework and master
tableName - the name of the table
column - the HColumnDescriptor
Throws:
IOException

postAddColumn

public void postAddColumn(ObserverContext<MasterCoprocessorEnvironment> c,
                          byte[] tableName,
                          HColumnDescriptor column)
                   throws IOException
Description copied from interface: MasterObserver
Called after the new column family has been created.

Specified by:
postAddColumn in interface MasterObserver
Parameters:
c - the environment to interact with the framework and master
tableName - the name of the table
column - the HColumnDescriptor
Throws:
IOException

preModifyColumn

public void preModifyColumn(ObserverContext<MasterCoprocessorEnvironment> c,
                            byte[] tableName,
                            HColumnDescriptor descriptor)
                     throws IOException
Description copied from interface: MasterObserver
Called prior to modifying a column family's attributes.

Specified by:
preModifyColumn in interface MasterObserver
Parameters:
c - the environment to interact with the framework and master
tableName - the name of the table
descriptor - the HColumnDescriptor
Throws:
IOException

postModifyColumn

public void postModifyColumn(ObserverContext<MasterCoprocessorEnvironment> c,
                             byte[] tableName,
                             HColumnDescriptor descriptor)
                      throws IOException
Description copied from interface: MasterObserver
Called after the column family has been updated.

Specified by:
postModifyColumn in interface MasterObserver
Parameters:
c - the environment to interact with the framework and master
tableName - the name of the table
descriptor - the HColumnDescriptor
Throws:
IOException

preDeleteColumn

public void preDeleteColumn(ObserverContext<MasterCoprocessorEnvironment> c,
                            byte[] tableName,
                            byte[] col)
                     throws IOException
Description copied from interface: MasterObserver
Called prior to deleting the entire column family.

Specified by:
preDeleteColumn in interface MasterObserver
Parameters:
c - the environment to interact with the framework and master
tableName - the name of the table
col - the column
Throws:
IOException

postDeleteColumn

public void postDeleteColumn(ObserverContext<MasterCoprocessorEnvironment> c,
                             byte[] tableName,
                             byte[] col)
                      throws IOException
Description copied from interface: MasterObserver
Called after the column family has been deleted.

Specified by:
postDeleteColumn in interface MasterObserver
Parameters:
c - the environment to interact with the framework and master
tableName - the name of the table
col - the column
Throws:
IOException

preEnableTable

public void preEnableTable(ObserverContext<MasterCoprocessorEnvironment> c,
                           byte[] tableName)
                    throws IOException
Description copied from interface: MasterObserver
Called prior to enabling a table. It can't bypass the default action, e.g., ctx.bypass() won't have effect.

Specified by:
preEnableTable in interface MasterObserver
Parameters:
c - the environment to interact with the framework and master
tableName - the name of the table
Throws:
IOException

postEnableTable

public void postEnableTable(ObserverContext<MasterCoprocessorEnvironment> c,
                            byte[] tableName)
                     throws IOException
Description copied from interface: MasterObserver
Called after the enableTable operation has been requested.

Specified by:
postEnableTable in interface MasterObserver
Parameters:
c - the environment to interact with the framework and master
tableName - the name of the table
Throws:
IOException

preDisableTable

public void preDisableTable(ObserverContext<MasterCoprocessorEnvironment> c,
                            byte[] tableName)
                     throws IOException
Description copied from interface: MasterObserver
Called prior to disabling a table. It can't bypass the default action, e.g., ctx.bypass() won't have effect.

Specified by:
preDisableTable in interface MasterObserver
Parameters:
c - the environment to interact with the framework and master
tableName - the name of the table
Throws:
IOException

postDisableTable

public void postDisableTable(ObserverContext<MasterCoprocessorEnvironment> c,
                             byte[] tableName)
                      throws IOException
Description copied from interface: MasterObserver
Called after the disableTable operation has been requested.

Specified by:
postDisableTable in interface MasterObserver
Parameters:
c - the environment to interact with the framework and master
tableName - the name of the table
Throws:
IOException

preMove

public void preMove(ObserverContext<MasterCoprocessorEnvironment> c,
                    HRegionInfo region,
                    ServerName srcServer,
                    ServerName destServer)
             throws IOException
Description copied from interface: MasterObserver
Called prior to moving a given region from one region server to another.

Specified by:
preMove in interface MasterObserver
Parameters:
c - the environment to interact with the framework and master
region - the HRegionInfo
srcServer - the source ServerName
destServer - the destination ServerName
Throws:
IOException

postMove

public void postMove(ObserverContext<MasterCoprocessorEnvironment> c,
                     HRegionInfo region,
                     ServerName srcServer,
                     ServerName destServer)
              throws IOException
Description copied from interface: MasterObserver
Called after the region move has been requested.

Specified by:
postMove in interface MasterObserver
Parameters:
c - the environment to interact with the framework and master
region - the HRegionInfo
srcServer - the source ServerName
destServer - the destination ServerName
Throws:
IOException

preAssign

public void preAssign(ObserverContext<MasterCoprocessorEnvironment> c,
                      HRegionInfo regionInfo)
               throws IOException
Description copied from interface: MasterObserver
Called prior to assigning a specific region.

Specified by:
preAssign in interface MasterObserver
Parameters:
c - the environment to interact with the framework and master
regionInfo - the regionInfo of the region
Throws:
IOException

postAssign

public void postAssign(ObserverContext<MasterCoprocessorEnvironment> c,
                       HRegionInfo regionInfo)
                throws IOException
Description copied from interface: MasterObserver
Called after the region assignment has been requested.

Specified by:
postAssign in interface MasterObserver
Parameters:
c - the environment to interact with the framework and master
regionInfo - the regionInfo of the region
Throws:
IOException

preUnassign

public void preUnassign(ObserverContext<MasterCoprocessorEnvironment> c,
                        HRegionInfo regionInfo,
                        boolean force)
                 throws IOException
Description copied from interface: MasterObserver
Called prior to unassigning a given region.

Specified by:
preUnassign in interface MasterObserver
Parameters:
c - the environment to interact with the framework and master
force - whether to force unassignment or not
Throws:
IOException

postUnassign

public void postUnassign(ObserverContext<MasterCoprocessorEnvironment> c,
                         HRegionInfo regionInfo,
                         boolean force)
                  throws IOException
Description copied from interface: MasterObserver
Called after the region unassignment has been requested.

Specified by:
postUnassign in interface MasterObserver
Parameters:
c - the environment to interact with the framework and master
force - whether to force unassignment or not
Throws:
IOException

preBalance

public void preBalance(ObserverContext<MasterCoprocessorEnvironment> c)
                throws IOException
Description copied from interface: MasterObserver
Called prior to requesting rebalancing of the cluster regions, though after the initial checks for regions in transition and the balance switch flag.

Specified by:
preBalance in interface MasterObserver
Parameters:
c - the environment to interact with the framework and master
Throws:
IOException

postBalance

public void postBalance(ObserverContext<MasterCoprocessorEnvironment> c)
                 throws IOException
Description copied from interface: MasterObserver
Called after the balancing plan has been submitted.

Specified by:
postBalance in interface MasterObserver
Parameters:
c - the environment to interact with the framework and master
Throws:
IOException

preBalanceSwitch

public boolean preBalanceSwitch(ObserverContext<MasterCoprocessorEnvironment> c,
                                boolean newValue)
                         throws IOException
Description copied from interface: MasterObserver
Called prior to modifying the flag used to enable/disable region balancing.

Specified by:
preBalanceSwitch in interface MasterObserver
Parameters:
c - the coprocessor instance's environment
newValue - the new flag value submitted in the call
Throws:
IOException

postBalanceSwitch

public void postBalanceSwitch(ObserverContext<MasterCoprocessorEnvironment> c,
                              boolean oldValue,
                              boolean newValue)
                       throws IOException
Description copied from interface: MasterObserver
Called after the flag to enable/disable balancing has changed.

Specified by:
postBalanceSwitch in interface MasterObserver
Parameters:
c - the coprocessor instance's environment
oldValue - the previously set balanceSwitch value
newValue - the newly set balanceSwitch value
Throws:
IOException

preShutdown

public void preShutdown(ObserverContext<MasterCoprocessorEnvironment> c)
                 throws IOException
Description copied from interface: MasterObserver
Called prior to shutting down the full HBase cluster, including this HMaster process.

Specified by:
preShutdown in interface MasterObserver
Throws:
IOException

preStopMaster

public void preStopMaster(ObserverContext<MasterCoprocessorEnvironment> c)
                   throws IOException
Description copied from interface: MasterObserver
Called immediately prior to stopping this HMaster process.

Specified by:
preStopMaster in interface MasterObserver
Throws:
IOException

postStartMaster

public void postStartMaster(ObserverContext<MasterCoprocessorEnvironment> ctx)
                     throws IOException
Description copied from interface: MasterObserver
Called immediately after an active master instance has completed initialization. Will not be called on standby master instances unless they take over the active role.

Specified by:
postStartMaster in interface MasterObserver
Throws:
IOException

preSnapshot

public void preSnapshot(ObserverContext<MasterCoprocessorEnvironment> ctx,
                        HBaseProtos.SnapshotDescription snapshot,
                        HTableDescriptor hTableDescriptor)
                 throws IOException
Description copied from interface: MasterObserver
Called before a new snapshot is taken. Called as part of snapshot RPC call. It can't bypass the default action, e.g., ctx.bypass() won't have effect.

Specified by:
preSnapshot in interface MasterObserver
Parameters:
ctx - the environment to interact with the framework and master
snapshot - the SnapshotDescriptor for the snapshot
hTableDescriptor - the hTableDescriptor of the table to snapshot
Throws:
IOException

postSnapshot

public void postSnapshot(ObserverContext<MasterCoprocessorEnvironment> ctx,
                         HBaseProtos.SnapshotDescription snapshot,
                         HTableDescriptor hTableDescriptor)
                  throws IOException
Description copied from interface: MasterObserver
Called after the snapshot operation has been requested. Called as part of snapshot RPC call.

Specified by:
postSnapshot in interface MasterObserver
Parameters:
ctx - the environment to interact with the framework and master
snapshot - the SnapshotDescriptor for the snapshot
hTableDescriptor - the hTableDescriptor of the table to snapshot
Throws:
IOException

preCloneSnapshot

public void preCloneSnapshot(ObserverContext<MasterCoprocessorEnvironment> ctx,
                             HBaseProtos.SnapshotDescription snapshot,
                             HTableDescriptor hTableDescriptor)
                      throws IOException
Description copied from interface: MasterObserver
Called before a snapshot is cloned. Called as part of restoreSnapshot RPC call. It can't bypass the default action, e.g., ctx.bypass() won't have effect.

Specified by:
preCloneSnapshot in interface MasterObserver
Parameters:
ctx - the environment to interact with the framework and master
snapshot - the SnapshotDescriptor for the snapshot
hTableDescriptor - the hTableDescriptor of the table to create
Throws:
IOException

postCloneSnapshot

public void postCloneSnapshot(ObserverContext<MasterCoprocessorEnvironment> ctx,
                              HBaseProtos.SnapshotDescription snapshot,
                              HTableDescriptor hTableDescriptor)
                       throws IOException
Description copied from interface: MasterObserver
Called after a snapshot clone operation has been requested. Called as part of restoreSnapshot RPC call.

Specified by:
postCloneSnapshot in interface MasterObserver
Parameters:
ctx - the environment to interact with the framework and master
snapshot - the SnapshotDescriptor for the snapshot
hTableDescriptor - the hTableDescriptor of the table to create
Throws:
IOException

preRestoreSnapshot

public void preRestoreSnapshot(ObserverContext<MasterCoprocessorEnvironment> ctx,
                               HBaseProtos.SnapshotDescription snapshot,
                               HTableDescriptor hTableDescriptor)
                        throws IOException
Description copied from interface: MasterObserver
Called before a snapshot is restored. Called as part of restoreSnapshot RPC call. It can't bypass the default action, e.g., ctx.bypass() won't have effect.

Specified by:
preRestoreSnapshot in interface MasterObserver
Parameters:
ctx - the environment to interact with the framework and master
snapshot - the SnapshotDescriptor for the snapshot
hTableDescriptor - the hTableDescriptor of the table to restore
Throws:
IOException

postRestoreSnapshot

public void postRestoreSnapshot(ObserverContext<MasterCoprocessorEnvironment> ctx,
                                HBaseProtos.SnapshotDescription snapshot,
                                HTableDescriptor hTableDescriptor)
                         throws IOException
Description copied from interface: MasterObserver
Called after a snapshot restore operation has been requested. Called as part of restoreSnapshot RPC call.

Specified by:
postRestoreSnapshot in interface MasterObserver
Parameters:
ctx - the environment to interact with the framework and master
snapshot - the SnapshotDescriptor for the snapshot
hTableDescriptor - the hTableDescriptor of the table to restore
Throws:
IOException

preDeleteSnapshot

public void preDeleteSnapshot(ObserverContext<MasterCoprocessorEnvironment> ctx,
                              HBaseProtos.SnapshotDescription snapshot)
                       throws IOException
Description copied from interface: MasterObserver
Called before a snapshot is deleted. Called as part of deleteSnapshot RPC call. It can't bypass the default action, e.g., ctx.bypass() won't have effect.

Specified by:
preDeleteSnapshot in interface MasterObserver
Parameters:
ctx - the environment to interact with the framework and master
snapshot - the SnapshotDescriptor of the snapshot to delete
Throws:
IOException

postDeleteSnapshot

public void postDeleteSnapshot(ObserverContext<MasterCoprocessorEnvironment> ctx,
                               HBaseProtos.SnapshotDescription snapshot)
                        throws IOException
Description copied from interface: MasterObserver
Called after the delete snapshot operation has been requested. Called as part of deleteSnapshot RPC call.

Specified by:
postDeleteSnapshot in interface MasterObserver
Parameters:
ctx - the environment to interact with the framework and master
snapshot - the SnapshotDescriptor of the snapshot to delete
Throws:
IOException

preOpen

public void preOpen(ObserverContext<RegionCoprocessorEnvironment> e)
             throws IOException
Description copied from interface: RegionObserver
Called before the region is reported as open to the master.

Specified by:
preOpen in interface RegionObserver
Overrides:
preOpen in class BaseRegionObserver
Parameters:
e - the environment provided by the region server
Throws:
IOException - if an error occurred on the coprocessor

postOpen

public void postOpen(ObserverContext<RegionCoprocessorEnvironment> c)
Description copied from interface: RegionObserver
Called after the region is reported as open to the master.

Specified by:
postOpen in interface RegionObserver
Overrides:
postOpen in class BaseRegionObserver
Parameters:
c - the environment provided by the region server

preFlush

public void preFlush(ObserverContext<RegionCoprocessorEnvironment> e)
              throws IOException
Description copied from interface: RegionObserver
Called before the memstore is flushed to disk.

Specified by:
preFlush in interface RegionObserver
Overrides:
preFlush in class BaseRegionObserver
Parameters:
e - the environment provided by the region server
Throws:
IOException - if an error occurred on the coprocessor

preSplit

public void preSplit(ObserverContext<RegionCoprocessorEnvironment> e)
              throws IOException
Description copied from interface: RegionObserver
Called before the region is split.

Specified by:
preSplit in interface RegionObserver
Overrides:
preSplit in class BaseRegionObserver
Parameters:
e - the environment provided by the region server (e.getRegion() returns the parent region)
Throws:
IOException - if an error occurred on the coprocessor

preCompact

public InternalScanner preCompact(ObserverContext<RegionCoprocessorEnvironment> e,
                                  Store store,
                                  InternalScanner scanner)
                           throws IOException
Description copied from interface: RegionObserver
Called prior to writing the StoreFiles selected for compaction into a new StoreFile. To override or modify the compaction process, implementing classes have two options:

Specified by:
preCompact in interface RegionObserver
Overrides:
preCompact in class BaseRegionObserver
Parameters:
e - the environment provided by the region server
store - the store being compacted
scanner - the scanner over existing data used in the store file rewriting
Returns:
the scanner to use during compaction. Should not be null unless the implementation is writing new store files on its own.
Throws:
IOException - if an error occurred on the coprocessor

preCompactSelection

public void preCompactSelection(ObserverContext<RegionCoprocessorEnvironment> e,
                                Store store,
                                List<StoreFile> candidates)
                         throws IOException
Description copied from interface: RegionObserver
Called prior to selecting the StoreFiles to compact from the list of available candidates. To alter the files used for compaction, you may mutate the passed in list of candidates.

Specified by:
preCompactSelection in interface RegionObserver
Overrides:
preCompactSelection in class BaseRegionObserver
Parameters:
e - the environment provided by the region server
store - the store where compaction is being requested
candidates - the store files currently available for compaction
Throws:
IOException - if an error occurred on the coprocessor

preGetClosestRowBefore

public void preGetClosestRowBefore(ObserverContext<RegionCoprocessorEnvironment> c,
                                   byte[] row,
                                   byte[] family,
                                   Result result)
                            throws IOException
Description copied from interface: RegionObserver
Called before a client makes a GetClosestRowBefore request.

Call CoprocessorEnvironment#bypass to skip default actions

Call CoprocessorEnvironment#complete to skip any subsequent chained coprocessors

Specified by:
preGetClosestRowBefore in interface RegionObserver
Overrides:
preGetClosestRowBefore in class BaseRegionObserver
Parameters:
c - the environment provided by the region server
row - the row
family - the family
result - 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.
Throws:
IOException - if an error occurred on the coprocessor

preGet

public void preGet(ObserverContext<RegionCoprocessorEnvironment> c,
                   Get get,
                   List<KeyValue> result)
            throws IOException
Description copied from interface: RegionObserver
Called before the client performs a Get

Call CoprocessorEnvironment#bypass to skip default actions

Call CoprocessorEnvironment#complete to skip any subsequent chained coprocessors

Specified by:
preGet in interface RegionObserver
Overrides:
preGet in class BaseRegionObserver
Parameters:
c - the environment provided by the region server
get - the Get request
result - 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.
Throws:
IOException - if an error occurred on the coprocessor

preExists

public boolean preExists(ObserverContext<RegionCoprocessorEnvironment> c,
                         Get get,
                         boolean exists)
                  throws IOException
Description copied from interface: RegionObserver
Called before the client tests for existence using a Get.

Call CoprocessorEnvironment#bypass to skip default actions

Call CoprocessorEnvironment#complete to skip any subsequent chained coprocessors

Specified by:
preExists in interface RegionObserver
Overrides:
preExists in class BaseRegionObserver
Parameters:
c - the environment provided by the region server
get - the Get request
Returns:
the value to return to the client if bypassing default processing
Throws:
IOException - if an error occurred on the coprocessor

prePut

public void prePut(ObserverContext<RegionCoprocessorEnvironment> c,
                   Put put,
                   WALEdit edit,
                   boolean writeToWAL)
            throws IOException
Description copied from interface: RegionObserver
Called before the client stores a value.

Call CoprocessorEnvironment#bypass to skip default actions

Call CoprocessorEnvironment#complete to skip any subsequent chained coprocessors

Specified by:
prePut in interface RegionObserver
Overrides:
prePut in class BaseRegionObserver
Parameters:
c - the environment provided by the region server
put - The Put object
edit - The WALEdit object that will be written to the wal
writeToWAL - true if the change should be written to the WAL
Throws:
IOException - if an error occurred on the coprocessor

postPut

public void postPut(ObserverContext<RegionCoprocessorEnvironment> c,
                    Put put,
                    WALEdit edit,
                    boolean writeToWAL)
Description copied from interface: RegionObserver
Called after the client stores a value.

Call CoprocessorEnvironment#complete to skip any subsequent chained coprocessors

Specified by:
postPut in interface RegionObserver
Overrides:
postPut in class BaseRegionObserver
Parameters:
c - the environment provided by the region server
put - The Put object
edit - The WALEdit object for the wal
writeToWAL - true if the change should be written to the WAL

preDelete

public void preDelete(ObserverContext<RegionCoprocessorEnvironment> c,
                      Delete delete,
                      WALEdit edit,
                      boolean writeToWAL)
               throws IOException
Description copied from interface: RegionObserver
Called before the client deletes a value.

Call CoprocessorEnvironment#bypass to skip default actions

Call CoprocessorEnvironment#complete to skip any subsequent chained coprocessors

Specified by:
preDelete in interface RegionObserver
Overrides:
preDelete in class BaseRegionObserver
Parameters:
c - the environment provided by the region server
delete - The Delete object
edit - The WALEdit object for the wal
writeToWAL - true if the change should be written to the WAL
Throws:
IOException - if an error occurred on the coprocessor

postDelete

public void postDelete(ObserverContext<RegionCoprocessorEnvironment> c,
                       Delete delete,
                       WALEdit edit,
                       boolean writeToWAL)
                throws IOException
Description copied from interface: RegionObserver
Called after the client deletes a value.

Call CoprocessorEnvironment#complete to skip any subsequent chained coprocessors

Specified by:
postDelete in interface RegionObserver
Overrides:
postDelete in class BaseRegionObserver
Parameters:
c - the environment provided by the region server
delete - The Delete object
edit - The WALEdit object for the wal
writeToWAL - true if the change should be written to the WAL
Throws:
IOException - if an error occurred on the coprocessor

preCheckAndPut

public boolean preCheckAndPut(ObserverContext<RegionCoprocessorEnvironment> c,
                              byte[] row,
                              byte[] family,
                              byte[] qualifier,
                              CompareFilter.CompareOp compareOp,
                              WritableByteArrayComparable comparator,
                              Put put,
                              boolean result)
                       throws IOException
Description copied from interface: RegionObserver
Called before checkAndPut

Call CoprocessorEnvironment#bypass to skip default actions

Call CoprocessorEnvironment#complete to skip any subsequent chained coprocessors

Specified by:
preCheckAndPut in interface RegionObserver
Overrides:
preCheckAndPut in class BaseRegionObserver
Parameters:
c - the environment provided by the region server
row - row to check
family - column family
qualifier - column qualifier
compareOp - the comparison operation
comparator - the comparator
put - data to put if check succeeds
Returns:
the return value to return to client if bypassing default processing
Throws:
IOException - if an error occurred on the coprocessor

preCheckAndDelete

public boolean preCheckAndDelete(ObserverContext<RegionCoprocessorEnvironment> c,
                                 byte[] row,
                                 byte[] family,
                                 byte[] qualifier,
                                 CompareFilter.CompareOp compareOp,
                                 WritableByteArrayComparable comparator,
                                 Delete delete,
                                 boolean result)
                          throws IOException
Description copied from interface: RegionObserver
Called before checkAndDelete

Call CoprocessorEnvironment#bypass to skip default actions

Call CoprocessorEnvironment#complete to skip any subsequent chained coprocessors

Specified by:
preCheckAndDelete in interface RegionObserver
Overrides:
preCheckAndDelete in class BaseRegionObserver
Parameters:
c - the environment provided by the region server
row - row to check
family - column family
qualifier - column qualifier
compareOp - the comparison operation
comparator - the comparator
delete - delete to commit if check succeeds
Returns:
the value to return to client if bypassing default processing
Throws:
IOException - if an error occurred on the coprocessor

preIncrementColumnValue

public long preIncrementColumnValue(ObserverContext<RegionCoprocessorEnvironment> c,
                                    byte[] row,
                                    byte[] family,
                                    byte[] qualifier,
                                    long amount,
                                    boolean writeToWAL)
                             throws IOException
Description copied from interface: RegionObserver
Called before incrementColumnValue

Call CoprocessorEnvironment#bypass to skip default actions

Call CoprocessorEnvironment#complete to skip any subsequent chained coprocessors

Specified by:
preIncrementColumnValue in interface RegionObserver
Overrides:
preIncrementColumnValue in class BaseRegionObserver
Parameters:
c - the environment provided by the region server
row - row to check
family - column family
qualifier - column qualifier
amount - long amount to increment
writeToWAL - true if the change should be written to the WAL
Returns:
value to return to the client if bypassing default processing
Throws:
IOException - if an error occurred on the coprocessor

preAppend

public Result preAppend(ObserverContext<RegionCoprocessorEnvironment> c,
                        Append append)
                 throws IOException
Description copied from interface: RegionObserver
Called before Append

Call CoprocessorEnvironment#bypass to skip default actions

Call CoprocessorEnvironment#complete to skip any subsequent chained coprocessors

Specified by:
preAppend in interface RegionObserver
Overrides:
preAppend in class BaseRegionObserver
Parameters:
c - the environment provided by the region server
append - Append object
Returns:
result to return to the client if bypassing default processing
Throws:
IOException - if an error occurred on the coprocessor

preIncrement

public Result preIncrement(ObserverContext<RegionCoprocessorEnvironment> c,
                           Increment increment)
                    throws IOException
Description copied from interface: RegionObserver
Called before Increment

Call CoprocessorEnvironment#bypass to skip default actions

Call CoprocessorEnvironment#complete to skip any subsequent chained coprocessors

Specified by:
preIncrement in interface RegionObserver
Overrides:
preIncrement in class BaseRegionObserver
Parameters:
c - the environment provided by the region server
increment - increment object
Returns:
result to return to the client if bypassing default processing
Throws:
IOException - if an error occurred on the coprocessor

preScannerOpen

public RegionScanner preScannerOpen(ObserverContext<RegionCoprocessorEnvironment> c,
                                    Scan scan,
                                    RegionScanner s)
                             throws IOException
Description copied from interface: RegionObserver
Called before the client opens a new scanner.

Call CoprocessorEnvironment#bypass to skip default actions

Call CoprocessorEnvironment#complete to skip any subsequent chained coprocessors

Specified by:
preScannerOpen in interface RegionObserver
Overrides:
preScannerOpen in class BaseRegionObserver
Parameters:
c - the environment provided by the region server
scan - the Scan specification
s - if not null, the base scanner
Returns:
an RegionScanner instance to use instead of the base scanner if overriding default behavior, null otherwise
Throws:
IOException - if an error occurred on the coprocessor

postScannerOpen

public RegionScanner postScannerOpen(ObserverContext<RegionCoprocessorEnvironment> c,
                                     Scan scan,
                                     RegionScanner s)
                              throws IOException
Description copied from interface: RegionObserver
Called after the client opens a new scanner.

Call CoprocessorEnvironment#complete to skip any subsequent chained coprocessors

Specified by:
postScannerOpen in interface RegionObserver
Overrides:
postScannerOpen in class BaseRegionObserver
Parameters:
c - the environment provided by the region server
scan - the Scan specification
s - if not null, the base scanner
Returns:
the scanner instance to use
Throws:
IOException - if an error occurred on the coprocessor

preScannerNext

public boolean preScannerNext(ObserverContext<RegionCoprocessorEnvironment> c,
                              InternalScanner s,
                              List<Result> result,
                              int limit,
                              boolean hasNext)
                       throws IOException
Description copied from interface: RegionObserver
Called before the client asks for the next row on a scanner.

Call CoprocessorEnvironment#bypass to skip default actions

Call CoprocessorEnvironment#complete to skip any subsequent chained coprocessors

Specified by:
preScannerNext in interface RegionObserver
Overrides:
preScannerNext in class BaseRegionObserver
Parameters:
c - the environment provided by the region server
s - the scanner
result - 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 return
hasNext - the 'has more' indication
Returns:
'has more' indication that should be sent to client
Throws:
IOException - if an error occurred on the coprocessor

preScannerClose

public void preScannerClose(ObserverContext<RegionCoprocessorEnvironment> c,
                            InternalScanner s)
                     throws IOException
Description copied from interface: RegionObserver
Called before the client closes a scanner.

Call CoprocessorEnvironment#bypass to skip default actions

Call CoprocessorEnvironment#complete to skip any subsequent chained coprocessors

Specified by:
preScannerClose in interface RegionObserver
Overrides:
preScannerClose in class BaseRegionObserver
Parameters:
c - the environment provided by the region server
s - the scanner
Throws:
IOException - if an error occurred on the coprocessor

postScannerClose

public void postScannerClose(ObserverContext<RegionCoprocessorEnvironment> c,
                             InternalScanner s)
                      throws IOException
Description copied from interface: RegionObserver
Called after the client closes a scanner.

Call CoprocessorEnvironment#complete to skip any subsequent chained coprocessors

Specified by:
postScannerClose in interface RegionObserver
Overrides:
postScannerClose in class BaseRegionObserver
Parameters:
c - the environment provided by the region server
s - the scanner
Throws:
IOException - if an error occurred on the coprocessor

preBulkLoadHFile

public void preBulkLoadHFile(ObserverContext<RegionCoprocessorEnvironment> ctx,
                             List<Pair<byte[],String>> familyPaths)
                      throws IOException
Verifies user has WRITE privileges on the Column Families involved in the bulkLoadHFile request. Specific Column Write privileges are presently ignored.

Specified by:
preBulkLoadHFile in interface RegionObserver
Overrides:
preBulkLoadHFile in class BaseRegionObserver
familyPaths - pairs of { CF, HFile path } submitted for bulk load. Adding or removing from this list will add or remove HFiles to be bulk loaded.
Throws:
IOException

prePrepareBulkLoad

public void prePrepareBulkLoad(RegionCoprocessorEnvironment e)
                        throws IOException
Authorization check for SecureBulkLoadProtocol.prepareBulkLoad()

Parameters:
e -
Throws:
IOException

preCleanupBulkLoad

public void preCleanupBulkLoad(RegionCoprocessorEnvironment e)
                        throws IOException
Authorization security check for SecureBulkLoadProtocol.cleanupBulkLoad()

Parameters:
e -
Throws:
IOException

grant

public void grant(UserPermission perm)
           throws IOException
Description copied from interface: AccessControllerProtocol
Grants the given user or group the privilege to perform the given actions

Specified by:
grant in interface AccessControllerProtocol
Parameters:
perm - the details of the provided user permissions
Throws:
IOException - if the grant could not be applied

grant

@Deprecated
public void grant(byte[] user,
                             TablePermission permission)
           throws IOException
Deprecated. 

Description copied from interface: AccessControllerProtocol
Grants the given user or group the privilege to perform the given actions over the specified scope contained in TablePermission

Specified by:
grant in interface AccessControllerProtocol
Parameters:
user - the user name, or, if prefixed with "@", group name receiving the grant
permission - the details of the provided permissions
Throws:
IOException - if the grant could not be applied

revoke

public void revoke(UserPermission perm)
            throws IOException
Description copied from interface: AccessControllerProtocol
Revokes a previously granted privilege from a user or group. Note that the provided TablePermission details must exactly match a stored grant. For example, if user "bob" has been granted "READ" access to table "data", over column family and qualifer "info:colA", then the table, column family and column qualifier must all be specified. Attempting to revoke permissions over just the "data" table will have no effect.

Specified by:
revoke in interface AccessControllerProtocol
Throws:
IOException - if the revocation could not be performed

revoke

@Deprecated
public void revoke(byte[] user,
                              TablePermission permission)
            throws IOException
Deprecated. 

Description copied from interface: AccessControllerProtocol
Revokes a previously granted privilege from a user or group. Note that the provided TablePermission details must exactly match a stored grant. For example, if user "bob" has been granted "READ" access to table "data", over column family and qualifer "info:colA", then the table, column family and column qualifier must all be specified. Attempting to revoke permissions over just the "data" table will have no effect.

Specified by:
revoke in interface AccessControllerProtocol
Parameters:
user - the user name, or, if prefixed with "@", group name whose privileges are being revoked
permission - the details of the previously granted permission to revoke
Throws:
IOException - if the revocation could not be performed

getUserPermissions

public List<UserPermission> getUserPermissions(byte[] tableName)
                                        throws IOException
Description copied from interface: AccessControllerProtocol
Queries the permissions currently stored for the given table, returning a list of currently granted permissions, along with the user or group each is associated with.

Specified by:
getUserPermissions in interface AccessControllerProtocol
Parameters:
tableName - the table of the permission grants to return
Returns:
a list of the currently granted permissions, with associated user or group names
Throws:
IOException - if there is an error querying the permissions

checkPermissions

public void checkPermissions(Permission[] permissions)
                      throws IOException
Description copied from interface: AccessControllerProtocol
Checks whether the given Permissions will pass the access checks for the current user. Global permissions can be checked from the -acl- table or any other table, however TablePermissions can only be checked by the table's regions. If access control checks fail this method throws AccessDeniedException.

Specified by:
checkPermissions in interface AccessControllerProtocol
Parameters:
permissions - to check for. Permission subclasses can be used to do more specific checks at the table/family/column level.
Throws:
IOException - if there is an error checking the permissions

getProtocolVersion

public long getProtocolVersion(String protocol,
                               long clientVersion)
                        throws IOException
Description copied from interface: VersionedProtocol
Return protocol version corresponding to protocol interface.

Specified by:
getProtocolVersion in interface VersionedProtocol
Parameters:
protocol - The classname of the protocol interface
clientVersion - The version of the protocol that the client speaks
Returns:
the version that the server will speak
Throws:
IOException - if any IO error occurs

getProtocolSignature

public ProtocolSignature getProtocolSignature(String protocol,
                                              long clientVersion,
                                              int clientMethodsHash)
                                       throws IOException
Description copied from interface: VersionedProtocol
Return protocol version corresponding to protocol interface.

Specified by:
getProtocolSignature in interface VersionedProtocol
Parameters:
protocol - The classname of the protocol interface
clientVersion - The version of the protocol that the client speaks
clientMethodsHash - the hashcode of client protocol methods
Returns:
the server protocol signature containing its version and a list of its supported methods
Throws:
IOException
See Also:
for a default implementation

preClose

public void preClose(ObserverContext<RegionCoprocessorEnvironment> e,
                     boolean abortRequested)
              throws IOException
Description copied from interface: RegionObserver
Called before the region is reported as closed to the master.

Specified by:
preClose in interface RegionObserver
Overrides:
preClose in class BaseRegionObserver
Parameters:
e - the environment provided by the region server
abortRequested - true if the region server is aborting
Throws:
IOException

preLockRow

public void preLockRow(ObserverContext<RegionCoprocessorEnvironment> ctx,
                       byte[] regionName,
                       byte[] row)
                throws IOException
Description copied from interface: RegionObserver
Called before locking a row.

Specified by:
preLockRow in interface RegionObserver
Overrides:
preLockRow in class BaseRegionObserver
Throws:
IOException - Signals that an I/O exception has occurred.

preUnlockRow

public void preUnlockRow(ObserverContext<RegionCoprocessorEnvironment> ctx,
                         byte[] regionName,
                         long lockId)
                  throws IOException
Description copied from interface: RegionObserver
Called before unlocking a row.

Specified by:
preUnlockRow in interface RegionObserver
Overrides:
preUnlockRow in class BaseRegionObserver
lockId - the lock id
Throws:
IOException - Signals that an I/O exception has occurred.

preStopRegionServer

public void preStopRegionServer(ObserverContext<RegionServerCoprocessorEnvironment> env)
                         throws IOException
Description copied from interface: RegionServerObserver
Called before stopping region server.

Specified by:
preStopRegionServer in interface RegionServerObserver
Parameters:
env - An instance of RegionServerCoprocessorEnvironment
Throws:
IOException - Signals that an I/O exception has occurred.


Copyright © 2013 The Apache Software Foundation. All Rights Reserved.