Class MetaTableMetrics.ExampleRegionObserverMeta
- All Implemented Interfaces:
Coprocessor,RegionCoprocessor,RegionObserver
- Enclosing class:
- MetaTableMetrics
-
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 voidprivate StringclientRequestMeterName(String clientIP) private StringgetRegionIdFromOp(Row op) Get regionId from Ops such as: get, put, delete.private StringGet table name from Ops such as: get, put, delete.private booleanisMetaTableOp(ObserverContext<? extends RegionCoprocessorEnvironment> e) private StringopMeterName(Object op) private voidprivate Stringprivate voidvoidpreDelete(ObserverContext<? extends RegionCoprocessorEnvironment> e, Delete delete, WALEdit edit, Durability durability) Called before the client deletes a value.voidpreGetOp(ObserverContext<? extends RegionCoprocessorEnvironment> e, Get get, List<Cell> results) Called before the client performs a GetvoidprePut(ObserverContext<? extends RegionCoprocessorEnvironment> e, Put put, WALEdit edit, Durability durability) Called before the client stores a value.private StringregionMeterName(String regionId) private voidprivate voidregisterAndMarkMeter(String requestMeter) private voidregisterAndMarkMetrics(ObserverContext<? extends RegionCoprocessorEnvironment> e, Row row) private StringtableMeterName(String tableName) private voidMethods 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, postCompactSelection, postDelete, postDelete, postExists, postFlush, postFlush, postGetOp, 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, preExists, preFlush, preFlush, preFlushScannerOpen, preIncrement, preIncrement, preIncrementAfterRowLock, preMemStoreCompaction, preMemStoreCompactionCompact, preMemStoreCompactionCompactScannerOpen, preOpen, prePrepareTimeStampForDeleteVersion, prePut, preReplayWALs, preScannerClose, preScannerNext, preScannerOpen, preStoreFileReaderOpen, preStoreScannerOpen, preWALAppend, preWALRestore
-
Constructor Details
-
ExampleRegionObserverMeta
-
-
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
-
prePut
public void prePut(ObserverContext<? extends RegionCoprocessorEnvironment> e, Put put, WALEdit edit, Durability durability) throws IOException Description copied from interface:RegionObserverCalled before the client stores a value.Call CoprocessorEnvironment#bypass to skip default actions. If 'bypass' is set, we skip out on calling any subsequent chained coprocessors.
Note: Do not retain references to any Cells in 'put' beyond the life of this invocation. If need a Cell reference for later use, copy the cell and use that.
- Specified by:
prePutin interfaceRegionObserver- Parameters:
e- the environment provided by the region serverput- The Put objectedit- The WALEdit object that will be written to the waldurability- Persistence guarantee for this Put- Throws:
IOException
-
preDelete
public void preDelete(ObserverContext<? extends RegionCoprocessorEnvironment> e, Delete delete, WALEdit edit, Durability durability) Description copied from interface:RegionObserverCalled before the client deletes a value.Call CoprocessorEnvironment#bypass to skip default actions. If 'bypass' is set, we skip out on calling any subsequent chained coprocessors.
Note: Do not retain references to any Cells in 'delete' beyond the life of this invocation. If need a Cell reference for later use, copy the cell and use that.
- Specified by:
preDeletein interfaceRegionObserver- Parameters:
e- the environment provided by the region serverdelete- The Delete objectedit- The WALEdit object for the waldurability- Persistence guarantee for this Delete
-
registerAndMarkMetrics
private void registerAndMarkMetrics(ObserverContext<? extends RegionCoprocessorEnvironment> e, Row row) -
getTableNameFromOp
Get table name from Ops such as: get, put, delete.- Parameters:
op- such as get, put or delete.
-
getRegionIdFromOp
Get regionId from Ops such as: get, put, delete.- Parameters:
op- such as get, put or delete.
-
isMetaTableOp
-
clientMetricRegisterAndMark
-
tableMetricRegisterAndMark
-
regionMetricRegisterAndMark
-
opMetricRegisterAndMark
-
opWithClientMetricRegisterAndMark
-
registerAndMarkMeter
-
opWithClientMeterName
-
opMeterName
-
tableMeterName
-
clientRequestMeterName
-
regionMeterName
-