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.State
Nested 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
-
Method Summary
Modifier and TypeMethodDescriptionprivate void
void
postCompactSelection
(ObserverContext<? extends RegionCoprocessorEnvironment> c, Store store, List<? extends StoreFile> selected, CompactionLifeCycleTracker tracker, CompactionRequest request) Called after theStoreFile
s to compact have been selected from the available candidates.void
postFlush
(ObserverContext<? extends RegionCoprocessorEnvironment> c, FlushLifeCycleTracker tracker) Called after the memstore is flushed to disk.void
postFlush
(ObserverContext<? extends RegionCoprocessorEnvironment> c, Store store, StoreFile resultFile, FlushLifeCycleTracker tracker) Called after a Store's memstore is flushed to disk.void
postGetOp
(ObserverContext<? extends RegionCoprocessorEnvironment> e, Get get, List<Cell> results) Called after the client performs a Getvoid
preGetOp
(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, wait
Methods inherited from interface org.apache.hadoop.hbase.Coprocessor
getServices, start, 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, postDelete, postDelete, postExists, 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, preIncrement, preIncrement, preIncrementAfterRowLock, preMemStoreCompaction, preMemStoreCompactionCompact, preMemStoreCompactionCompactScannerOpen, preOpen, prePrepareTimeStampForDeleteVersion, prePut, prePut, preReplayWALs, preScannerClose, preScannerNext, preScannerOpen, preStoreFileReaderOpen, preStoreScannerOpen, preWALAppend
-
Constructor Details
-
ExampleRegionObserver
-
-
Method Details
-
getRegionObserver
- Specified by:
getRegionObserver
in interfaceRegionCoprocessor
-
preGetOp
public void preGetOp(ObserverContext<? extends RegionCoprocessorEnvironment> e, Get get, List<Cell> results) throws IOException Description copied from interface:RegionObserver
Called 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:
preGetOp
in 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:RegionObserver
Called 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:
postGetOp
in 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:RegionObserver
Called after the memstore is flushed to disk.- Specified by:
postFlush
in 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:RegionObserver
Called after a Store's memstore is flushed to disk.- Specified by:
postFlush
in 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:RegionObserver
Called after theStoreFile
s to compact have been selected from the available candidates.- Specified by:
postCompactSelection
in 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
-