org.apache.hadoop.hbase.security.visibility
Class VisibilityController

java.lang.Object
  extended by org.apache.hadoop.hbase.coprocessor.BaseRegionObserver
      extended by org.apache.hadoop.hbase.coprocessor.BaseMasterAndRegionObserver
          extended by org.apache.hadoop.hbase.security.visibility.VisibilityController
All Implemented Interfaces:
Coprocessor, CoprocessorService, MasterObserver, RegionObserver, VisibilityLabelsProtos.VisibilityLabelsService.Interface

@InterfaceAudience.LimitedPrivate(value="Configuration")
public class VisibilityController
extends BaseMasterAndRegionObserver
implements VisibilityLabelsProtos.VisibilityLabelsService.Interface, CoprocessorService

Coprocessor that has both the MasterObserver and RegionObserver implemented that supports in visibility labels


Nested Class Summary
static class VisibilityController.VisibilityReplication
          A RegionServerObserver impl that provides the custom VisibilityReplicationEndpoint.
 
Nested classes/interfaces inherited from interface org.apache.hadoop.hbase.Coprocessor
Coprocessor.State
 
Nested classes/interfaces inherited from interface org.apache.hadoop.hbase.coprocessor.RegionObserver
RegionObserver.MutationType
 
Field Summary
 
Fields inherited from interface org.apache.hadoop.hbase.Coprocessor
PRIORITY_HIGHEST, PRIORITY_LOWEST, PRIORITY_SYSTEM, PRIORITY_USER, VERSION
 
Constructor Summary
VisibilityController()
           
 
Method Summary
 void addLabels(com.google.protobuf.RpcController controller, VisibilityLabelsProtos.VisibilityLabelsRequest request, com.google.protobuf.RpcCallback<VisibilityLabelsProtos.VisibilityLabelsResponse> done)
          VisibilityEndpoint service related methods
 void clearAuths(com.google.protobuf.RpcController controller, VisibilityLabelsProtos.SetAuthsRequest request, com.google.protobuf.RpcCallback<VisibilityLabelsProtos.VisibilityLabelsResponse> done)
          rpc clearAuths(.SetAuthsRequest) returns (.VisibilityLabelsResponse);
 void getAuths(com.google.protobuf.RpcController controller, VisibilityLabelsProtos.GetAuthsRequest request, com.google.protobuf.RpcCallback<VisibilityLabelsProtos.GetAuthsResponse> done)
          rpc getAuths(.GetAuthsRequest) returns (.GetAuthsResponse);
 com.google.protobuf.Service getService()
           
 void listLabels(com.google.protobuf.RpcController controller, VisibilityLabelsProtos.ListLabelsRequest request, com.google.protobuf.RpcCallback<VisibilityLabelsProtos.ListLabelsResponse> done)
          rpc listLabels(.ListLabelsRequest) returns (.ListLabelsResponse);
 DeleteTracker postInstantiateDeleteTracker(ObserverContext<RegionCoprocessorEnvironment> ctx, DeleteTracker delTracker)
          Called after the ScanQueryMatcher creates ScanDeleteTracker.
 void postLogReplay(ObserverContext<RegionCoprocessorEnvironment> e)
          Called after the log replay on the region is over.
 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> e)
          Region related hooks
 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)
          Master related hooks
 void postTruncateTable(ObserverContext<MasterCoprocessorEnvironment> ctx, TableName tableName)
          Called after the truncateTable operation has been requested.
 void postTruncateTableHandler(ObserverContext<MasterCoprocessorEnvironment> ctx, TableName tableName)
          Called after HMaster truncates a table.
 void preAddColumn(ObserverContext<MasterCoprocessorEnvironment> ctx, TableName tableName, HColumnDescriptor column)
          Called prior to adding a new column family to the table.
 Result preAppend(ObserverContext<RegionCoprocessorEnvironment> e, Append append)
          Called before Append.
 void preBatchMutate(ObserverContext<RegionCoprocessorEnvironment> c, MiniBatchOperationInProgress<Mutation> miniBatchOp)
          This will be called for every batch mutation operation happening at the server.
 void preDeleteColumn(ObserverContext<MasterCoprocessorEnvironment> ctx, TableName tableName, byte[] c)
          Called prior to deleting the entire column family.
 void preDisableTable(ObserverContext<MasterCoprocessorEnvironment> ctx, TableName tableName)
          Called prior to disabling a table.
 void preGetOp(ObserverContext<RegionCoprocessorEnvironment> e, Get get, List<Cell> results)
          Called before the client performs a Get
 Result preIncrement(ObserverContext<RegionCoprocessorEnvironment> e, Increment increment)
          Called before Increment.
 void preModifyColumn(ObserverContext<MasterCoprocessorEnvironment> ctx, TableName tableName, HColumnDescriptor descriptor)
          Called prior to modifying a column family's attributes.
 void preModifyTable(ObserverContext<MasterCoprocessorEnvironment> ctx, TableName tableName, HTableDescriptor htd)
          Called prior to modifying a table's properties.
 void prePrepareTimeStampForDeleteVersion(ObserverContext<RegionCoprocessorEnvironment> ctx, Mutation delete, Cell cell, byte[] byteNow, Get get)
          Called before the server updates the timestamp for version delete with latest timestamp.
 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> e, Scan scan, RegionScanner s)
          Called before the client opens a new scanner.
 void preTruncateTable(ObserverContext<MasterCoprocessorEnvironment> ctx, TableName tableName)
          Called before HMaster truncates a table.
 void preTruncateTableHandler(ObserverContext<MasterCoprocessorEnvironment> ctx, TableName tableName)
          Called before HMaster truncates a table.
 void setAuths(com.google.protobuf.RpcController controller, VisibilityLabelsProtos.SetAuthsRequest request, com.google.protobuf.RpcCallback<VisibilityLabelsProtos.VisibilityLabelsResponse> done)
          rpc setAuths(.SetAuthsRequest) returns (.VisibilityLabelsResponse);
 void start(CoprocessorEnvironment env)
           
 void stop(CoprocessorEnvironment env)
           
 
Methods inherited from class org.apache.hadoop.hbase.coprocessor.BaseMasterAndRegionObserver
postAddColumn, postAddColumnHandler, postAssign, postBalance, postBalanceSwitch, postCloneSnapshot, postCreateNamespace, postCreateTable, postCreateTableHandler, postDeleteColumn, postDeleteColumnHandler, postDeleteNamespace, postDeleteSnapshot, postDeleteTable, postDeleteTableHandler, postDisableTable, postDisableTableHandler, postEnableTable, postEnableTableHandler, postGetTableDescriptors, postModifyColumn, postModifyColumnHandler, postModifyNamespace, postModifyTable, postModifyTableHandler, postMove, postRegionOffline, postRestoreSnapshot, postSnapshot, postUnassign, preAddColumnHandler, preAssign, preBalance, preBalanceSwitch, preCloneSnapshot, preCreateNamespace, preCreateTable, preCreateTableHandler, preDeleteColumnHandler, preDeleteNamespace, preDeleteSnapshot, preDeleteTable, preDeleteTableHandler, preDisableTableHandler, preEnableTable, preEnableTableHandler, preGetTableDescriptors, preMasterInitialization, preModifyColumnHandler, preModifyNamespace, preModifyTableHandler, preMove, preRegionOffline, preRestoreSnapshot, preShutdown, preSnapshot, preStopMaster, preUnassign
 
Methods inherited from class org.apache.hadoop.hbase.coprocessor.BaseRegionObserver
postAppend, postBatchMutate, postBatchMutateIndispensably, postBulkLoadHFile, postCheckAndDelete, postCheckAndPut, postClose, postCloseRegionOperation, postCompact, postCompact, postCompactSelection, postCompactSelection, postCompleteSplit, postDelete, postExists, postFlush, postFlush, postGet, postGetClosestRowBefore, postGetOp, postIncrement, postIncrementColumnValue, postPut, postRollBackSplit, postScannerFilterRow, postScannerNext, postSplit, postStartRegionOperation, postStoreFileReaderOpen, postWALRestore, preAppendAfterRowLock, preBulkLoadHFile, preCheckAndDelete, preCheckAndDeleteAfterRowLock, preCheckAndPut, preCheckAndPutAfterRowLock, preClose, preCompact, preCompact, preCompactScannerOpen, preCompactScannerOpen, preCompactSelection, preCompactSelection, preDelete, preExists, preFlush, preFlush, preFlushScannerOpen, preGet, preGetClosestRowBefore, preIncrementAfterRowLock, preIncrementColumnValue, preOpen, prePut, preRollBackSplit, preSplit, preSplit, preSplitAfterPONR, preSplitBeforePONR, preStoreFileReaderOpen, preStoreScannerOpen, preWALRestore
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

VisibilityController

public VisibilityController()
Method Detail

start

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

stop

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

postStartMaster

public void postStartMaster(ObserverContext<MasterCoprocessorEnvironment> ctx)
                     throws IOException
Master related hooks

Specified by:
postStartMaster in interface MasterObserver
Overrides:
postStartMaster in class BaseMasterAndRegionObserver
Throws:
IOException

preModifyTable

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

Specified by:
preModifyTable in interface MasterObserver
Overrides:
preModifyTable in class BaseMasterAndRegionObserver
Parameters:
ctx - 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> ctx,
                         TableName tableName,
                         HColumnDescriptor column)
                  throws IOException
Description copied from interface: MasterObserver
Called prior to adding a new column family to the table. Called as part of add column RPC call.

Specified by:
preAddColumn in interface MasterObserver
Overrides:
preAddColumn in class BaseMasterAndRegionObserver
Parameters:
ctx - 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> ctx,
                            TableName tableName,
                            HColumnDescriptor descriptor)
                     throws IOException
Description copied from interface: MasterObserver
Called prior to modifying a column family's attributes. Called as part of modify column RPC call.

Specified by:
preModifyColumn in interface MasterObserver
Overrides:
preModifyColumn in class BaseMasterAndRegionObserver
Parameters:
ctx - 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> ctx,
                            TableName tableName,
                            byte[] c)
                     throws IOException
Description copied from interface: MasterObserver
Called prior to deleting the entire column family. Called as part of delete column RPC call.

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

preDisableTable

public void preDisableTable(ObserverContext<MasterCoprocessorEnvironment> ctx,
                            TableName tableName)
                     throws IOException
Description copied from interface: MasterObserver
Called prior to disabling a table. Called as part of disable table RPC call. It can't bypass the default action, e.g., ctx.bypass() won't have effect.

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

postOpen

public void postOpen(ObserverContext<RegionCoprocessorEnvironment> e)
Region related hooks

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

postLogReplay

public void postLogReplay(ObserverContext<RegionCoprocessorEnvironment> e)
Description copied from interface: RegionObserver
Called after the log replay on the region is over.

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

preBatchMutate

public void preBatchMutate(ObserverContext<RegionCoprocessorEnvironment> c,
                           MiniBatchOperationInProgress<Mutation> miniBatchOp)
                    throws IOException
Description copied from interface: RegionObserver
This will be called for every batch mutation operation happening at the server. This will be called after acquiring the locks on the mutating rows and after applying the proper timestamp for each Mutation at the server. The batch may contain Put/Delete. By setting OperationStatus of Mutations (MiniBatchOperationInProgress.setOperationStatus(int, OperationStatus)), RegionObserver can make HRegion to skip these Mutations.

Specified by:
preBatchMutate in interface RegionObserver
Overrides:
preBatchMutate in class BaseRegionObserver
Parameters:
c - the environment provided by the region server
miniBatchOp - batch of Mutations getting applied to region.
Throws:
IOException - if an error occurred on the coprocessor

prePrepareTimeStampForDeleteVersion

public void prePrepareTimeStampForDeleteVersion(ObserverContext<RegionCoprocessorEnvironment> ctx,
                                                Mutation delete,
                                                Cell cell,
                                                byte[] byteNow,
                                                Get get)
                                         throws IOException
Description copied from interface: RegionObserver
Called before the server updates the timestamp for version delete with latest timestamp.

Call CoprocessorEnvironment#bypass to skip default actions

Call CoprocessorEnvironment#complete to skip any subsequent chained coprocessors

Specified by:
prePrepareTimeStampForDeleteVersion in interface RegionObserver
Overrides:
prePrepareTimeStampForDeleteVersion in class BaseRegionObserver
Parameters:
ctx - the environment provided by the region server
delete - - the parent mutation associated with this delete cell
cell - - The deleteColumn with latest version cell
byteNow - - timestamp bytes
get - - the get formed using the current cell's row. Note that the get does not specify the family and qualifier
Throws:
IOException

preScannerOpen

public RegionScanner preScannerOpen(ObserverContext<RegionCoprocessorEnvironment> e,
                                    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:
e - 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

postInstantiateDeleteTracker

public DeleteTracker postInstantiateDeleteTracker(ObserverContext<RegionCoprocessorEnvironment> ctx,
                                                  DeleteTracker delTracker)
                                           throws IOException
Description copied from interface: RegionObserver
Called after the ScanQueryMatcher creates ScanDeleteTracker. Implementing this hook would help in creating customised DeleteTracker and returning the newly created DeleteTracker

Specified by:
postInstantiateDeleteTracker in interface RegionObserver
Overrides:
postInstantiateDeleteTracker in class BaseRegionObserver
Parameters:
ctx - the environment provided by the region server
delTracker - the deleteTracker that is created by the QueryMatcher
Returns:
the Delete Tracker
Throws:
IOException

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

preGetOp

public void preGetOp(ObserverContext<RegionCoprocessorEnvironment> e,
                     Get get,
                     List<Cell> results)
              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:
preGetOp in interface RegionObserver
Overrides:
preGetOp in class BaseRegionObserver
Parameters:
e - the environment provided by the region server
get - the Get request
results - 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

preAppend

public Result preAppend(ObserverContext<RegionCoprocessorEnvironment> e,
                        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:
e - 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> e,
                           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:
e - 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

postMutationBeforeWAL

public Cell postMutationBeforeWAL(ObserverContext<RegionCoprocessorEnvironment> ctx,
                                  RegionObserver.MutationType opType,
                                  Mutation mutation,
                                  Cell oldCell,
                                  Cell newCell)
                           throws IOException
Description copied from interface: RegionObserver
Called after a new cell has been created during an increment operation, but before it is committed to the WAL or memstore. Calling ObserverContext.bypass() has no effect in this hook.

Specified by:
postMutationBeforeWAL in interface RegionObserver
Overrides:
postMutationBeforeWAL in class BaseRegionObserver
Parameters:
ctx - the environment provided by the region server
opType - the operation type
mutation - the current mutation
oldCell - old cell containing previous value
newCell - the new cell containing the computed value
Returns:
the new cell, possibly changed
Throws:
IOException

getService

public com.google.protobuf.Service getService()
Specified by:
getService in interface CoprocessorService

addLabels

public void addLabels(com.google.protobuf.RpcController controller,
                      VisibilityLabelsProtos.VisibilityLabelsRequest request,
                      com.google.protobuf.RpcCallback<VisibilityLabelsProtos.VisibilityLabelsResponse> done)
VisibilityEndpoint service related methods

Specified by:
addLabels in interface VisibilityLabelsProtos.VisibilityLabelsService.Interface

setAuths

public void setAuths(com.google.protobuf.RpcController controller,
                     VisibilityLabelsProtos.SetAuthsRequest request,
                     com.google.protobuf.RpcCallback<VisibilityLabelsProtos.VisibilityLabelsResponse> done)
Description copied from interface: VisibilityLabelsProtos.VisibilityLabelsService.Interface
rpc setAuths(.SetAuthsRequest) returns (.VisibilityLabelsResponse);

Specified by:
setAuths in interface VisibilityLabelsProtos.VisibilityLabelsService.Interface

getAuths

public void getAuths(com.google.protobuf.RpcController controller,
                     VisibilityLabelsProtos.GetAuthsRequest request,
                     com.google.protobuf.RpcCallback<VisibilityLabelsProtos.GetAuthsResponse> done)
Description copied from interface: VisibilityLabelsProtos.VisibilityLabelsService.Interface
rpc getAuths(.GetAuthsRequest) returns (.GetAuthsResponse);

Specified by:
getAuths in interface VisibilityLabelsProtos.VisibilityLabelsService.Interface

clearAuths

public void clearAuths(com.google.protobuf.RpcController controller,
                       VisibilityLabelsProtos.SetAuthsRequest request,
                       com.google.protobuf.RpcCallback<VisibilityLabelsProtos.VisibilityLabelsResponse> done)
Description copied from interface: VisibilityLabelsProtos.VisibilityLabelsService.Interface
rpc clearAuths(.SetAuthsRequest) returns (.VisibilityLabelsResponse);

Specified by:
clearAuths in interface VisibilityLabelsProtos.VisibilityLabelsService.Interface

listLabels

public void listLabels(com.google.protobuf.RpcController controller,
                       VisibilityLabelsProtos.ListLabelsRequest request,
                       com.google.protobuf.RpcCallback<VisibilityLabelsProtos.ListLabelsResponse> done)
Description copied from interface: VisibilityLabelsProtos.VisibilityLabelsService.Interface
rpc listLabels(.ListLabelsRequest) returns (.ListLabelsResponse);

Specified by:
listLabels in interface VisibilityLabelsProtos.VisibilityLabelsService.Interface

preTruncateTable

public void preTruncateTable(ObserverContext<MasterCoprocessorEnvironment> ctx,
                             TableName tableName)
                      throws IOException
Description copied from interface: MasterObserver
Called before HMaster 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.

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

postTruncateTable

public void postTruncateTable(ObserverContext<MasterCoprocessorEnvironment> ctx,
                              TableName tableName)
                       throws IOException
Description copied from interface: MasterObserver
Called after the truncateTable operation has been requested. Called as part of truncate table RPC call. The truncate is synchronous, so this method will be called when the truncate operation is terminated.

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

preTruncateTableHandler

public void preTruncateTableHandler(ObserverContext<MasterCoprocessorEnvironment> ctx,
                                    TableName tableName)
                             throws IOException
Description copied from interface: MasterObserver
Called before HMaster truncates a table. Called as part of truncate table handler and it is sync to the truncate RPC call. It can't bypass the default action, e.g., ctx.bypass() won't have effect.

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

postTruncateTableHandler

public void postTruncateTableHandler(ObserverContext<MasterCoprocessorEnvironment> ctx,
                                     TableName tableName)
                              throws IOException
Description copied from interface: MasterObserver
Called after HMaster truncates a table. Called as part of truncate table handler and it is sync to the truncate RPC call. It can't bypass the default action, e.g., ctx.bypass() won't have effect.

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


Copyright © 2015 The Apache Software Foundation. All rights reserved.