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.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
private String
clientRequestMeterName
(String clientIP) private String
getRegionIdFromOp
(Row op) Get regionId from Ops such as: get, put, delete.private String
Get table name from Ops such as: get, put, delete.private boolean
private String
opMeterName
(Object op) private void
private String
private void
void
preDelete
(ObserverContext<RegionCoprocessorEnvironment> e, Delete delete, WALEdit edit, Durability durability) Called before the client deletes a value.void
preGetOp
(ObserverContext<RegionCoprocessorEnvironment> e, Get get, List<Cell> results) Called before the client performs a Getvoid
prePut
(ObserverContext<RegionCoprocessorEnvironment> e, Put put, WALEdit edit, Durability durability) Called before the client stores a value.private String
regionMeterName
(String regionId) private void
private void
registerAndMarkMeter
(String requestMeter) private void
private String
tableMeterName
(String tableName) private void
Methods 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, 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:
getRegionObserver
in interfaceRegionCoprocessor
-
preGetOp
public void preGetOp(ObserverContext<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
-
prePut
public void prePut(ObserverContext<RegionCoprocessorEnvironment> e, Put put, WALEdit edit, Durability durability) throws IOException Description copied from interface:RegionObserver
Called 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:
prePut
in 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<RegionCoprocessorEnvironment> e, Delete delete, WALEdit edit, Durability durability) Description copied from interface:RegionObserver
Called 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:
preDelete
in 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
-
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
-