public static class TestCoprocessorScanPolicy.ScanObserver extends BaseRegionObserver
RegionObserver.MutationType
Coprocessor.State
PRIORITY_HIGHEST, PRIORITY_LOWEST, PRIORITY_SYSTEM, PRIORITY_USER, VERSION
Constructor and Description |
---|
ScanObserver() |
Modifier and Type | Method and Description |
---|---|
InternalScanner |
preCompactScannerOpen(ObserverContext<RegionCoprocessorEnvironment> c,
Store store,
List<? extends KeyValueScanner> scanners,
ScanType scanType,
long earliestPutTs,
InternalScanner s)
Called prior to writing the
StoreFile s selected for compaction into a new
StoreFile and prior to creating the scanner used to read the input files. |
InternalScanner |
preFlushScannerOpen(ObserverContext<RegionCoprocessorEnvironment> c,
Store store,
KeyValueScanner memstoreScanner,
InternalScanner s)
Called before a memstore is flushed to disk and prior to creating the scanner to read from
the memstore.
|
void |
prePut(ObserverContext<RegionCoprocessorEnvironment> c,
Put put,
WALEdit edit,
Durability durability)
Called before the client stores a value.
|
KeyValueScanner |
preStoreScannerOpen(ObserverContext<RegionCoprocessorEnvironment> c,
Store store,
Scan scan,
NavigableSet<byte[]> targetCols,
KeyValueScanner s)
Called before a store opens a new scanner.
|
postAppend, postBatchMutate, postBatchMutateIndispensably, postBulkLoadHFile, postCheckAndDelete, postCheckAndPut, postClose, postCloseRegionOperation, postCompact, postCompact, postCompactSelection, postCompactSelection, postCompleteSplit, postDelete, postExists, postFlush, postFlush, postGetClosestRowBefore, postGetOp, postIncrement, postIncrementColumnValue, postInstantiateDeleteTracker, postLogReplay, postMutationBeforeWAL, postOpen, postPut, postRollBackSplit, postScannerClose, postScannerFilterRow, postScannerNext, postScannerOpen, postSplit, postStartRegionOperation, postStoreFileReaderOpen, postWALRestore, postWALRestore, preAppend, preAppendAfterRowLock, preBatchMutate, preBulkLoadHFile, preCheckAndDelete, preCheckAndDeleteAfterRowLock, preCheckAndPut, preCheckAndPutAfterRowLock, preClose, preCompact, preCompact, preCompactScannerOpen, preCompactSelection, preCompactSelection, preDelete, preExists, preFlush, preFlush, preGetClosestRowBefore, preGetOp, preIncrement, preIncrementAfterRowLock, preIncrementColumnValue, preOpen, prePrepareTimeStampForDeleteVersion, preRollBackSplit, preScannerClose, preScannerNext, preScannerOpen, preSplit, preSplit, preSplitAfterPONR, preSplitBeforePONR, preStoreFileReaderOpen, preWALRestore, preWALRestore, start, stop
public void prePut(ObserverContext<RegionCoprocessorEnvironment> c, Put put, WALEdit edit, Durability durability) throws IOException
RegionObserver
Call CoprocessorEnvironment#bypass to skip default actions
Call CoprocessorEnvironment#complete to skip any subsequent chained coprocessors
prePut
in interface RegionObserver
prePut
in class BaseRegionObserver
c
- the environment provided by the region serverput
- The Put objectedit
- The WALEdit object that will be written to the waldurability
- Persistence guarantee for this PutIOException
- if an error occurred on the coprocessorpublic InternalScanner preFlushScannerOpen(ObserverContext<RegionCoprocessorEnvironment> c, Store store, KeyValueScanner memstoreScanner, InternalScanner s) throws IOException
RegionObserver
StoreFile
or null to perform the default processing.
Calling ObserverContext.bypass()
has no
effect in this hook.preFlushScannerOpen
in interface RegionObserver
preFlushScannerOpen
in class BaseRegionObserver
c
- the environment provided by the region serverstore
- the store being flushedmemstoreScanner
- the scanner for the memstore that is flusheds
- the base scanner, if not null
, from previous RegionObserver in the chainnull
if the default implementation
is to be used.IOException
- if an error occurred on the coprocessorpublic InternalScanner preCompactScannerOpen(ObserverContext<RegionCoprocessorEnvironment> c, Store store, List<? extends KeyValueScanner> scanners, ScanType scanType, long earliestPutTs, InternalScanner s) throws IOException
RegionObserver
StoreFile
s selected for compaction into a new
StoreFile
and prior to creating the scanner used to read the input files. To override
or modify the compaction process, implementing classes can return a new scanner to provide the
KeyValues to be stored into the new StoreFile
or null to perform the default
processing. Calling ObserverContext.bypass()
has no
effect in this hook.preCompactScannerOpen
in interface RegionObserver
preCompactScannerOpen
in class BaseRegionObserver
c
- the environment provided by the region serverstore
- the store being compactedscanners
- the list StoreFileScanner
s
to be read fromscanType
- the ScanType
indicating whether this is a major or minor compactionearliestPutTs
- timestamp of the earliest put that was found in any of the involved store
filess
- the base scanner, if not null
, from previous RegionObserver in the chainnull
if the default implementation is to
be used.IOException
- if an error occurred on the coprocessorpublic KeyValueScanner preStoreScannerOpen(ObserverContext<RegionCoprocessorEnvironment> c, Store store, Scan scan, NavigableSet<byte[]> targetCols, KeyValueScanner s) throws IOException
RegionObserver
See RegionObserver.preFlushScannerOpen(ObserverContext, Store, KeyValueScanner, InternalScanner)
and RegionObserver.preCompactScannerOpen(ObserverContext,
Store, List, ScanType, long, InternalScanner)
to override scanners created for flushes or compactions, resp.
Call CoprocessorEnvironment#complete to skip any subsequent chained
coprocessors.
Calling ObserverContext.bypass()
has no
effect in this hook.
preStoreScannerOpen
in interface RegionObserver
preStoreScannerOpen
in class BaseRegionObserver
c
- the environment provided by the region serverstore
- the store being scannedscan
- the Scan specificationtargetCols
- columns to be used in the scanners
- the base scanner, if not null
, from previous RegionObserver in the chainnull
to use the default implementationIOException
- if an error occurred on the coprocessor