class MetaTableMetrics.ExampleRegionObserverMeta extends Object implements RegionCoprocessor, RegionObserver
Coprocessor.State
RegionObserver.MutationType
PRIORITY_HIGHEST, PRIORITY_LOWEST, PRIORITY_SYSTEM, PRIORITY_USER, VERSION
Constructor and Description |
---|
ExampleRegionObserverMeta() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getBulkLoadObserver, getEndpointObserver
getServices, start, stop
postAppend, postBatchMutate, postBatchMutateIndispensably, postBulkLoadHFile, postCheckAndDelete, postCheckAndPut, postClose, postCloseRegionOperation, postCommitStoreFile, postCompact, postCompactSelection, postDelete, postExists, postFlush, postFlush, postGetOp, postIncrement, postInstantiateDeleteTracker, postMemStoreCompaction, postMutationBeforeWAL, postOpen, postPut, postReplayWALs, postScannerClose, postScannerFilterRow, postScannerNext, postScannerOpen, postStartRegionOperation, postStoreFileReaderOpen, postWALRestore, preAppend, preAppendAfterRowLock, preBatchMutate, preBulkLoadHFile, preCheckAndDelete, preCheckAndDeleteAfterRowLock, preCheckAndPut, preCheckAndPutAfterRowLock, preClose, preCommitStoreFile, preCompact, preCompactScannerOpen, preCompactSelection, preExists, preFlush, preFlush, preFlushScannerOpen, preIncrement, preIncrementAfterRowLock, preMemStoreCompaction, preMemStoreCompactionCompact, preMemStoreCompactionCompactScannerOpen, preOpen, prePrepareTimeStampForDeleteVersion, preReplayWALs, preScannerClose, preScannerNext, preScannerOpen, preStoreFileReaderOpen, preStoreScannerOpen, preWALRestore
ExampleRegionObserverMeta()
public Optional<RegionObserver> getRegionObserver()
getRegionObserver
in interface RegionCoprocessor
public void preGetOp(ObserverContext<RegionCoprocessorEnvironment> e, Get get, List<Cell> results) throws IOException
RegionObserver
Call CoprocessorEnvironment#bypass to skip default actions. If 'bypass' is set, we skip out on calling any subsequent chained coprocessors.
preGetOp
in interface RegionObserver
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
public void prePut(ObserverContext<RegionCoprocessorEnvironment> e, Put put, WALEdit edit, Durability durability) throws IOException
RegionObserver
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.
prePut
in interface RegionObserver
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 PutIOException
public void preDelete(ObserverContext<RegionCoprocessorEnvironment> e, Delete delete, WALEdit edit, Durability durability) throws IOException
RegionObserver
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.
preDelete
in interface RegionObserver
e
- the environment provided by the region serverdelete
- The Delete objectedit
- The WALEdit object for the waldurability
- Persistence guarantee for this DeleteIOException
private void markMeterIfPresent(String requestMeter)
private void registerMeterIfNotPresent(ObserverContext<RegionCoprocessorEnvironment> e, String requestMeter)
private void registerLossyCountingMeterIfNotPresent(ObserverContext<RegionCoprocessorEnvironment> e, String requestMeter, LossyCounting lossyCounting)
e
- Region coprocessor environmentrequestMeter
- meter to be registeredlossyCounting
- lossyCounting object for one type of meters.private String getTableNameFromOp(Row op)
op
- such as get, put or delete.private String getRegionIdFromOp(Row op)
op
- such as get, put or delete.private boolean isMetaTableOp(ObserverContext<RegionCoprocessorEnvironment> e)
private void clientMetricRegisterAndMark(ObserverContext<RegionCoprocessorEnvironment> e)
private void tableMetricRegisterAndMark(ObserverContext<RegionCoprocessorEnvironment> e, Row op)
private void regionMetricRegisterAndMark(ObserverContext<RegionCoprocessorEnvironment> e, Row op)
private void opMetricRegisterAndMark(ObserverContext<RegionCoprocessorEnvironment> e, Row op)
private void opWithClientMetricRegisterAndMark(ObserverContext<RegionCoprocessorEnvironment> e, Object op)
private String opWithClientMeterName(Object op)
private String opMeterName(Object op)
private String tableMeterName(String tableName)
private String clientRequestMeterName(String clientIP)
private String regionMeterName(String regionId)
Copyright © 2007–2019 The Apache Software Foundation. All rights reserved.