public class ExampleRegionObserverWithMetrics extends BaseRegionObserver
These metrics will be available through the regular Hadoop metrics2 sinks (ganglia, opentsdb, etc) as well as JMX output. You can view a snapshot of the metrics by going to the http web UI of the regionserver page, something like http://myregionserverhost:16030/jmx
ExampleMasterObserverWithMetrics
RegionObserver.MutationType
Coprocessor.State
PRIORITY_HIGHEST, PRIORITY_LOWEST, PRIORITY_SYSTEM, PRIORITY_USER, VERSION
Constructor and Description |
---|
ExampleRegionObserverWithMetrics() |
Modifier and Type | Method and Description |
---|---|
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
|
void |
start(CoprocessorEnvironment env) |
void |
stop(CoprocessorEnvironment e) |
postAppend, postBatchMutate, postBatchMutateIndispensably, postBulkLoadHFile, postCheckAndDelete, postCheckAndPut, postClose, postCloseRegionOperation, postCommitStoreFile, postCompact, postCompact, postCompactSelection, postCompactSelection, postCompleteSplit, postDelete, postExists, postFlush, postFlush, postGetClosestRowBefore, 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, preCompact, preCompactScannerOpen, preCompactScannerOpen, preCompactScannerOpen, preCompactSelection, preCompactSelection, preDelete, preExists, preFlush, preFlush, preFlushScannerOpen, preFlushScannerOpen, preGetClosestRowBefore, preIncrement, preIncrementAfterRowLock, preIncrementColumnValue, preOpen, prePrepareTimeStampForDeleteVersion, prePut, preRollBackSplit, preScannerClose, preScannerNext, preScannerOpen, preSplit, preSplit, preSplitAfterPONR, preSplitBeforePONR, preStoreFileReaderOpen, preStoreScannerOpen, preWALRestore, preWALRestore
public void preGetOp(ObserverContext<RegionCoprocessorEnvironment> e, Get get, List<Cell> results) throws IOException
RegionObserver
Call CoprocessorEnvironment#bypass to skip default actions
Call CoprocessorEnvironment#complete to skip any subsequent chained coprocessors
preGetOp
in interface RegionObserver
preGetOp
in class BaseRegionObserver
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.IOException
- if an error occurred on the coprocessorpublic void postGetOp(ObserverContext<RegionCoprocessorEnvironment> e, Get get, List<Cell> results) throws IOException
RegionObserver
Call CoprocessorEnvironment#complete to skip any subsequent chained coprocessors
postGetOp
in interface RegionObserver
postGetOp
in class BaseRegionObserver
e
- the environment provided by the region serverget
- the Get requestresults
- the result to return to the client, modify as necessaryIOException
- if an error occurred on the coprocessorpublic void start(CoprocessorEnvironment env) throws IOException
start
in interface Coprocessor
start
in class BaseRegionObserver
IOException
public void stop(CoprocessorEnvironment e) throws IOException
stop
in interface Coprocessor
stop
in class BaseRegionObserver
IOException
Copyright © 2007–2019 The Apache Software Foundation. All rights reserved.