class ExampleRegionObserverWithMetrics.ExampleRegionObserver extends Object implements RegionCoprocessor, RegionObserver
Coprocessor.StateRegionObserver.MutationTypePRIORITY_HIGHEST, PRIORITY_LOWEST, PRIORITY_SYSTEM, PRIORITY_USER, VERSION| Constructor and Description | 
|---|
| ExampleRegionObserver() | 
| Modifier and Type | Method and Description | 
|---|---|
| Optional<RegionObserver> | getRegionObserver() | 
| private void | performCostlyOperation() | 
| void | postCompactSelection(ObserverContext<RegionCoprocessorEnvironment> c,
                    Store store,
                    List<? extends StoreFile> selected,
                    CompactionLifeCycleTracker tracker,
                    CompactionRequest request)Called after the  StoreFiles to compact have been selected from the available
 candidates. | 
| void | postFlush(ObserverContext<RegionCoprocessorEnvironment> c,
         FlushLifeCycleTracker tracker)Called after the memstore is flushed to disk. | 
| void | postFlush(ObserverContext<RegionCoprocessorEnvironment> c,
         Store store,
         StoreFile resultFile,
         FlushLifeCycleTracker tracker)Called after a Store's memstore is flushed to disk. | 
| void | postGetOp(ObserverContext<RegionCoprocessorEnvironment> e,
         Get get,
         List<Cell> results)Called after the client performs a Get | 
| void | preGetOp(ObserverContext<RegionCoprocessorEnvironment> e,
        Get get,
        List<Cell> results)Called before the client performs a Get | 
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetBulkLoadObserver, getEndpointObservergetServices, start, stoppostAppend, postAppendBeforeWAL, postBatchMutate, postBatchMutateIndispensably, postBulkLoadHFile, postCheckAndDelete, postCheckAndDelete, postCheckAndMutate, postCheckAndPut, postCheckAndPut, postClose, postCloseRegionOperation, postCommitStoreFile, postCompact, postDelete, postExists, postIncrement, postIncrementBeforeWAL, postInstantiateDeleteTracker, postMemStoreCompaction, postMutationBeforeWAL, postOpen, postPut, postReplayWALs, postScannerClose, postScannerFilterRow, postScannerNext, postScannerOpen, postStartRegionOperation, postStoreFileReaderOpen, postWALRestore, preAppend, preAppendAfterRowLock, preBatchMutate, preBulkLoadHFile, preCheckAndDelete, preCheckAndDelete, preCheckAndDeleteAfterRowLock, preCheckAndDeleteAfterRowLock, preCheckAndMutate, preCheckAndMutateAfterRowLock, preCheckAndPut, preCheckAndPut, preCheckAndPutAfterRowLock, preCheckAndPutAfterRowLock, preClose, preCommitStoreFile, preCompact, preCompactScannerOpen, preCompactSelection, preDelete, preExists, preFlush, preFlush, preFlushScannerOpen, preIncrement, preIncrementAfterRowLock, preMemStoreCompaction, preMemStoreCompactionCompact, preMemStoreCompactionCompactScannerOpen, preOpen, prePrepareTimeStampForDeleteVersion, prePut, preReplayWALs, preScannerClose, preScannerNext, preScannerOpen, preStoreFileReaderOpen, preStoreScannerOpen, preWALAppend, preWALRestoreExampleRegionObserver()
public Optional<RegionObserver> getRegionObserver()
getRegionObserver in interface RegionCoprocessorpublic void preGetOp(ObserverContext<RegionCoprocessorEnvironment> e, Get get, List<Cell> results) throws IOException
RegionObserverCall CoprocessorEnvironment#bypass to skip default actions. If 'bypass' is set, we skip out on calling any subsequent chained coprocessors.
preGetOp in interface RegionObservere - the environment provided by the region serverget - the Get requestresults - 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.IOExceptionpublic void postGetOp(ObserverContext<RegionCoprocessorEnvironment> e, Get get, List<Cell> results) throws IOException
RegionObserverNote: Do not retain references to any Cells in 'result' beyond the life of this invocation. If need a Cell reference for later use, copy the cell and use that.
postGetOp in interface RegionObservere - the environment provided by the region serverget - the Get requestresults - the result to return to the client, modify as necessaryIOExceptionpublic void postFlush(ObserverContext<RegionCoprocessorEnvironment> c, FlushLifeCycleTracker tracker) throws IOException
RegionObserverpostFlush in interface RegionObserverc - the environment provided by the region servertracker - tracker used to track the life cycle of a flushIOException - if an error occurred on the coprocessorpublic void postFlush(ObserverContext<RegionCoprocessorEnvironment> c, Store store, StoreFile resultFile, FlushLifeCycleTracker tracker) throws IOException
RegionObserverpostFlush in interface RegionObserverc - the environment provided by the region serverstore - the store being flushedresultFile - the new store file written out during compactiontracker - tracker used to track the life cycle of a flushIOExceptionpublic void postCompactSelection(ObserverContext<RegionCoprocessorEnvironment> c, Store store, List<? extends StoreFile> selected, CompactionLifeCycleTracker tracker, CompactionRequest request)
RegionObserverStoreFiles to compact have been selected from the available
 candidates.postCompactSelection in interface RegionObserverc - the environment provided by the region serverstore - the store being compactedselected - the store files selected to compacttracker - tracker used to track the life cycle of a compactionrequest - the requested compactionprivate void performCostlyOperation()
Copyright © 2007–2021 The Apache Software Foundation. All rights reserved.