Class RegionReadOnlyController
- All Implemented Interfaces:
Coprocessor,RegionCoprocessor,RegionObserver
-
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 TypeMethodDescriptionpreAppend(ObserverContext<? extends RegionCoprocessorEnvironment> c, Append append) Called before Append.preAppend(ObserverContext<? extends RegionCoprocessorEnvironment> c, Append append, WALEdit edit) Called before Append.preAppendAfterRowLock(ObserverContext<? extends RegionCoprocessorEnvironment> c, Append append) Called before Append but after acquiring rowlock.voidpreBatchMutate(ObserverContext<? extends RegionCoprocessorEnvironment> c, MiniBatchOperationInProgress<Mutation> miniBatchOp) This will be called for every batch mutation operation happening at the server.voidpreBulkLoadHFile(ObserverContext<? extends RegionCoprocessorEnvironment> ctx, List<Pair<byte[], String>> familyPaths) Called before bulkLoadHFile.booleanpreCheckAndDelete(ObserverContext<? extends RegionCoprocessorEnvironment> c, byte[] row, byte[] family, byte[] qualifier, CompareOperator op, ByteArrayComparable comparator, Delete delete, boolean result) Called before checkAndDelete.booleanpreCheckAndDelete(ObserverContext<? extends RegionCoprocessorEnvironment> c, byte[] row, Filter filter, Delete delete, boolean result) Called before checkAndDelete.booleanpreCheckAndDeleteAfterRowLock(ObserverContext<? extends RegionCoprocessorEnvironment> c, byte[] row, byte[] family, byte[] qualifier, CompareOperator op, ByteArrayComparable comparator, Delete delete, boolean result) Called before checkAndDelete but after acquiring rowock.booleanpreCheckAndDeleteAfterRowLock(ObserverContext<? extends RegionCoprocessorEnvironment> c, byte[] row, Filter filter, Delete delete, boolean result) Called before checkAndDelete but after acquiring rowock.preCheckAndMutate(ObserverContext<? extends RegionCoprocessorEnvironment> c, CheckAndMutate checkAndMutate, CheckAndMutateResult result) Called before checkAndMutatepreCheckAndMutateAfterRowLock(ObserverContext<? extends RegionCoprocessorEnvironment> c, CheckAndMutate checkAndMutate, CheckAndMutateResult result) Called before checkAndDelete but after acquiring rowlock.booleanpreCheckAndPut(ObserverContext<? extends RegionCoprocessorEnvironment> c, byte[] row, byte[] family, byte[] qualifier, CompareOperator op, ByteArrayComparable comparator, Put put, boolean result) Called before checkAndPut.booleanpreCheckAndPut(ObserverContext<? extends RegionCoprocessorEnvironment> c, byte[] row, Filter filter, Put put, boolean result) Called before checkAndPut.booleanpreCheckAndPutAfterRowLock(ObserverContext<? extends RegionCoprocessorEnvironment> c, byte[] row, byte[] family, byte[] qualifier, CompareOperator op, ByteArrayComparable comparator, Put put, boolean result) Called before checkAndPut but after acquiring rowlock.booleanpreCheckAndPutAfterRowLock(ObserverContext<? extends RegionCoprocessorEnvironment> c, byte[] row, Filter filter, Put put, boolean result) Called before checkAndPut but after acquiring rowlock.voidpreCommitStoreFile(ObserverContext<? extends RegionCoprocessorEnvironment> ctx, byte[] family, List<Pair<org.apache.hadoop.fs.Path, org.apache.hadoop.fs.Path>> pairs) Called before moving bulk loaded hfile to region directory.preCompact(ObserverContext<? extends RegionCoprocessorEnvironment> c, Store store, InternalScanner scanner, ScanType scanType, CompactionLifeCycleTracker tracker, CompactionRequest request) Called prior to writing theStoreFiles selected for compaction into a newStoreFile.voidpreCompactScannerOpen(ObserverContext<? extends RegionCoprocessorEnvironment> c, Store store, ScanType scanType, ScanOptions options, CompactionLifeCycleTracker tracker, CompactionRequest request) Called before we open store scanner for compaction.voidpreCompactSelection(ObserverContext<? extends RegionCoprocessorEnvironment> c, Store store, List<? extends StoreFile> candidates, CompactionLifeCycleTracker tracker) Called prior to selecting theStoreFilesto compact from the list of available candidates.voidpreDelete(ObserverContext<? extends RegionCoprocessorEnvironment> c, Delete delete, WALEdit edit) Called before the client deletes a value.voidpreDelete(ObserverContext<? extends RegionCoprocessorEnvironment> c, Delete delete, WALEdit edit, Durability durability) Called before the client deletes a value.voidpreFlush(ObserverContext<? extends RegionCoprocessorEnvironment> c, FlushLifeCycleTracker tracker) Called before the memstore is flushed to disk.preFlush(ObserverContext<? extends RegionCoprocessorEnvironment> c, Store store, InternalScanner scanner, FlushLifeCycleTracker tracker) Called before a Store's memstore is flushed to disk.voidpreFlushScannerOpen(ObserverContext<? extends RegionCoprocessorEnvironment> c, Store store, ScanOptions options, FlushLifeCycleTracker tracker) Called before we open store scanner for flush.preIncrement(ObserverContext<? extends RegionCoprocessorEnvironment> c, Increment increment) Called before Increment.preIncrement(ObserverContext<? extends RegionCoprocessorEnvironment> c, Increment increment, WALEdit edit) Called before Increment.preIncrementAfterRowLock(ObserverContext<? extends RegionCoprocessorEnvironment> c, Increment increment) Called before Increment but after acquiring rowlock.voidpreMemStoreCompaction(ObserverContext<? extends RegionCoprocessorEnvironment> c, Store store) Called before in memory compaction started.preMemStoreCompactionCompact(ObserverContext<? extends RegionCoprocessorEnvironment> c, Store store, InternalScanner scanner) Called before we do in memory compaction.voidpreMemStoreCompactionCompactScannerOpen(ObserverContext<? extends RegionCoprocessorEnvironment> c, Store store, ScanOptions options) Called before we open store scanner for in memory compaction.voidprePut(ObserverContext<? extends RegionCoprocessorEnvironment> c, Put put, WALEdit edit) Called before the client stores a value.voidprePut(ObserverContext<? extends RegionCoprocessorEnvironment> c, Put put, WALEdit edit, Durability durability) Called before the client stores a value.voidpreReplayWALs(ObserverContext<? extends RegionCoprocessorEnvironment> ctx, RegionInfo info, org.apache.hadoop.fs.Path edits) Called before replaying WALs for this region.voidpreWALAppend(ObserverContext<? extends RegionCoprocessorEnvironment> ctx, WALKey key, WALEdit edit) Called just before the WAL Entry is appended to the WAL.Methods inherited from class org.apache.hadoop.hbase.security.access.AbstractReadOnlyController
internalReadOnlyGuard, isWritableInReadOnlyMode, isWritableInReadOnlyMode, manageActiveClusterIdFile, start, stopMethods 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, preClose, preExists, preGetOp, preOpen, prePrepareTimeStampForDeleteVersion, preScannerClose, preScannerNext, preScannerOpen, preStoreFileReaderOpen, preStoreScannerOpen, preWALRestore
-
Constructor Details
-
RegionReadOnlyController
public RegionReadOnlyController()
-
-
Method Details
-
getRegionObserver
- Specified by:
getRegionObserverin interfaceRegionCoprocessor
-
preFlushScannerOpen
public void preFlushScannerOpen(ObserverContext<? extends RegionCoprocessorEnvironment> c, Store store, ScanOptions options, FlushLifeCycleTracker tracker) throws IOException Description copied from interface:RegionObserverCalled before we open store scanner for flush. You can use theoptionsto change max versions and TTL for the scanner being opened.- Specified by:
preFlushScannerOpenin interfaceRegionObserver- Parameters:
c- the environment provided by the region serverstore- the store where flush is being requestedoptions- used to change max versions and TTL for the scanner being opened- Throws:
IOException
-
preFlush
public void preFlush(ObserverContext<? extends RegionCoprocessorEnvironment> c, FlushLifeCycleTracker tracker) throws IOException Description copied from interface:RegionObserverCalled before the memstore is flushed to disk.- Specified by:
preFlushin interfaceRegionObserver- Parameters:
c- the environment provided by the region servertracker- tracker used to track the life cycle of a flush- Throws:
IOException
-
preFlush
public InternalScanner preFlush(ObserverContext<? extends RegionCoprocessorEnvironment> c, Store store, InternalScanner scanner, FlushLifeCycleTracker tracker) throws IOException Description copied from interface:RegionObserverCalled before a Store's memstore is flushed to disk.- Specified by:
preFlushin interfaceRegionObserver- Parameters:
c- the environment provided by the region serverstore- the store where flush is being requestedscanner- the scanner over existing data used in the memstoretracker- tracker used to track the life cycle of a flush- Returns:
- the scanner to use during flush. Should not be
nullunless the implementation is writing new store files on its own. - Throws:
IOException
-
preMemStoreCompaction
public void preMemStoreCompaction(ObserverContext<? extends RegionCoprocessorEnvironment> c, Store store) throws IOException Description copied from interface:RegionObserverCalled before in memory compaction started.- Specified by:
preMemStoreCompactionin interfaceRegionObserver- Parameters:
c- the environment provided by the region serverstore- the store where in memory compaction is being requested- Throws:
IOException
-
preMemStoreCompactionCompactScannerOpen
public void preMemStoreCompactionCompactScannerOpen(ObserverContext<? extends RegionCoprocessorEnvironment> c, Store store, ScanOptions options) throws IOException Description copied from interface:RegionObserverCalled before we open store scanner for in memory compaction. You can use theoptionsto change max versions and TTL for the scanner being opened. Notice that this method will only be called when you useeagermode. Forbasicmode we will not drop any cells thus we do not open a store scanner.- Specified by:
preMemStoreCompactionCompactScannerOpenin interfaceRegionObserver- Parameters:
c- the environment provided by the region serverstore- the store where in memory compaction is being requestedoptions- used to change max versions and TTL for the scanner being opened- Throws:
IOException
-
preMemStoreCompactionCompact
public InternalScanner preMemStoreCompactionCompact(ObserverContext<? extends RegionCoprocessorEnvironment> c, Store store, InternalScanner scanner) throws IOException Description copied from interface:RegionObserverCalled before we do in memory compaction. Notice that this method will only be called when you useeagermode. Forbasicmode we will not drop any cells thus there is noInternalScanner.- Specified by:
preMemStoreCompactionCompactin interfaceRegionObserver- Parameters:
c- the environment provided by the region serverstore- the store where in memory compaction is being executedscanner- the scanner over existing data used in the memstore segments being compact- Returns:
- the scanner to use during in memory compaction. Must be non-null.
- Throws:
IOException
-
preCompactSelection
public void preCompactSelection(ObserverContext<? extends RegionCoprocessorEnvironment> c, Store store, List<? extends StoreFile> candidates, CompactionLifeCycleTracker tracker) throws IOException Description copied from interface:RegionObserverCalled prior to selecting theStoreFilesto compact from the list of available candidates. To alter the files used for compaction, you may mutate the passed in list of candidates. If you remove all the candidates then the compaction will be canceled.Supports Coprocessor 'bypass' -- 'bypass' is how this method indicates that it changed the passed in
candidates. If 'bypass' is set, we skip out on calling any subsequent chained coprocessors.- Specified by:
preCompactSelectionin interfaceRegionObserver- Parameters:
c- the environment provided by the region serverstore- the store where compaction is being requestedcandidates- the store files currently available for compactiontracker- tracker used to track the life cycle of a compaction- Throws:
IOException
-
preCompactScannerOpen
public void preCompactScannerOpen(ObserverContext<? extends RegionCoprocessorEnvironment> c, Store store, ScanType scanType, ScanOptions options, CompactionLifeCycleTracker tracker, CompactionRequest request) throws IOException Description copied from interface:RegionObserverCalled before we open store scanner for compaction. You can use theoptionsto change max versions and TTL for the scanner being opened.- Specified by:
preCompactScannerOpenin interfaceRegionObserver- Parameters:
c- the environment provided by the region serverstore- the store being compactedscanType- type of Scanoptions- used to change max versions and TTL for the scanner being openedtracker- tracker used to track the life cycle of a compactionrequest- the requested compaction- Throws:
IOException
-
preCompact
public InternalScanner preCompact(ObserverContext<? extends RegionCoprocessorEnvironment> c, Store store, InternalScanner scanner, ScanType scanType, CompactionLifeCycleTracker tracker, CompactionRequest request) throws IOException Description copied from interface:RegionObserverCalled prior to writing theStoreFiles selected for compaction into a newStoreFile.To override or modify the compaction process, implementing classes can wrap the provided
InternalScannerwith a custom implementation that is returned from this method. The custom scanner can then inspectCells from the wrapped scanner, applying its own policy to what gets written.If implementations are wrapping the passed in
InternalScanner, they can also have their implementation implementShipperand delegate to the original scanner. This will cause compactions to free up memory as they progress, which is especially important for people using off-heap memory pools.Keep in mind that when
Shipper.shipped()is called, any cell references you maintain in your implementation may get corrupted. As such you should make sure to deep clone any cells that you need to keep reference to across invocations of shipped.- Specified by:
preCompactin interfaceRegionObserver- Parameters:
c- the environment provided by the region serverstore- the store being compactedscanner- the scanner over existing data used in the store file rewritingscanType- type of Scantracker- tracker used to track the life cycle of a compactionrequest- the requested compaction- Returns:
- the scanner to use during compaction. Should not be
nullunless the implementation is writing new store files on its own. - Throws:
IOException
-
prePut
public void prePut(ObserverContext<? extends RegionCoprocessorEnvironment> c, 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:
c- 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
-
prePut
public void prePut(ObserverContext<? extends RegionCoprocessorEnvironment> c, Put put, WALEdit edit) 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:
c- the environment provided by the region serverput- The Put objectedit- The WALEdit object that will be written to the wal- Throws:
IOException
-
preDelete
public void preDelete(ObserverContext<? extends RegionCoprocessorEnvironment> c, Delete delete, WALEdit edit, Durability durability) throws IOException 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:
c- the environment provided by the region serverdelete- The Delete objectedit- The WALEdit object for the waldurability- Persistence guarantee for this Delete- Throws:
IOException
-
preDelete
public void preDelete(ObserverContext<? extends RegionCoprocessorEnvironment> c, Delete delete, WALEdit edit) throws IOException 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:
c- the environment provided by the region serverdelete- The Delete objectedit- The WALEdit object for the wal- Throws:
IOException
-
preBatchMutate
public void preBatchMutate(ObserverContext<? extends RegionCoprocessorEnvironment> c, MiniBatchOperationInProgress<Mutation> miniBatchOp) throws IOException Description copied from interface:RegionObserverThis will be called for every batch mutation operation happening at the server. This will be called after acquiring the locks on the mutating rows and after applying the proper timestamp for each Mutation at the server. The batch may contain Put/Delete/Increment/Append. By setting OperationStatus of Mutations (MiniBatchOperationInProgress.setOperationStatus(int, OperationStatus)),RegionObservercan make Region to skip these Mutations.Note: Do not retain references to any Cells in Mutations beyond the life of this invocation. If need a Cell reference for later use, copy the cell and use that.
- Specified by:
preBatchMutatein interfaceRegionObserver- Parameters:
c- the environment provided by the region serverminiBatchOp- batch of Mutations getting applied to region.- Throws:
IOException
-
preCheckAndPut
public boolean preCheckAndPut(ObserverContext<? extends RegionCoprocessorEnvironment> c, byte[] row, byte[] family, byte[] qualifier, CompareOperator op, ByteArrayComparable comparator, Put put, boolean result) throws IOException Description copied from interface:RegionObserverCalled before checkAndPut.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:
preCheckAndPutin interfaceRegionObserver- Parameters:
c- the environment provided by the region serverrow- row to checkfamily- column familyqualifier- column qualifierop- the comparison operationcomparator- the comparatorput- data to put if check succeedsresult- the default value of the result- Returns:
- the return value to return to client if bypassing default processing
- Throws:
IOException
-
preCheckAndPut
public boolean preCheckAndPut(ObserverContext<? extends RegionCoprocessorEnvironment> c, byte[] row, Filter filter, Put put, boolean result) throws IOException Description copied from interface:RegionObserverCalled before checkAndPut.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:
preCheckAndPutin interfaceRegionObserver- Parameters:
c- the environment provided by the region serverrow- row to checkfilter- filterput- data to put if check succeedsresult- the default value of the result- Returns:
- the return value to return to client if bypassing default processing
- Throws:
IOException
-
preCheckAndPutAfterRowLock
public boolean preCheckAndPutAfterRowLock(ObserverContext<? extends RegionCoprocessorEnvironment> c, byte[] row, byte[] family, byte[] qualifier, CompareOperator op, ByteArrayComparable comparator, Put put, boolean result) throws IOException Description copied from interface:RegionObserverCalled before checkAndPut but after acquiring rowlock.Note: Caution to be taken for not doing any long time operation in this hook. Row will be locked for longer time. Trying to acquire lock on another row, within this, can lead to potential deadlock.
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:
preCheckAndPutAfterRowLockin interfaceRegionObserver- Parameters:
c- the environment provided by the region serverrow- row to checkfamily- column familyqualifier- column qualifierop- the comparison operationcomparator- the comparatorput- data to put if check succeedsresult- the default value of the result- Returns:
- the return value to return to client if bypassing default processing
- Throws:
IOException
-
preCheckAndPutAfterRowLock
public boolean preCheckAndPutAfterRowLock(ObserverContext<? extends RegionCoprocessorEnvironment> c, byte[] row, Filter filter, Put put, boolean result) throws IOException Description copied from interface:RegionObserverCalled before checkAndPut but after acquiring rowlock.Note: Caution to be taken for not doing any long time operation in this hook. Row will be locked for longer time. Trying to acquire lock on another row, within this, can lead to potential deadlock.
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:
preCheckAndPutAfterRowLockin interfaceRegionObserver- Parameters:
c- the environment provided by the region serverrow- row to checkfilter- filterput- data to put if check succeedsresult- the default value of the result- Returns:
- the return value to return to client if bypassing default processing
- Throws:
IOException
-
preCheckAndDelete
public boolean preCheckAndDelete(ObserverContext<? extends RegionCoprocessorEnvironment> c, byte[] row, byte[] family, byte[] qualifier, CompareOperator op, ByteArrayComparable comparator, Delete delete, boolean result) throws IOException Description copied from interface:RegionObserverCalled before checkAndDelete.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:
preCheckAndDeletein interfaceRegionObserver- Parameters:
c- the environment provided by the region serverrow- row to checkfamily- column familyqualifier- column qualifierop- the comparison operationcomparator- the comparatordelete- delete to commit if check succeedsresult- the default value of the result- Returns:
- the value to return to client if bypassing default processing
- Throws:
IOException
-
preCheckAndDelete
public boolean preCheckAndDelete(ObserverContext<? extends RegionCoprocessorEnvironment> c, byte[] row, Filter filter, Delete delete, boolean result) throws IOException Description copied from interface:RegionObserverCalled before checkAndDelete.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:
preCheckAndDeletein interfaceRegionObserver- Parameters:
c- the environment provided by the region serverrow- row to checkfilter- column familydelete- delete to commit if check succeedsresult- the default value of the result- Returns:
- the value to return to client if bypassing default processing
- Throws:
IOException
-
preCheckAndDeleteAfterRowLock
public boolean preCheckAndDeleteAfterRowLock(ObserverContext<? extends RegionCoprocessorEnvironment> c, byte[] row, byte[] family, byte[] qualifier, CompareOperator op, ByteArrayComparable comparator, Delete delete, boolean result) throws IOException Description copied from interface:RegionObserverCalled before checkAndDelete but after acquiring rowock.Note: Caution to be taken for not doing any long time operation in this hook. Row will be locked for longer time. Trying to acquire lock on another row, within this, can lead to potential deadlock.
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:
preCheckAndDeleteAfterRowLockin interfaceRegionObserver- Parameters:
c- the environment provided by the region serverrow- row to checkfamily- column familyqualifier- column qualifierop- the comparison operationcomparator- the comparatordelete- delete to commit if check succeedsresult- the default value of the result- Returns:
- the value to return to client if bypassing default processing
- Throws:
IOException
-
preCheckAndDeleteAfterRowLock
public boolean preCheckAndDeleteAfterRowLock(ObserverContext<? extends RegionCoprocessorEnvironment> c, byte[] row, Filter filter, Delete delete, boolean result) throws IOException Description copied from interface:RegionObserverCalled before checkAndDelete but after acquiring rowock.Note: Caution to be taken for not doing any long time operation in this hook. Row will be locked for longer time. Trying to acquire lock on another row, within this, can lead to potential deadlock.
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:
preCheckAndDeleteAfterRowLockin interfaceRegionObserver- Parameters:
c- the environment provided by the region serverrow- row to checkfilter- filterdelete- delete to commit if check succeedsresult- the default value of the result- Returns:
- the value to return to client if bypassing default processing
- Throws:
IOException
-
preCheckAndMutate
public CheckAndMutateResult preCheckAndMutate(ObserverContext<? extends RegionCoprocessorEnvironment> c, CheckAndMutate checkAndMutate, CheckAndMutateResult result) throws IOException Description copied from interface:RegionObserverCalled before checkAndMutateCall 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 actions beyond the life of this invocation. If need a Cell reference for later use, copy the cell and use that.
- Specified by:
preCheckAndMutatein interfaceRegionObserver- Parameters:
c- the environment provided by the region servercheckAndMutate- the CheckAndMutate objectresult- the default value of the result- Returns:
- the return value to return to client if bypassing default processing
- Throws:
IOException- if an error occurred on the coprocessor
-
preCheckAndMutateAfterRowLock
public CheckAndMutateResult preCheckAndMutateAfterRowLock(ObserverContext<? extends RegionCoprocessorEnvironment> c, CheckAndMutate checkAndMutate, CheckAndMutateResult result) throws IOException Description copied from interface:RegionObserverCalled before checkAndDelete but after acquiring rowlock.Note: Caution to be taken for not doing any long time operation in this hook. Row will be locked for longer time. Trying to acquire lock on another row, within this, can lead to potential deadlock.
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 actions beyond the life of this invocation. If need a Cell reference for later use, copy the cell and use that.
- Specified by:
preCheckAndMutateAfterRowLockin interfaceRegionObserver- Parameters:
c- the environment provided by the region servercheckAndMutate- the CheckAndMutate objectresult- the default value of the result- Returns:
- the value to return to client if bypassing default processing
- Throws:
IOException- if an error occurred on the coprocessor
-
preAppend
public Result preAppend(ObserverContext<? extends RegionCoprocessorEnvironment> c, Append append) throws IOException Description copied from interface:RegionObserverCalled before Append.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 'append' beyond the life of this invocation. If need a Cell reference for later use, copy the cell and use that.
- Specified by:
preAppendin interfaceRegionObserver- Parameters:
c- the environment provided by the region serverappend- Append object- Returns:
- result to return to the client if bypassing default processing
- Throws:
IOException
-
preAppend
public Result preAppend(ObserverContext<? extends RegionCoprocessorEnvironment> c, Append append, WALEdit edit) throws IOException Description copied from interface:RegionObserverCalled before Append.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 'append' beyond the life of this invocation. If need a Cell reference for later use, copy the cell and use that.
- Specified by:
preAppendin interfaceRegionObserver- Parameters:
c- the environment provided by the region serverappend- Append objectedit- The WALEdit object that will be written to the wal- Returns:
- result to return to the client if bypassing default processing
- Throws:
IOException
-
preAppendAfterRowLock
public Result preAppendAfterRowLock(ObserverContext<? extends RegionCoprocessorEnvironment> c, Append append) throws IOException Description copied from interface:RegionObserverCalled before Append but after acquiring rowlock.Note: Caution to be taken for not doing any long time operation in this hook. Row will be locked for longer time. Trying to acquire lock on another row, within this, can lead to potential deadlock.
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 'append' beyond the life of this invocation. If need a Cell reference for later use, copy the cell and use that.
- Specified by:
preAppendAfterRowLockin interfaceRegionObserver- Parameters:
c- the environment provided by the region serverappend- Append object- Returns:
- result to return to the client if bypassing default processing
- Throws:
IOException
-
preIncrement
public Result preIncrement(ObserverContext<? extends RegionCoprocessorEnvironment> c, Increment increment) throws IOException Description copied from interface:RegionObserverCalled before Increment.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 'increment' beyond the life of this invocation. If need a Cell reference for later use, copy the cell and use that.
- Specified by:
preIncrementin interfaceRegionObserver- Parameters:
c- the environment provided by the region serverincrement- increment object- Returns:
- result to return to the client if bypassing default processing
- Throws:
IOException
-
preIncrement
public Result preIncrement(ObserverContext<? extends RegionCoprocessorEnvironment> c, Increment increment, WALEdit edit) throws IOException Description copied from interface:RegionObserverCalled before Increment.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 'increment' beyond the life of this invocation. If need a Cell reference for later use, copy the cell and use that.
- Specified by:
preIncrementin interfaceRegionObserver- Parameters:
c- the environment provided by the region serverincrement- increment objectedit- The WALEdit object that will be written to the wal- Returns:
- result to return to the client if bypassing default processing
- Throws:
IOException
-
preIncrementAfterRowLock
public Result preIncrementAfterRowLock(ObserverContext<? extends RegionCoprocessorEnvironment> c, Increment increment) throws IOException Description copied from interface:RegionObserverCalled before Increment but after acquiring rowlock.Note: Caution to be taken for not doing any long time operation in this hook. Row will be locked for longer time. Trying to acquire lock on another row, within this, can lead to potential deadlock.
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 'increment' beyond the life of this invocation. If need a Cell reference for later use, copy the cell and use that.
- Specified by:
preIncrementAfterRowLockin interfaceRegionObserver- Parameters:
c- the environment provided by the region serverincrement- increment object- Returns:
- result to return to the client if bypassing default processing
- Throws:
IOException
-
preReplayWALs
public void preReplayWALs(ObserverContext<? extends RegionCoprocessorEnvironment> ctx, RegionInfo info, org.apache.hadoop.fs.Path edits) throws IOException Description copied from interface:RegionObserverCalled before replaying WALs for this region. CallingObserverContext.bypass()has no effect in this hook.- Specified by:
preReplayWALsin interfaceRegionObserver- Parameters:
ctx- the environment provided by the region serverinfo- the RegionInfo for this regionedits- the file of recovered edits- Throws:
IOException
-
preBulkLoadHFile
public void preBulkLoadHFile(ObserverContext<? extends RegionCoprocessorEnvironment> ctx, List<Pair<byte[], String>> familyPaths) throws IOExceptionDescription copied from interface:RegionObserverCalled before bulkLoadHFile. Users can create a StoreFile instance to access the contents of a HFile.- Specified by:
preBulkLoadHFilein interfaceRegionObserver- Parameters:
ctx- the environment provided by the region serverfamilyPaths- pairs of { CF, HFile path } submitted for bulk load. Adding or removing from this list will add or remove HFiles to be bulk loaded.- Throws:
IOException
-
preCommitStoreFile
public void preCommitStoreFile(ObserverContext<? extends RegionCoprocessorEnvironment> ctx, byte[] family, List<Pair<org.apache.hadoop.fs.Path, org.apache.hadoop.fs.Path>> pairs) throws IOExceptionDescription copied from interface:RegionObserverCalled before moving bulk loaded hfile to region directory.- Specified by:
preCommitStoreFilein interfaceRegionObserver- Parameters:
ctx- the environment provided by the region serverfamily- column familypairs- List of pairs of { HFile location in staging dir, HFile path in region dir } Each pair are for the same hfile.- Throws:
IOException
-
preWALAppend
public void preWALAppend(ObserverContext<? extends RegionCoprocessorEnvironment> ctx, WALKey key, WALEdit edit) throws IOException Description copied from interface:RegionObserverCalled just before the WAL Entry is appended to the WAL. Implementing this hook allows coprocessors to add extended attributes to the WALKey that then get persisted to the WAL, and are available to replication endpoints to use in processing WAL Entries.- Specified by:
preWALAppendin interfaceRegionObserver- Parameters:
ctx- the environment provided by the region serverkey- the WALKey associated with a particular append to a WAL- Throws:
IOException
-