public static class TestHRegionServerBulkLoad.MyObserver extends BaseRegionObserver
RegionObserver.MutationTypeCoprocessor.StatePRIORITY_HIGHEST, PRIORITY_LOWEST, PRIORITY_SYSTEM, PRIORITY_USER, VERSION| Constructor and Description |
|---|
MyObserver() |
| Modifier and Type | Method and Description |
|---|---|
InternalScanner |
preCompact(ObserverContext<RegionCoprocessorEnvironment> e,
Store store,
InternalScanner scanner,
ScanType scanType)
Called prior to writing the
StoreFiles selected for compaction into a new
StoreFile. |
postAppend, postBatchMutate, postBatchMutateIndispensably, postBulkLoadHFile, postBulkLoadHFile, postCheckAndDelete, postCheckAndPut, postClose, postCloseRegionOperation, postCommitStoreFile, 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, preCommitStoreFile, preCompact, preCompactScannerOpen, preCompactScannerOpen, preCompactSelection, preCompactSelection, preDelete, preExists, preFlush, preFlush, preFlushScannerOpen, preGetClosestRowBefore, preGetOp, preIncrement, preIncrementAfterRowLock, preIncrementColumnValue, preOpen, prePrepareTimeStampForDeleteVersion, prePut, preRollBackSplit, preScannerClose, preScannerNext, preScannerOpen, preSplit, preSplit, preSplitAfterPONR, preSplitBeforePONR, preStoreFileReaderOpen, preStoreScannerOpen, preWALRestore, preWALRestore, start, stoppublic InternalScanner preCompact(ObserverContext<RegionCoprocessorEnvironment> e, Store store, InternalScanner scanner, ScanType scanType) throws IOException
RegionObserverStoreFiles selected for compaction into a new
StoreFile. To override or modify the compaction process, implementing classes have two
options:
InternalScanner with a custom implementation that is returned
from this method. The custom scanner can then inspect
KeyValues from the wrapped
scanner, applying its own policy to what gets written.ObserverContext.bypass() and provide a
custom implementation for writing of new StoreFiles. Note: any implementations
bypassing core compaction using this approach must write out new store files themselves or the
existing data will no longer be available after compaction.preCompact in interface RegionObserverpreCompact in class BaseRegionObservere - the environment provided by the region serverstore - the store being compactedscanner - the scanner over existing data used in the store file rewritingscanType - type of Scannull unless the
implementation is writing new store files on its own.IOException - if an error occurred on the coprocessor