@InterfaceAudience.LimitedPrivate(value="Coprocesssor") @InterfaceStability.Evolving public interface RegionObserver extends Coprocessor
IOException are reported back to client.CoprocessorHost.ABORT_ON_ERROR_KEY is set to true, then
the server aborts.DoNotRetryIOException is returned to the client.| Modifier and Type | Interface and Description |
|---|---|
static class |
RegionObserver.MutationType
Mutation type for postMutationBeforeWAL hook
|
Coprocessor.StatePRIORITY_HIGHEST, PRIORITY_LOWEST, PRIORITY_SYSTEM, PRIORITY_USER, VERSION| Modifier and Type | Method and Description |
|---|---|
default Result |
postAppend(ObserverContext<RegionCoprocessorEnvironment> c,
Append append,
Result result)
Called after Append
|
default void |
postBatchMutate(ObserverContext<RegionCoprocessorEnvironment> c,
MiniBatchOperationInProgress<Mutation> miniBatchOp)
This will be called after applying a batch of Mutations on a region.
|
default void |
postBatchMutateIndispensably(ObserverContext<RegionCoprocessorEnvironment> ctx,
MiniBatchOperationInProgress<Mutation> miniBatchOp,
boolean success)
Called after the completion of batch put/delete and will be called even if the batch operation
fails.
|
default boolean |
postBulkLoadHFile(ObserverContext<RegionCoprocessorEnvironment> ctx,
List<Pair<byte[],String>> stagingFamilyPaths,
boolean hasLoaded)
Deprecated.
|
default boolean |
postBulkLoadHFile(ObserverContext<RegionCoprocessorEnvironment> ctx,
List<Pair<byte[],String>> stagingFamilyPaths,
Map<byte[],List<org.apache.hadoop.fs.Path>> finalPaths,
boolean hasLoaded)
Called after bulkLoadHFile.
|
default boolean |
postCheckAndDelete(ObserverContext<RegionCoprocessorEnvironment> c,
byte[] row,
byte[] family,
byte[] qualifier,
CompareFilter.CompareOp compareOp,
ByteArrayComparable comparator,
Delete delete,
boolean result)
Called after checkAndDelete
|
default boolean |
postCheckAndPut(ObserverContext<RegionCoprocessorEnvironment> c,
byte[] row,
byte[] family,
byte[] qualifier,
CompareFilter.CompareOp compareOp,
ByteArrayComparable comparator,
Put put,
boolean result)
Called after checkAndPut
|
default void |
postClose(ObserverContext<RegionCoprocessorEnvironment> c,
boolean abortRequested)
Called after the region is reported as closed to the master.
|
default void |
postCloseRegionOperation(ObserverContext<RegionCoprocessorEnvironment> ctx,
Region.Operation operation)
Called after releasing read lock in
Region.closeRegionOperation(). |
default void |
postCommitStoreFile(ObserverContext<RegionCoprocessorEnvironment> ctx,
byte[] family,
org.apache.hadoop.fs.Path srcPath,
org.apache.hadoop.fs.Path dstPath)
Called after moving bulk loaded hfile to region directory.
|
default void |
postCompact(ObserverContext<RegionCoprocessorEnvironment> c,
Store store,
StoreFile resultFile)
Deprecated.
|
default void |
postCompact(ObserverContext<RegionCoprocessorEnvironment> c,
Store store,
StoreFile resultFile,
CompactionRequest request)
Called after compaction has completed and the new store file has been moved in to place.
|
default void |
postCompactSelection(ObserverContext<RegionCoprocessorEnvironment> c,
Store store,
com.google.common.collect.ImmutableList<StoreFile> selected)
Deprecated.
|
default void |
postCompactSelection(ObserverContext<RegionCoprocessorEnvironment> c,
Store store,
com.google.common.collect.ImmutableList<StoreFile> selected,
CompactionRequest request)
Called after the
StoreFiles to compact have been selected from the available
candidates. |
default void |
postCompleteSplit(ObserverContext<RegionCoprocessorEnvironment> ctx)
Deprecated.
No longer called in hbase2/AMv2 given the master runs splits now;
implement
MasterObserver.postCompletedSplitRegionAction(ObserverContext, HRegionInfo, HRegionInfo)
instead. |
default void |
postDelete(ObserverContext<RegionCoprocessorEnvironment> c,
Delete delete,
WALEdit edit,
Durability durability)
Called after the client deletes a value.
|
default boolean |
postExists(ObserverContext<RegionCoprocessorEnvironment> c,
Get get,
boolean exists)
Called after the client tests for existence using a Get.
|
default void |
postFlush(ObserverContext<RegionCoprocessorEnvironment> c)
Deprecated.
use
preFlush(ObserverContext, Store, InternalScanner) instead. |
default void |
postFlush(ObserverContext<RegionCoprocessorEnvironment> c,
Store store,
StoreFile resultFile)
Called after a Store's memstore is flushed to disk.
|
default void |
postGetOp(ObserverContext<RegionCoprocessorEnvironment> c,
Get get,
List<Cell> result)
Called after the client performs a Get
|
default Result |
postIncrement(ObserverContext<RegionCoprocessorEnvironment> c,
Increment increment,
Result result)
Called after increment
|
default long |
postIncrementColumnValue(ObserverContext<RegionCoprocessorEnvironment> c,
byte[] row,
byte[] family,
byte[] qualifier,
long amount,
boolean writeToWAL,
long result)
Deprecated.
This hook is no longer called by the RegionServer
|
default DeleteTracker |
postInstantiateDeleteTracker(ObserverContext<RegionCoprocessorEnvironment> ctx,
DeleteTracker delTracker)
Called after the ScanQueryMatcher creates ScanDeleteTracker.
|
default void |
postLogReplay(ObserverContext<RegionCoprocessorEnvironment> c)
Called after the log replay on the region is over.
|
default Cell |
postMutationBeforeWAL(ObserverContext<RegionCoprocessorEnvironment> ctx,
RegionObserver.MutationType opType,
Mutation mutation,
Cell oldCell,
Cell newCell)
Called after a new cell has been created during an increment operation, but before
it is committed to the WAL or memstore.
|
default void |
postOpen(ObserverContext<RegionCoprocessorEnvironment> c)
Called after the region is reported as open to the master.
|
default void |
postPut(ObserverContext<RegionCoprocessorEnvironment> c,
Put put,
WALEdit edit,
Durability durability)
Called after the client stores a value.
|
default void |
postReplayWALs(ObserverContext<? extends RegionCoprocessorEnvironment> ctx,
HRegionInfo info,
org.apache.hadoop.fs.Path edits)
Called after replaying WALs for this region.
|
default void |
postRollBackSplit(ObserverContext<RegionCoprocessorEnvironment> ctx)
Deprecated.
No longer called in hbase2/AMv2 given the master runs splits now;
|
default void |
postScannerClose(ObserverContext<RegionCoprocessorEnvironment> ctx,
InternalScanner s)
Called after the client closes a scanner.
|
default boolean |
postScannerFilterRow(ObserverContext<RegionCoprocessorEnvironment> c,
InternalScanner s,
byte[] currentRow,
int offset,
short length,
boolean hasMore)
Deprecated.
As of release 2.0.0, this will be removed in HBase 3.0.0.
Instead use
postScannerFilterRow(ObserverContext, InternalScanner, Cell, boolean) |
default boolean |
postScannerFilterRow(ObserverContext<RegionCoprocessorEnvironment> c,
InternalScanner s,
Cell curRowCell,
boolean hasMore)
This will be called by the scan flow when the current scanned row is being filtered out by the
filter.
|
default boolean |
postScannerNext(ObserverContext<RegionCoprocessorEnvironment> c,
InternalScanner s,
List<Result> result,
int limit,
boolean hasNext)
Called after the client asks for the next row on a scanner.
|
default RegionScanner |
postScannerOpen(ObserverContext<RegionCoprocessorEnvironment> c,
Scan scan,
RegionScanner s)
Called after the client opens a new scanner.
|
default void |
postSplit(ObserverContext<RegionCoprocessorEnvironment> c,
Region l,
Region r)
Deprecated.
No longer called in hbase2/AMv2 given the master runs splits now;
|
default void |
postStartRegionOperation(ObserverContext<RegionCoprocessorEnvironment> ctx,
Region.Operation operation)
This will be called for region operations where read lock is acquired in
Region.startRegionOperation(). |
default StoreFileReader |
postStoreFileReaderOpen(ObserverContext<RegionCoprocessorEnvironment> ctx,
org.apache.hadoop.fs.FileSystem fs,
org.apache.hadoop.fs.Path p,
FSDataInputStreamWrapper in,
long size,
CacheConfig cacheConf,
Reference r,
StoreFileReader reader)
Called after the creation of Reader for a store file.
|
default void |
postWALRestore(ObserverContext<? extends RegionCoprocessorEnvironment> ctx,
HRegionInfo info,
WALKey logKey,
WALEdit logEdit)
Called after a
WALEdit
replayed for this region. |
default Result |
preAppend(ObserverContext<RegionCoprocessorEnvironment> c,
Append append)
Called before Append.
|
default Result |
preAppendAfterRowLock(ObserverContext<RegionCoprocessorEnvironment> c,
Append append)
Called before Append but after acquiring rowlock.
|
default void |
preBatchMutate(ObserverContext<RegionCoprocessorEnvironment> c,
MiniBatchOperationInProgress<Mutation> miniBatchOp)
This will be called for every batch mutation operation happening at the server.
|
default void |
preBulkLoadHFile(ObserverContext<RegionCoprocessorEnvironment> ctx,
List<Pair<byte[],String>> familyPaths)
Called before bulkLoadHFile.
|
default boolean |
preCheckAndDelete(ObserverContext<RegionCoprocessorEnvironment> c,
byte[] row,
byte[] family,
byte[] qualifier,
CompareFilter.CompareOp compareOp,
ByteArrayComparable comparator,
Delete delete,
boolean result)
Called before checkAndDelete.
|
default boolean |
preCheckAndDeleteAfterRowLock(ObserverContext<RegionCoprocessorEnvironment> c,
byte[] row,
byte[] family,
byte[] qualifier,
CompareFilter.CompareOp compareOp,
ByteArrayComparable comparator,
Delete delete,
boolean result)
Called before checkAndDelete but after acquiring rowock.
|
default boolean |
preCheckAndPut(ObserverContext<RegionCoprocessorEnvironment> c,
byte[] row,
byte[] family,
byte[] qualifier,
CompareFilter.CompareOp compareOp,
ByteArrayComparable comparator,
Put put,
boolean result)
Called before checkAndPut.
|
default boolean |
preCheckAndPutAfterRowLock(ObserverContext<RegionCoprocessorEnvironment> c,
byte[] row,
byte[] family,
byte[] qualifier,
CompareFilter.CompareOp compareOp,
ByteArrayComparable comparator,
Put put,
boolean result)
Called before checkAndPut but after acquiring rowlock.
|
default void |
preClose(ObserverContext<RegionCoprocessorEnvironment> c,
boolean abortRequested)
Called before the region is reported as closed to the master.
|
default void |
preCommitStoreFile(ObserverContext<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.
|
default InternalScanner |
preCompact(ObserverContext<RegionCoprocessorEnvironment> c,
Store store,
InternalScanner scanner,
ScanType scanType)
Deprecated.
|
default InternalScanner |
preCompact(ObserverContext<RegionCoprocessorEnvironment> c,
Store store,
InternalScanner scanner,
ScanType scanType,
CompactionRequest request)
Called prior to writing the
StoreFiles selected for compaction into a new
StoreFile. |
default InternalScanner |
preCompactScannerOpen(ObserverContext<RegionCoprocessorEnvironment> c,
Store store,
List<? extends KeyValueScanner> scanners,
ScanType scanType,
long earliestPutTs,
InternalScanner s)
|
default InternalScanner |
preCompactScannerOpen(ObserverContext<RegionCoprocessorEnvironment> c,
Store store,
List<? extends KeyValueScanner> scanners,
ScanType scanType,
long earliestPutTs,
InternalScanner s,
CompactionRequest request)
|
default InternalScanner |
preCompactScannerOpen(ObserverContext<RegionCoprocessorEnvironment> c,
Store store,
List<? extends KeyValueScanner> scanners,
ScanType scanType,
long earliestPutTs,
InternalScanner s,
CompactionRequest request,
long readPoint)
Called prior to writing the
StoreFiles selected for compaction into a new
StoreFile and prior to creating the scanner used to read the input files. |
default void |
preCompactSelection(ObserverContext<RegionCoprocessorEnvironment> c,
Store store,
List<StoreFile> candidates)
Deprecated.
|
default void |
preCompactSelection(ObserverContext<RegionCoprocessorEnvironment> c,
Store store,
List<StoreFile> candidates,
CompactionRequest request)
Called prior to selecting the
StoreFiles to compact from the list of
available candidates. |
default void |
preDelete(ObserverContext<RegionCoprocessorEnvironment> c,
Delete delete,
WALEdit edit,
Durability durability)
Called before the client deletes a value.
|
default boolean |
preExists(ObserverContext<RegionCoprocessorEnvironment> c,
Get get,
boolean exists)
Called before the client tests for existence using a Get.
|
default void |
preFlush(ObserverContext<RegionCoprocessorEnvironment> c)
Deprecated.
|
default InternalScanner |
preFlush(ObserverContext<RegionCoprocessorEnvironment> c,
Store store,
InternalScanner scanner)
Called before a Store's memstore is flushed to disk.
|
default InternalScanner |
preFlushScannerOpen(ObserverContext<RegionCoprocessorEnvironment> c,
Store store,
KeyValueScanner scanner,
InternalScanner s,
long readPoint)
Maintain backward compatibility.
|
default InternalScanner |
preFlushScannerOpen(ObserverContext<RegionCoprocessorEnvironment> c,
Store store,
List<KeyValueScanner> scanners,
InternalScanner s)
|
default InternalScanner |
preFlushScannerOpen(ObserverContext<RegionCoprocessorEnvironment> c,
Store store,
List<KeyValueScanner> scanners,
InternalScanner s,
long readPoint)
Called before a memstore is flushed to disk and prior to creating the scanner to read from
the memstore.
|
default void |
preGetOp(ObserverContext<RegionCoprocessorEnvironment> c,
Get get,
List<Cell> result)
Called before the client performs a Get
|
default Result |
preIncrement(ObserverContext<RegionCoprocessorEnvironment> c,
Increment increment)
Called before Increment.
|
default Result |
preIncrementAfterRowLock(ObserverContext<RegionCoprocessorEnvironment> c,
Increment increment)
Called before Increment but after acquiring rowlock.
|
default long |
preIncrementColumnValue(ObserverContext<RegionCoprocessorEnvironment> c,
byte[] row,
byte[] family,
byte[] qualifier,
long amount,
boolean writeToWAL)
Deprecated.
This hook is no longer called by the RegionServer
|
default void |
preOpen(ObserverContext<RegionCoprocessorEnvironment> c)
Called before the region is reported as open to the master.
|
default void |
prePrepareTimeStampForDeleteVersion(ObserverContext<RegionCoprocessorEnvironment> c,
Mutation mutation,
Cell cell,
byte[] byteNow,
Get get)
Called before the server updates the timestamp for version delete with latest timestamp.
|
default void |
prePut(ObserverContext<RegionCoprocessorEnvironment> c,
Put put,
WALEdit edit,
Durability durability)
Called before the client stores a value.
|
default void |
preReplayWALs(ObserverContext<? extends RegionCoprocessorEnvironment> ctx,
HRegionInfo info,
org.apache.hadoop.fs.Path edits)
Called before replaying WALs for this region.
|
default void |
preRollBackSplit(ObserverContext<RegionCoprocessorEnvironment> ctx)
Deprecated.
No longer called in hbase2/AMv2 given the master runs splits now;
|
default void |
preScannerClose(ObserverContext<RegionCoprocessorEnvironment> c,
InternalScanner s)
Called before the client closes a scanner.
|
default boolean |
preScannerNext(ObserverContext<RegionCoprocessorEnvironment> c,
InternalScanner s,
List<Result> result,
int limit,
boolean hasNext)
Called before the client asks for the next row on a scanner.
|
default RegionScanner |
preScannerOpen(ObserverContext<RegionCoprocessorEnvironment> c,
Scan scan,
RegionScanner s)
Called before the client opens a new scanner.
|
default void |
preSplit(ObserverContext<RegionCoprocessorEnvironment> c)
Deprecated.
No longer called in hbase2/AMv2 given the master runs splits now;
|
default void |
preSplit(ObserverContext<RegionCoprocessorEnvironment> c,
byte[] splitRow)
Deprecated.
No longer called in hbase2/AMv2 given the master runs splits now;
|
default void |
preSplitAfterPONR(ObserverContext<RegionCoprocessorEnvironment> ctx)
Deprecated.
No longer called in hbase2/AMv2 given the master runs splits now;
|
default void |
preSplitBeforePONR(ObserverContext<RegionCoprocessorEnvironment> ctx,
byte[] splitKey,
List<Mutation> metaEntries)
Deprecated.
No longer called in hbase2/AMv2 given the master runs splits now;
|
default StoreFileReader |
preStoreFileReaderOpen(ObserverContext<RegionCoprocessorEnvironment> ctx,
org.apache.hadoop.fs.FileSystem fs,
org.apache.hadoop.fs.Path p,
FSDataInputStreamWrapper in,
long size,
CacheConfig cacheConf,
Reference r,
StoreFileReader reader)
Called before creation of Reader for a store file.
|
default KeyValueScanner |
preStoreScannerOpen(ObserverContext<RegionCoprocessorEnvironment> c,
Store store,
Scan scan,
NavigableSet<byte[]> targetCols,
KeyValueScanner s)
Deprecated.
|
default KeyValueScanner |
preStoreScannerOpen(ObserverContext<RegionCoprocessorEnvironment> c,
Store store,
Scan scan,
NavigableSet<byte[]> targetCols,
KeyValueScanner s,
long readPt)
Called before a store opens a new scanner.
|
default void |
preWALRestore(ObserverContext<? extends RegionCoprocessorEnvironment> ctx,
HRegionInfo info,
WALKey logKey,
WALEdit logEdit)
Called before a
WALEdit
replayed for this region. |
start, stopdefault void preOpen(ObserverContext<RegionCoprocessorEnvironment> c) throws IOException
c - the environment provided by the region serverIOExceptiondefault void postOpen(ObserverContext<RegionCoprocessorEnvironment> c)
c - the environment provided by the region serverdefault void postLogReplay(ObserverContext<RegionCoprocessorEnvironment> c)
c - the environment provided by the region server@Deprecated default InternalScanner preFlushScannerOpen(ObserverContext<RegionCoprocessorEnvironment> c, Store store, List<KeyValueScanner> scanners, InternalScanner s) throws IOException
StoreFile or null to perform the default processing.
Calling ObserverContext.bypass() has no
effect in this hook.c - the environment provided by the region serverstore - the store being flushedscanners - the scanners for the memstore that is flusheds - the base scanner, if not null, from previous RegionObserver in the chainnull if the default implementation
is to be used.IOExceptiondefault InternalScanner preFlushScannerOpen(ObserverContext<RegionCoprocessorEnvironment> c, Store store, List<KeyValueScanner> scanners, InternalScanner s, long readPoint) throws IOException
StoreFile or null to perform the default processing.
Calling ObserverContext.bypass() has no
effect in this hook.c - the environment provided by the region serverstore - the store being flushedscanners - the scanners for the memstore that is flusheds - the base scanner, if not null, from previous RegionObserver in the chainreadPoint - the readpoint to create scannernull if the default implementation
is to be used.IOExceptiondefault InternalScanner preFlushScannerOpen(ObserverContext<RegionCoprocessorEnvironment> c, Store store, KeyValueScanner scanner, InternalScanner s, long readPoint) throws IOException
c - the environment provided by the region serverstore - the store being flushedscanner - the scanner for the memstore that is flusheds - the base scanner, if not null, from previous RegionObserver in the chainreadPoint - the readpoint to create scannernull if the default implementation
is to be used.IOException@Deprecated default void preFlush(ObserverContext<RegionCoprocessorEnvironment> c) throws IOException
preFlush(ObserverContext, Store, InternalScanner) insteadc - the environment provided by the region serverIOExceptiondefault InternalScanner preFlush(ObserverContext<RegionCoprocessorEnvironment> c, Store store, InternalScanner scanner) throws IOException
c - the environment provided by the region serverstore - the store where compaction is being requestedscanner - the scanner over existing data used in the store filenull
unless the implementation is writing new store files on its own.IOException@Deprecated default void postFlush(ObserverContext<RegionCoprocessorEnvironment> c) throws IOException
preFlush(ObserverContext, Store, InternalScanner) instead.c - the environment provided by the region serverIOExceptiondefault void postFlush(ObserverContext<RegionCoprocessorEnvironment> c, Store store, StoreFile resultFile) throws IOException
c - the environment provided by the region serverstore - the store being flushedresultFile - the new store file written out during compactionIOExceptiondefault void preCompactSelection(ObserverContext<RegionCoprocessorEnvironment> c, Store store, List<StoreFile> candidates, CompactionRequest request) throws IOException
StoreFiles to compact from the list of
available candidates. To alter the files used for compaction, you may mutate the passed in list
of candidates.c - the environment provided by the region serverstore - the store where compaction is being requestedcandidates - the store files currently available for compactionrequest - custom compaction requestIOException@Deprecated default void preCompactSelection(ObserverContext<RegionCoprocessorEnvironment> c, Store store, List<StoreFile> candidates) throws IOException
preCompactSelection(ObserverContext, Store, List, CompactionRequest)
insteadStoreFiles to compact from the list of available
candidates. To alter the files used for compaction, you may mutate the passed in list of
candidates.c - the environment provided by the region serverstore - the store where compaction is being requestedcandidates - the store files currently available for compactionIOExceptiondefault void postCompactSelection(ObserverContext<RegionCoprocessorEnvironment> c, Store store, com.google.common.collect.ImmutableList<StoreFile> selected, CompactionRequest request)
StoreFiles to compact have been selected from the available
candidates.c - the environment provided by the region serverstore - the store being compactedselected - the store files selected to compactrequest - custom compaction request@Deprecated default void postCompactSelection(ObserverContext<RegionCoprocessorEnvironment> c, Store store, com.google.common.collect.ImmutableList<StoreFile> selected)
postCompactSelection(ObserverContext, Store, ImmutableList,
CompactionRequest) instead.StoreFiles to compact have been selected from the available
candidates.c - the environment provided by the region serverstore - the store being compactedselected - the store files selected to compactdefault InternalScanner preCompact(ObserverContext<RegionCoprocessorEnvironment> c, Store store, InternalScanner scanner, ScanType scanType, CompactionRequest request) throws IOException
StoreFiles selected for compaction into a new
StoreFile. To override or modify the compaction process, implementing classes have two
options:
InternalScanner with a custom implementation that is returned
from this method. The custom scanner can then inspect
KeyValues from the wrapped scanner, applying its own
policy to what gets written.ObserverContext.bypass() and provide a
custom implementation for writing of new StoreFiles. Note: any implementations
bypassing core compaction using this approach must write out new store files themselves or the
existing data will no longer be available after compaction.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 Scanrequest - the requested compactionnull unless the
implementation is writing new store files on its own.IOException@Deprecated default InternalScanner preCompact(ObserverContext<RegionCoprocessorEnvironment> c, Store store, InternalScanner scanner, ScanType scanType) throws IOException
preCompact(ObserverContext, Store, InternalScanner,
ScanType, CompactionRequest) insteadStoreFiles selected for compaction into a new
StoreFile. To override or modify the compaction process, implementing classes have two
options:
InternalScanner with a custom implementation that is returned
from this method. The custom scanner can then inspect
KeyValues from the wrapped scanner, applying its own
policy to what gets written.ObserverContext.bypass() and provide a
custom implementation for writing of new StoreFiles. Note: any implementations
bypassing core compaction using this approach must write out new store files themselves or the
existing data will no longer be available after compaction.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 Scannull unless the
implementation is writing new store files on its own.IOException@Deprecated default InternalScanner preCompactScannerOpen(ObserverContext<RegionCoprocessorEnvironment> c, Store store, List<? extends KeyValueScanner> scanners, ScanType scanType, long earliestPutTs, InternalScanner s, CompactionRequest request) throws IOException
preCompactScannerOpen(ObserverContext, Store, List, ScanType, long,
InternalScanner, CompactionRequest, long) instead.StoreFiles selected for compaction into a new
StoreFile and prior to creating the scanner used to read the input files. To override
or modify the compaction process, implementing classes can return a new scanner to provide the
KeyValues to be stored into the new StoreFile or null to perform the default
processing. Calling ObserverContext.bypass() has no
effect in this hook.c - the environment provided by the region serverstore - the store being compactedscanners - the list StoreFileScanners
to be read fromscanType - the ScanType indicating whether this is a major or minor compactionearliestPutTs - timestamp of the earliest put that was found in any of the involved store
filess - the base scanner, if not null, from previous RegionObserver in the chainrequest - the requested compactionnull if the default implementation is to
be used.IOExceptiondefault InternalScanner preCompactScannerOpen(ObserverContext<RegionCoprocessorEnvironment> c, Store store, List<? extends KeyValueScanner> scanners, ScanType scanType, long earliestPutTs, InternalScanner s, CompactionRequest request, long readPoint) throws IOException
StoreFiles selected for compaction into a new
StoreFile and prior to creating the scanner used to read the input files. To override
or modify the compaction process, implementing classes can return a new scanner to provide the
KeyValues to be stored into the new StoreFile or null to perform the default
processing. Calling ObserverContext.bypass() has no
effect in this hook.c - the environment provided by the region serverstore - the store being compactedscanners - the list StoreFileScanners
to be read fromscanType - the ScanType indicating whether this is a major or minor compactionearliestPutTs - timestamp of the earliest put that was found in any of the involved store
filess - the base scanner, if not null, from previous RegionObserver in the chainrequest - compaction requestreadPoint - the readpoint to create scannernull if the default implementation is to
be used.IOException@Deprecated default InternalScanner preCompactScannerOpen(ObserverContext<RegionCoprocessorEnvironment> c, Store store, List<? extends KeyValueScanner> scanners, ScanType scanType, long earliestPutTs, InternalScanner s) throws IOException
preCompactScannerOpen(ObserverContext, Store, List, ScanType, long,
InternalScanner, CompactionRequest, long) instead.StoreFiles selected for compaction into a new
StoreFile and prior to creating the scanner used to read the input files. To override
or modify the compaction process, implementing classes can return a new scanner to provide the
KeyValues to be stored into the new StoreFile or null to perform the default
processing. Calling ObserverContext.bypass() has no
effect in this hook.c - the environment provided by the region serverstore - the store being compactedscanners - the list StoreFileScanners
to be read fromscanType - the ScanType indicating whether this is a major or minor compactionearliestPutTs - timestamp of the earliest put that was found in any of the involved store
filess - the base scanner, if not null, from previous RegionObserver in the chainnull if the default implementation is to
be used.IOExceptiondefault void postCompact(ObserverContext<RegionCoprocessorEnvironment> c, Store store, StoreFile resultFile, CompactionRequest request) throws IOException
c - the environment provided by the region serverstore - the store being compactedresultFile - the new store file written out during compactionrequest - the requested compactionIOException@Deprecated default void postCompact(ObserverContext<RegionCoprocessorEnvironment> c, Store store, StoreFile resultFile) throws IOException
postCompact(ObserverContext, Store, StoreFile, CompactionRequest)
insteadc - the environment provided by the region serverstore - the store being compactedresultFile - the new store file written out during compactionIOException@Deprecated default void preSplit(ObserverContext<RegionCoprocessorEnvironment> c) throws IOException
c - the environment provided by the region server
(e.getRegion() returns the parent region)IOExceptionMasterObserver@Deprecated default void preSplit(ObserverContext<RegionCoprocessorEnvironment> c, byte[] splitRow) throws IOException
c - the environment provided by the region server
(e.getRegion() returns the parent region)
Note: the logic moves to Master; it is unused in RSIOExceptionMasterObserver@Deprecated default void postSplit(ObserverContext<RegionCoprocessorEnvironment> c, Region l, Region r) throws IOException
c - the environment provided by the region server
(e.getRegion() returns the parent region)l - the left daughter regionr - the right daughter regionIOExceptionMasterObserver@Deprecated default void preSplitBeforePONR(ObserverContext<RegionCoprocessorEnvironment> ctx, byte[] splitKey, List<Mutation> metaEntries) throws IOException
ObserverContext.bypass() rollback the splitctx - splitKey - metaEntries - Note: the logic moves to Master; it is unused in RSIOExceptionMasterObserver@Deprecated default void preSplitAfterPONR(ObserverContext<RegionCoprocessorEnvironment> ctx) throws IOException
ObserverContext.bypass() has no
effect in this hook.ctx - Note: the logic moves to Master; it is unused in RSIOExceptionMasterObserver@Deprecated default void preRollBackSplit(ObserverContext<RegionCoprocessorEnvironment> ctx) throws IOException
ctx - Note: the logic moves to Master; it is unused in RSIOExceptionMasterObserver@Deprecated default void postRollBackSplit(ObserverContext<RegionCoprocessorEnvironment> ctx) throws IOException
ctx - Note: the logic moves to Master; it is unused in RSIOExceptionMasterObserver@Deprecated default void postCompleteSplit(ObserverContext<RegionCoprocessorEnvironment> ctx) throws IOException
MasterObserver.postCompletedSplitRegionAction(ObserverContext, HRegionInfo, HRegionInfo)
instead.ctx - IOExceptiondefault void preClose(ObserverContext<RegionCoprocessorEnvironment> c, boolean abortRequested) throws IOException
c - the environment provided by the region serverabortRequested - true if the region server is abortingIOExceptiondefault void postClose(ObserverContext<RegionCoprocessorEnvironment> c, boolean abortRequested)
c - the environment provided by the region serverabortRequested - true if the region server is abortingdefault void preGetOp(ObserverContext<RegionCoprocessorEnvironment> c, Get get, List<Cell> result) throws IOException
Call CoprocessorEnvironment#bypass to skip default actions
Call CoprocessorEnvironment#complete to skip any subsequent chained coprocessors
c - the environment provided by the region serverget - the Get requestresult - 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.IOExceptiondefault void postGetOp(ObserverContext<RegionCoprocessorEnvironment> c, Get get, List<Cell> result) throws IOException
Call CoprocessorEnvironment#complete to skip any subsequent chained coprocessors
Note: Do not retain references to any Cells in 'result' beyond the life of this invocation. If need a Cell reference for later use, copy the cell and use that.
c - the environment provided by the region serverget - the Get requestresult - the result to return to the client, modify as necessaryIOExceptiondefault boolean preExists(ObserverContext<RegionCoprocessorEnvironment> c, Get get, boolean exists) throws IOException
Call CoprocessorEnvironment#bypass to skip default actions
Call CoprocessorEnvironment#complete to skip any subsequent chained coprocessors
c - the environment provided by the region serverget - the Get requestexists - IOExceptiondefault boolean postExists(ObserverContext<RegionCoprocessorEnvironment> c, Get get, boolean exists) throws IOException
Call CoprocessorEnvironment#complete to skip any subsequent chained coprocessors
c - the environment provided by the region serverget - the Get requestexists - the result returned by the region serverIOExceptiondefault void prePut(ObserverContext<RegionCoprocessorEnvironment> c, Put put, WALEdit edit, Durability durability) throws IOException
Call CoprocessorEnvironment#bypass to skip default actions
Call CoprocessorEnvironment#complete to skip 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.
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 PutIOExceptiondefault void postPut(ObserverContext<RegionCoprocessorEnvironment> c, Put put, WALEdit edit, Durability durability) throws IOException
Call CoprocessorEnvironment#complete to skip 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.
c - the environment provided by the region serverput - The Put objectedit - The WALEdit object for the waldurability - Persistence guarantee for this PutIOExceptiondefault void preDelete(ObserverContext<RegionCoprocessorEnvironment> c, Delete delete, WALEdit edit, Durability durability) throws IOException
Call CoprocessorEnvironment#bypass to skip default actions
Call CoprocessorEnvironment#complete to skip 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.
c - the environment provided by the region serverdelete - The Delete objectedit - The WALEdit object for the waldurability - Persistence guarantee for this DeleteIOExceptiondefault void prePrepareTimeStampForDeleteVersion(ObserverContext<RegionCoprocessorEnvironment> c, Mutation mutation, Cell cell, byte[] byteNow, Get get) throws IOException
Call CoprocessorEnvironment#bypass to skip default actions
Call CoprocessorEnvironment#complete to skip any subsequent chained coprocessors
c - the environment provided by the region servermutation - - the parent mutation associated with this delete cellcell - - The deleteColumn with latest version cellbyteNow - - timestamp bytesget - - the get formed using the current cell's row.
Note that the get does not specify the family and qualifierIOExceptiondefault void postDelete(ObserverContext<RegionCoprocessorEnvironment> c, Delete delete, WALEdit edit, Durability durability) throws IOException
Call CoprocessorEnvironment#complete to skip 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.
c - the environment provided by the region serverdelete - The Delete objectedit - The WALEdit object for the waldurability - Persistence guarantee for this DeleteIOExceptiondefault void preBatchMutate(ObserverContext<RegionCoprocessorEnvironment> c, MiniBatchOperationInProgress<Mutation> miniBatchOp) throws IOException
MiniBatchOperationInProgress.setOperationStatus(int, OperationStatus)),
RegionObserver can 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.
c - the environment provided by the region serverminiBatchOp - batch of Mutations getting applied to region.IOExceptiondefault void postBatchMutate(ObserverContext<RegionCoprocessorEnvironment> c, MiniBatchOperationInProgress<Mutation> miniBatchOp) throws IOException
postPut(ObserverContext, Put, WALEdit, Durability)
and postDelete(ObserverContext, Delete, WALEdit, Durability) is
this hook will be executed before the mvcc transaction completion.
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.
c - the environment provided by the region serverminiBatchOp - batch of Mutations applied to region.IOExceptiondefault void postStartRegionOperation(ObserverContext<RegionCoprocessorEnvironment> ctx, Region.Operation operation) throws IOException
Region.startRegionOperation().ctx - operation - The operation is about to be taken on the regionIOExceptiondefault void postCloseRegionOperation(ObserverContext<RegionCoprocessorEnvironment> ctx, Region.Operation operation) throws IOException
Region.closeRegionOperation().ctx - operation - IOExceptiondefault void postBatchMutateIndispensably(ObserverContext<RegionCoprocessorEnvironment> ctx, MiniBatchOperationInProgress<Mutation> miniBatchOp, boolean success) throws IOException
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.
ctx - miniBatchOp - success - true if batch operation is successful otherwise false.IOExceptiondefault boolean preCheckAndPut(ObserverContext<RegionCoprocessorEnvironment> c, byte[] row, byte[] family, byte[] qualifier, CompareFilter.CompareOp compareOp, ByteArrayComparable comparator, Put put, boolean result) throws IOException
Call CoprocessorEnvironment#bypass to skip default actions
Call CoprocessorEnvironment#complete to skip 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.
c - the environment provided by the region serverrow - row to checkfamily - column familyqualifier - column qualifiercompareOp - the comparison operationcomparator - the comparatorput - data to put if check succeedsresult - IOExceptiondefault boolean preCheckAndPutAfterRowLock(ObserverContext<RegionCoprocessorEnvironment> c, byte[] row, byte[] family, byte[] qualifier, CompareFilter.CompareOp compareOp, ByteArrayComparable comparator, Put put, boolean result) throws IOException
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
Call CoprocessorEnvironment#complete to skip 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.
c - the environment provided by the region serverrow - row to checkfamily - column familyqualifier - column qualifiercompareOp - the comparison operationcomparator - the comparatorput - data to put if check succeedsresult - IOExceptiondefault boolean postCheckAndPut(ObserverContext<RegionCoprocessorEnvironment> c, byte[] row, byte[] family, byte[] qualifier, CompareFilter.CompareOp compareOp, ByteArrayComparable comparator, Put put, boolean result) throws IOException
Call CoprocessorEnvironment#complete to skip 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.
c - the environment provided by the region serverrow - row to checkfamily - column familyqualifier - column qualifiercompareOp - the comparison operationcomparator - the comparatorput - data to put if check succeedsresult - from the checkAndPutIOExceptiondefault boolean preCheckAndDelete(ObserverContext<RegionCoprocessorEnvironment> c, byte[] row, byte[] family, byte[] qualifier, CompareFilter.CompareOp compareOp, ByteArrayComparable comparator, Delete delete, boolean result) throws IOException
Call CoprocessorEnvironment#bypass to skip default actions
Call CoprocessorEnvironment#complete to skip 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.
c - the environment provided by the region serverrow - row to checkfamily - column familyqualifier - column qualifiercompareOp - the comparison operationcomparator - the comparatordelete - delete to commit if check succeedsresult - IOExceptiondefault boolean preCheckAndDeleteAfterRowLock(ObserverContext<RegionCoprocessorEnvironment> c, byte[] row, byte[] family, byte[] qualifier, CompareFilter.CompareOp compareOp, ByteArrayComparable comparator, Delete delete, boolean result) throws IOException
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
Call CoprocessorEnvironment#complete to skip 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.
c - the environment provided by the region serverrow - row to checkfamily - column familyqualifier - column qualifiercompareOp - the comparison operationcomparator - the comparatordelete - delete to commit if check succeedsresult - IOExceptiondefault boolean postCheckAndDelete(ObserverContext<RegionCoprocessorEnvironment> c, byte[] row, byte[] family, byte[] qualifier, CompareFilter.CompareOp compareOp, ByteArrayComparable comparator, Delete delete, boolean result) throws IOException
Call CoprocessorEnvironment#complete to skip 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.
c - the environment provided by the region serverrow - row to checkfamily - column familyqualifier - column qualifiercompareOp - the comparison operationcomparator - the comparatordelete - delete to commit if check succeedsresult - from the CheckAndDeleteIOException@Deprecated default long preIncrementColumnValue(ObserverContext<RegionCoprocessorEnvironment> c, byte[] row, byte[] family, byte[] qualifier, long amount, boolean writeToWAL) throws IOException
Call CoprocessorEnvironment#bypass to skip default actions
Call CoprocessorEnvironment#complete to skip any subsequent chained coprocessors
c - the environment provided by the region serverrow - row to checkfamily - column familyqualifier - column qualifieramount - long amount to incrementwriteToWAL - true if the change should be written to the WALIOException@Deprecated default long postIncrementColumnValue(ObserverContext<RegionCoprocessorEnvironment> c, byte[] row, byte[] family, byte[] qualifier, long amount, boolean writeToWAL, long result) throws IOException
Call CoprocessorEnvironment#complete to skip any subsequent chained coprocessors
c - the environment provided by the region serverrow - row to checkfamily - column familyqualifier - column qualifieramount - long amount to incrementwriteToWAL - true if the change should be written to the WALresult - the result returned by incrementColumnValueIOExceptiondefault Result preAppend(ObserverContext<RegionCoprocessorEnvironment> c, Append append) throws IOException
Call CoprocessorEnvironment#bypass to skip default actions
Call CoprocessorEnvironment#complete to skip 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.
c - the environment provided by the region serverappend - Append objectIOExceptiondefault Result preAppendAfterRowLock(ObserverContext<RegionCoprocessorEnvironment> c, Append append) throws IOException
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
Call CoprocessorEnvironment#complete to skip 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.
c - the environment provided by the region serverappend - Append objectIOExceptiondefault Result postAppend(ObserverContext<RegionCoprocessorEnvironment> c, Append append, Result result) throws IOException
Call CoprocessorEnvironment#complete to skip 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.
c - the environment provided by the region serverappend - Append objectresult - the result returned by incrementIOExceptiondefault Result preIncrement(ObserverContext<RegionCoprocessorEnvironment> c, Increment increment) throws IOException
Call CoprocessorEnvironment#bypass to skip default actions
Call CoprocessorEnvironment#complete to skip 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.
c - the environment provided by the region serverincrement - increment objectIOExceptiondefault Result preIncrementAfterRowLock(ObserverContext<RegionCoprocessorEnvironment> c, Increment increment) throws IOException
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
Call CoprocessorEnvironment#complete to skip 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.
c - the environment provided by the region serverincrement - increment objectIOExceptiondefault Result postIncrement(ObserverContext<RegionCoprocessorEnvironment> c, Increment increment, Result result) throws IOException
Call CoprocessorEnvironment#complete to skip 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.
c - the environment provided by the region serverincrement - increment objectresult - the result returned by incrementIOExceptiondefault RegionScanner preScannerOpen(ObserverContext<RegionCoprocessorEnvironment> c, Scan scan, RegionScanner s) throws IOException
Call CoprocessorEnvironment#bypass to skip default actions
Call CoprocessorEnvironment#complete to skip any subsequent chained coprocessors
Note: Do not retain references to any Cells returned by scanner, beyond the life of this invocation. If need a Cell reference for later use, copy the cell and use that.
c - the environment provided by the region serverscan - the Scan specifications - if not null, the base scannerIOException@Deprecated default KeyValueScanner preStoreScannerOpen(ObserverContext<RegionCoprocessorEnvironment> c, Store store, Scan scan, NavigableSet<byte[]> targetCols, KeyValueScanner s) throws IOException
preStoreScannerOpen(ObserverContext, Store, Scan, NavigableSet,
KeyValueScanner, long) instead
See preFlushScannerOpen(ObserverContext, Store, List, InternalScanner, long) and preCompactScannerOpen(ObserverContext,
Store, List, ScanType, long, InternalScanner, CompactionRequest, long)
to override scanners created for flushes or compactions, resp.
Call CoprocessorEnvironment#complete to skip any subsequent chained
coprocessors.
Calling ObserverContext.bypass() has no
effect in this hook.
Note: Do not retain references to any Cells returned by scanner, beyond the life of this invocation. If need a Cell reference for later use, copy the cell and use that.
c - the environment provided by the region serverstore - the store being scannedscan - the Scan specificationtargetCols - columns to be used in the scanners - the base scanner, if not null, from previous RegionObserver in the chainnull to use the default implementationIOExceptiondefault KeyValueScanner preStoreScannerOpen(ObserverContext<RegionCoprocessorEnvironment> c, Store store, Scan scan, NavigableSet<byte[]> targetCols, KeyValueScanner s, long readPt) throws IOException
See preFlushScannerOpen(ObserverContext, Store, List, InternalScanner, long) and preCompactScannerOpen(ObserverContext,
Store, List, ScanType, long, InternalScanner, CompactionRequest, long)
to override scanners created for flushes or compactions, resp.
Call CoprocessorEnvironment#complete to skip any subsequent chained
coprocessors.
Calling ObserverContext.bypass() has no
effect in this hook.
Note: Do not retain references to any Cells returned by scanner, beyond the life of this invocation. If need a Cell reference for later use, copy the cell and use that.
c - the environment provided by the region serverstore - the store being scannedscan - the Scan specificationtargetCols - columns to be used in the scanners - the base scanner, if not null, from previous RegionObserver in the chainreadPt - the read pointnull to use the default implementationIOExceptiondefault RegionScanner postScannerOpen(ObserverContext<RegionCoprocessorEnvironment> c, Scan scan, RegionScanner s) throws IOException
Call CoprocessorEnvironment#complete to skip any subsequent chained coprocessors
Note: Do not retain references to any Cells returned by scanner, beyond the life of this invocation. If need a Cell reference for later use, copy the cell and use that.
c - the environment provided by the region serverscan - the Scan specifications - if not null, the base scannerIOExceptiondefault boolean preScannerNext(ObserverContext<RegionCoprocessorEnvironment> c, InternalScanner s, List<Result> result, int limit, boolean hasNext) throws IOException
Call CoprocessorEnvironment#bypass to skip default actions
Call CoprocessorEnvironment#complete to skip any subsequent chained coprocessors
Note: Do not retain references to any Cells returned by scanner, beyond the life of this invocation. If need a Cell reference for later use, copy the cell and use that.
c - the environment provided by the region servers - the scannerresult - The result to return to the client if default processing
is bypassed. Can be modified. Will not be returned if default processing
is not bypassed.limit - the maximum number of results to returnhasNext - the 'has more' indicationIOExceptiondefault boolean postScannerNext(ObserverContext<RegionCoprocessorEnvironment> c, InternalScanner s, List<Result> result, int limit, boolean hasNext) throws IOException
Call CoprocessorEnvironment#complete to skip any subsequent chained coprocessors
Note: Do not retain references to any Cells returned by scanner, beyond the life of this invocation. If need a Cell reference for later use, copy the cell and use that.
c - the environment provided by the region servers - the scannerresult - the result to return to the client, can be modifiedlimit - the maximum number of results to returnhasNext - the 'has more' indicationIOException@Deprecated default boolean postScannerFilterRow(ObserverContext<RegionCoprocessorEnvironment> c, InternalScanner s, byte[] currentRow, int offset, short length, boolean hasMore) throws IOException
postScannerFilterRow(ObserverContext, InternalScanner, Cell, boolean)boolean filterRowKey(byte [] buffer, int offset, int length) returning trueboolean filterRow() returning truedefault void filterRow(List<KeyValue> kvs) removing all the kvs
from the passed Listc - the environment provided by the region servers - the scannercurrentRow - The current rowkey which got filtered outoffset - offset to rowkeylength - length of rowkeyhasMore - the 'has more' indicationIOExceptiondefault boolean postScannerFilterRow(ObserverContext<RegionCoprocessorEnvironment> c, InternalScanner s, Cell curRowCell, boolean hasMore) throws IOException
boolean filterRowKey(byte [] buffer, int offset, int length) returning trueboolean filterRow() returning truedefault void filterRow(List<KeyValue> kvs) removing all the kvs from
the passed ListNote: Do not retain references to any Cells returned by scanner, beyond the life of this invocation. If need a Cell reference for later use, copy the cell and use that.
c - the environment provided by the region servers - the scannercurRowCell - The cell in the current row which got filtered outhasMore - the 'has more' indicationIOExceptiondefault void preScannerClose(ObserverContext<RegionCoprocessorEnvironment> c, InternalScanner s) throws IOException
Call CoprocessorEnvironment#bypass to skip default actions
Call CoprocessorEnvironment#complete to skip any subsequent chained coprocessors
c - the environment provided by the region servers - the scannerIOExceptiondefault void postScannerClose(ObserverContext<RegionCoprocessorEnvironment> ctx, InternalScanner s) throws IOException
Call CoprocessorEnvironment#complete to skip any subsequent chained coprocessors
ctx - the environment provided by the region servers - the scannerIOExceptiondefault void preReplayWALs(ObserverContext<? extends RegionCoprocessorEnvironment> ctx, HRegionInfo info, org.apache.hadoop.fs.Path edits) throws IOException
ObserverContext.bypass() has no
effect in this hook.ctx - the environment provided by the region serverinfo - the RegionInfo for this regionedits - the file of recovered editsIOExceptiondefault void postReplayWALs(ObserverContext<? extends RegionCoprocessorEnvironment> ctx, HRegionInfo info, org.apache.hadoop.fs.Path edits) throws IOException
ctx - the environment provided by the region serverinfo - the RegionInfo for this regionedits - the file of recovered editsIOExceptiondefault void preWALRestore(ObserverContext<? extends RegionCoprocessorEnvironment> ctx, HRegionInfo info, WALKey logKey, WALEdit logEdit) throws IOException
WALEdit
replayed for this region.ctx - the environment provided by the region serverIOExceptiondefault void postWALRestore(ObserverContext<? extends RegionCoprocessorEnvironment> ctx, HRegionInfo info, WALKey logKey, WALEdit logEdit) throws IOException
WALEdit
replayed for this region.ctx - the environment provided by the region serverIOExceptiondefault void preBulkLoadHFile(ObserverContext<RegionCoprocessorEnvironment> ctx, List<Pair<byte[],String>> familyPaths) throws IOException
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.IOExceptiondefault void preCommitStoreFile(ObserverContext<RegionCoprocessorEnvironment> ctx, byte[] family, List<Pair<org.apache.hadoop.fs.Path,org.apache.hadoop.fs.Path>> pairs) throws IOException
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.IOExceptiondefault void postCommitStoreFile(ObserverContext<RegionCoprocessorEnvironment> ctx, byte[] family, org.apache.hadoop.fs.Path srcPath, org.apache.hadoop.fs.Path dstPath) throws IOException
ctx - the environment provided by the region serverfamily - column familysrcPath - Path to file before the movedstPath - Path to file after the moveIOExceptiondefault boolean postBulkLoadHFile(ObserverContext<RegionCoprocessorEnvironment> ctx, List<Pair<byte[],String>> stagingFamilyPaths, Map<byte[],List<org.apache.hadoop.fs.Path>> finalPaths, boolean hasLoaded) throws IOException
ctx - the environment provided by the region serverstagingFamilyPaths - pairs of { CF, HFile path } submitted for bulk loadfinalPaths - Map of CF to List of file paths for the final loaded fileshasLoaded - whether the bulkLoad was successfulIOExceptiondefault boolean postBulkLoadHFile(ObserverContext<RegionCoprocessorEnvironment> ctx, List<Pair<byte[],String>> stagingFamilyPaths, boolean hasLoaded) throws IOException
postBulkLoadHFile(ObserverContext, List, Map, boolean)ctx - the environment provided by the region serverstagingFamilyPaths - pairs of { CF, HFile path } submitted for bulk loadhasLoaded - whether the bulkLoad was successfulIOExceptiondefault StoreFileReader preStoreFileReaderOpen(ObserverContext<RegionCoprocessorEnvironment> ctx, org.apache.hadoop.fs.FileSystem fs, org.apache.hadoop.fs.Path p, FSDataInputStreamWrapper in, long size, CacheConfig cacheConf, Reference r, StoreFileReader reader) throws IOException
ObserverContext.bypass() has no
effect in this hook.ctx - the environment provided by the region serverfs - fileystem to read fromp - path to the filein - FSDataInputStreamWrappersize - Full size of the filecacheConf - r - original reference file. This will be not null only when reading a split file.reader - the base reader, if not null, from previous RegionObserver in the chainIOExceptiondefault StoreFileReader postStoreFileReaderOpen(ObserverContext<RegionCoprocessorEnvironment> ctx, org.apache.hadoop.fs.FileSystem fs, org.apache.hadoop.fs.Path p, FSDataInputStreamWrapper in, long size, CacheConfig cacheConf, Reference r, StoreFileReader reader) throws IOException
ctx - the environment provided by the region serverfs - fileystem to read fromp - path to the filein - FSDataInputStreamWrappersize - Full size of the filecacheConf - r - original reference file. This will be not null only when reading a split file.reader - the base reader instanceIOExceptiondefault Cell postMutationBeforeWAL(ObserverContext<RegionCoprocessorEnvironment> ctx, RegionObserver.MutationType opType, Mutation mutation, Cell oldCell, Cell newCell) throws IOException
ObserverContext.bypass() has no
effect in this hook.ctx - the environment provided by the region serveropType - the operation typemutation - the current mutationoldCell - old cell containing previous valuenewCell - the new cell containing the computed valueIOExceptiondefault DeleteTracker postInstantiateDeleteTracker(ObserverContext<RegionCoprocessorEnvironment> ctx, DeleteTracker delTracker) throws IOException
ctx - the environment provided by the region serverdelTracker - the deleteTracker that is created by the QueryMatcherIOExceptionCopyright © 2007–2017 The Apache Software Foundation. All rights reserved.