Class ExampleRegionObserverWithMetrics.ExampleRegionObserver
java.lang.Object
org.apache.hadoop.hbase.coprocessor.example.ExampleRegionObserverWithMetrics.ExampleRegionObserver
- All Implemented Interfaces:
Coprocessor,RegionCoprocessor,RegionObserver
- Enclosing class:
- ExampleRegionObserverWithMetrics
class ExampleRegionObserverWithMetrics.ExampleRegionObserver
extends Object
implements RegionCoprocessor, RegionObserver
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.apache.hadoop.hbase.Coprocessor
Coprocessor.StateNested 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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate voidvoidpostCompactSelection(ObserverContext<? extends RegionCoprocessorEnvironment> c, Store store, List<? extends StoreFile> selected, CompactionLifeCycleTracker tracker, CompactionRequest request) Called after theStoreFiles to compact have been selected from the available candidates.voidpostFlush(ObserverContext<? extends RegionCoprocessorEnvironment> c, FlushLifeCycleTracker tracker) Called after the memstore is flushed to disk.voidpostFlush(ObserverContext<? extends RegionCoprocessorEnvironment> c, Store store, StoreFile resultFile, FlushLifeCycleTracker tracker) Called after a Store's memstore is flushed to disk.voidpostGetOp(ObserverContext<? extends RegionCoprocessorEnvironment> e, Get get, List<Cell> results) Called after the client performs a GetvoidpreGetOp(ObserverContext<? extends RegionCoprocessorEnvironment> e, Get get, List<Cell> results) Called before the client performs a GetMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.hadoop.hbase.Coprocessor
getServices, start, stopMethods inherited from interface org.apache.hadoop.hbase.coprocessor.RegionCoprocessor
getBulkLoadObserver, getEndpointObserverMethods inherited from interface org.apache.hadoop.hbase.coprocessor.RegionObserver
postAppend, postAppend, postAppendBeforeWAL, postBatchMutate, postBatchMutateIndispensably, postBulkLoadHFile, postCheckAndDelete, postCheckAndDelete, postCheckAndMutate, postCheckAndPut, postCheckAndPut, postClose, postCloseRegionOperation, postCommitStoreFile, postCompact, postDelete, postDelete, postExists, postIncrement, postIncrement, postIncrementBeforeWAL, postInstantiateDeleteTracker, postMemStoreCompaction, postMutationBeforeWAL, postOpen, postPut, postPut, postReplayWALs, postScannerClose, postScannerFilterRow, postScannerNext, postScannerOpen, postStartRegionOperation, postStoreFileReaderOpen, postWALRestore, 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, preIncrement, preIncrement, preIncrementAfterRowLock, preMemStoreCompaction, preMemStoreCompactionCompact, preMemStoreCompactionCompactScannerOpen, preOpen, prePrepareTimeStampForDeleteVersion, prePut, prePut, preReplayWALs, preScannerClose, preScannerNext, preScannerOpen, preStoreFileReaderOpen, preStoreScannerOpen, preWALAppend, preWALRestore
-
Constructor Details
-
ExampleRegionObserver
-
-
Method Details
-
getRegionObserver
- Specified by:
getRegionObserverin interfaceRegionCoprocessor
-
preGetOp
public void preGetOp(ObserverContext<? extends RegionCoprocessorEnvironment> e, Get get, List<Cell> results) throws IOException Description copied from interface:RegionObserverCalled before the client performs a GetCall CoprocessorEnvironment#bypass to skip default actions. If 'bypass' is set, we skip out on calling any subsequent chained coprocessors.
- Specified by:
preGetOpin interfaceRegionObserver- Parameters:
e- 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.- Throws:
IOException
-
postGetOp
public void postGetOp(ObserverContext<? extends RegionCoprocessorEnvironment> e, Get get, List<Cell> results) throws IOException Description copied from interface:RegionObserverCalled after the client performs a GetNote: 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.
- Specified by:
postGetOpin interfaceRegionObserver- Parameters:
e- the environment provided by the region serverget- the Get requestresults- the result to return to the client, modify as necessary- Throws:
IOException
-
postFlush
public void postFlush(ObserverContext<? extends RegionCoprocessorEnvironment> c, FlushLifeCycleTracker tracker) throws IOException Description copied from interface:RegionObserverCalled after the memstore is flushed to disk.- Specified by:
postFlushin interfaceRegionObserver- Parameters:
c- the environment provided by the region servertracker- tracker used to track the life cycle of a flush- Throws:
IOException- if an error occurred on the coprocessor
-
postFlush
public void postFlush(ObserverContext<? extends RegionCoprocessorEnvironment> c, Store store, StoreFile resultFile, FlushLifeCycleTracker tracker) throws IOException Description copied from interface:RegionObserverCalled after a Store's memstore is flushed to disk.- Specified by:
postFlushin interfaceRegionObserver- Parameters:
c- 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 flush- Throws:
IOException
-
postCompactSelection
public void postCompactSelection(ObserverContext<? extends RegionCoprocessorEnvironment> c, Store store, List<? extends StoreFile> selected, CompactionLifeCycleTracker tracker, CompactionRequest request) Description copied from interface:RegionObserverCalled after theStoreFiles to compact have been selected from the available candidates.- Specified by:
postCompactSelectionin interfaceRegionObserver- Parameters:
c- 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 compaction
-
performCostlyOperation
-