Class ScanModifyingObserver
java.lang.Object
org.apache.hadoop.hbase.coprocessor.example.ScanModifyingObserver
- All Implemented Interfaces:
Coprocessor
,RegionCoprocessor
,RegionObserver
@Private
public class ScanModifyingObserver
extends Object
implements RegionCoprocessor, RegionObserver
A RegionObserver which modifies incoming Scan requests to include additional columns than what
the user actually requested.
-
Nested Class Summary
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
Modifier and TypeFieldDescriptionprivate byte[]
static final String
private byte[]
static final String
Fields inherited from interface org.apache.hadoop.hbase.Coprocessor
PRIORITY_HIGHEST, PRIORITY_LOWEST, PRIORITY_SYSTEM, PRIORITY_USER, VERSION
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
preScannerOpen
(ObserverContext<? extends RegionCoprocessorEnvironment> c, Scan scan) Called before the client opens a new scanner.void
Called by theCoprocessorEnvironment
during it's own startup to initialize the coprocessor.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.apache.hadoop.hbase.Coprocessor
getServices, stop
Methods inherited from interface org.apache.hadoop.hbase.coprocessor.RegionCoprocessor
getBulkLoadObserver, getEndpointObserver
Methods inherited from interface org.apache.hadoop.hbase.coprocessor.RegionObserver
postAppend, postAppend, postAppendBeforeWAL, postBatchMutate, postBatchMutateIndispensably, postBulkLoadHFile, postCheckAndDelete, postCheckAndDelete, postCheckAndMutate, postCheckAndPut, postCheckAndPut, postClose, postCloseRegionOperation, postCommitStoreFile, postCompact, postCompactSelection, postDelete, postDelete, postExists, postFlush, postFlush, postGetOp, postIncrement, postIncrement, postIncrementBeforeWAL, postInstantiateDeleteTracker, postMemStoreCompaction, postMutationBeforeWAL, postOpen, postPut, postPut, postReplayWALs, postScannerClose, postScannerFilterRow, postScannerNext, postScannerOpen, postStartRegionOperation, postStoreFileReaderOpen, preAppend, preAppend, preAppendAfterRowLock, preBatchMutate, preBulkLoadHFile, preCheckAndDelete, preCheckAndDelete, preCheckAndDeleteAfterRowLock, preCheckAndDeleteAfterRowLock, preCheckAndMutate, preCheckAndMutateAfterRowLock, preCheckAndPut, preCheckAndPut, preCheckAndPutAfterRowLock, preCheckAndPutAfterRowLock, preClose, preCommitStoreFile, preCompact, preCompactScannerOpen, preCompactSelection, preDelete, preDelete, preExists, preFlush, preFlush, preFlushScannerOpen, preGetOp, preIncrement, preIncrement, preIncrementAfterRowLock, preMemStoreCompaction, preMemStoreCompactionCompact, preMemStoreCompactionCompactScannerOpen, preOpen, prePrepareTimeStampForDeleteVersion, prePut, prePut, preReplayWALs, preScannerClose, preScannerNext, preStoreFileReaderOpen, preStoreScannerOpen, preWALAppend
-
Field Details
-
FAMILY_TO_ADD_KEY
- See Also:
-
QUALIFIER_TO_ADD_KEY
- See Also:
-
FAMILY_TO_ADD
-
QUALIFIER_TO_ADD
-
-
Constructor Details
-
ScanModifyingObserver
public ScanModifyingObserver()
-
-
Method Details
-
start
Description copied from interface:Coprocessor
Called by theCoprocessorEnvironment
during it's own startup to initialize the coprocessor.- Specified by:
start
in interfaceCoprocessor
- Throws:
IOException
-
getRegionObserver
- Specified by:
getRegionObserver
in interfaceRegionCoprocessor
-
preScannerOpen
public void preScannerOpen(ObserverContext<? extends RegionCoprocessorEnvironment> c, Scan scan) throws IOException Description copied from interface:RegionObserver
Called before the client opens a new scanner.Note: Do not retain references to any Cells returned by scanner, beyond the life of this invocation. If need a Cell reference for later use, copy the cell and use that.
- Specified by:
preScannerOpen
in interfaceRegionObserver
- Parameters:
c
- the environment provided by the region serverscan
- the Scan specification- Throws:
IOException
-