public class RegionCoprocessorHost
extends <any>
Region.| Constructor and Description |
|---|
RegionCoprocessorHost(HRegion region,
RegionServerServices rsServices,
Configuration conf)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
RegionCoprocessor |
checkAndGetInstance(java.lang.Class<?> implClass) |
org.apache.hadoop.hbase.regionserver.RegionCoprocessorHost.RegionEnvironment |
createEnvironment(RegionCoprocessor instance,
int priority,
int seq,
Configuration conf) |
Result |
postAppend(Append append,
Result result) |
void |
postBatchMutate(MiniBatchOperationInProgress<Mutation> miniBatchOp) |
void |
postBatchMutateIndispensably(MiniBatchOperationInProgress<Mutation> miniBatchOp,
boolean success) |
void |
postBulkLoadHFile(java.util.List<<any>> familyPaths,
java.util.Map<byte[],java.util.List<Path>> map) |
boolean |
postCheckAndDelete(byte[] row,
byte[] family,
byte[] qualifier,
CompareOperator op,
ByteArrayComparable comparator,
Delete delete,
boolean result) |
boolean |
postCheckAndPut(byte[] row,
byte[] family,
byte[] qualifier,
CompareOperator op,
ByteArrayComparable comparator,
Put put,
boolean result) |
void |
postClose(boolean abortRequested)
Invoked after a region is closed
|
void |
postCloseRegionOperation(Operation op) |
void |
postCommitStoreFile(byte[] family,
Path srcPath,
Path dstPath) |
void |
postCompact(HStore store,
HStoreFile resultFile,
CompactionLifeCycleTracker tracker,
CompactionRequest request,
User user)
Called after the store compaction has completed.
|
void |
postCompactSelection(HStore store,
java.util.List<HStoreFile> selected,
CompactionLifeCycleTracker tracker,
CompactionRequest request,
User user)
Called after the
HStoreFiles to be compacted have been selected from the available
candidates. |
void |
postDelete(Delete delete,
WALEdit edit,
Durability durability) |
void |
postEndpointInvocation(Service service,
java.lang.String methodName,
Message request,
Message.Builder responseBuilder) |
boolean |
postExists(Get get,
boolean result) |
void |
postFlush(FlushLifeCycleTracker tracker)
Invoked after a memstore flush
|
void |
postFlush(HStore store,
HStoreFile storeFile,
FlushLifeCycleTracker tracker)
Invoked after a memstore flush
|
void |
postGet(Get get,
java.util.List<Cell> results) |
Result |
postIncrement(Increment increment,
Result result) |
DeleteTracker |
postInstantiateDeleteTracker(DeleteTracker result)
Deprecated.
Since 2.0 with out any replacement and will be removed in 3.0
|
void |
postMemStoreCompaction(HStore store)
Invoked after in memory compaction.
|
Cell |
postMutationBeforeWAL(MutationType opType,
Mutation mutation,
Cell oldCell,
Cell newCell) |
void |
postOpen()
Invoked after a region open
|
void |
postPut(Put put,
WALEdit edit,
Durability durability) |
void |
postReplayWALs(RegionInfo info,
Path edits) |
void |
postScannerClose(InternalScanner s) |
boolean |
postScannerFilterRow(InternalScanner s,
Cell curRowCell)
This will be called by the scan flow when the current scanned row is being filtered out by the
filter.
|
boolean |
postScannerNext(InternalScanner s,
java.util.List<Result> results,
int limit,
boolean hasMore) |
RegionScanner |
postScannerOpen(Scan scan,
RegionScanner s) |
void |
postStartRegionOperation(Operation op) |
StoreFileReader |
postStoreFileReaderOpen(FileSystem fs,
Path p,
FSDataInputStreamWrapper in,
long size,
CacheConfig cacheConf,
Reference r,
StoreFileReader reader) |
void |
postWALRestore(RegionInfo info,
WALKey logKey,
WALEdit logEdit)
Deprecated.
Since hbase-2.0.0. No replacement. To be removed in hbase-3.0.0 and replaced
with something that doesn't expose IntefaceAudience.Private classes.
|
Result |
preAppend(Append append)
Supports Coprocessor 'bypass'.
|
Result |
preAppendAfterRowLock(Append append)
Supports Coprocessor 'bypass'.
|
void |
preBatchMutate(MiniBatchOperationInProgress<Mutation> miniBatchOp) |
void |
preBulkLoadHFile(java.util.List<<any>> familyPaths) |
java.lang.Boolean |
preCheckAndDelete(byte[] row,
byte[] family,
byte[] qualifier,
CompareOperator op,
ByteArrayComparable comparator,
Delete delete)
Supports Coprocessor 'bypass'.
|
java.lang.Boolean |
preCheckAndDeleteAfterRowLock(byte[] row,
byte[] family,
byte[] qualifier,
CompareOperator op,
ByteArrayComparable comparator,
Delete delete)
Supports Coprocessor 'bypass'.
|
java.lang.Boolean |
preCheckAndPut(byte[] row,
byte[] family,
byte[] qualifier,
CompareOperator op,
ByteArrayComparable comparator,
Put put)
Supports Coprocessor 'bypass'.
|
java.lang.Boolean |
preCheckAndPutAfterRowLock(byte[] row,
byte[] family,
byte[] qualifier,
CompareOperator op,
ByteArrayComparable comparator,
Put put)
Supports Coprocessor 'bypass'.
|
void |
preCleanupBulkLoad(User user) |
void |
preClose(boolean abortRequested)
Invoked before a region is closed
|
boolean |
preCommitStoreFile(byte[] family,
java.util.List<<any>> pairs) |
InternalScanner |
preCompact(HStore store,
InternalScanner scanner,
ScanType scanType,
CompactionLifeCycleTracker tracker,
CompactionRequest request,
User user)
Called prior to rewriting the store files selected for compaction
|
ScanInfo |
preCompactScannerOpen(HStore store,
ScanType scanType,
CompactionLifeCycleTracker tracker,
CompactionRequest request,
User user)
Called prior to opening store scanner for compaction.
|
boolean |
preCompactSelection(HStore store,
java.util.List<HStoreFile> candidates,
CompactionLifeCycleTracker tracker,
User user)
Called prior to selecting the
HStoreFiles for compaction from the list of currently
available candidates. |
boolean |
preDelete(Delete delete,
WALEdit edit,
Durability durability)
Supports Coprocessor 'bypass'.
|
Message |
preEndpointInvocation(Service service,
java.lang.String methodName,
Message request) |
java.lang.Boolean |
preExists(Get get)
Supports Coprocessor 'bypass'.
|
void |
preFlush(FlushLifeCycleTracker tracker)
Invoked before a memstore flush
|
InternalScanner |
preFlush(HStore store,
InternalScanner scanner,
FlushLifeCycleTracker tracker)
Invoked before a memstore flush
|
ScanInfo |
preFlushScannerOpen(HStore store,
FlushLifeCycleTracker tracker)
Invoked before create StoreScanner for flush.
|
boolean |
preGet(Get get,
java.util.List<Cell> results)
Supports Coprocessor 'bypass'.
|
Result |
preIncrement(Increment increment)
Supports Coprocessor 'bypass'.
|
Result |
preIncrementAfterRowLock(Increment increment)
Supports Coprocessor 'bypass'.
|
void |
preMemStoreCompaction(HStore store)
Invoked before in memory compaction.
|
InternalScanner |
preMemStoreCompactionCompact(HStore store,
InternalScanner scanner)
Invoked before compacting memstore.
|
ScanInfo |
preMemStoreCompactionCompactScannerOpen(HStore store)
Invoked before create StoreScanner for in memory compaction.
|
void |
preOpen()
Invoked before a region open.
|
void |
prePrepareBulkLoad(User user) |
boolean |
prePrepareTimeStampForDeleteVersion(Mutation mutation,
Cell kv,
byte[] byteNow,
Get get)
Deprecated.
In hbase-2.0.0. Will be removed in hbase-3.0.0. Added explicitly for a single
Coprocessor for its needs only. Will be removed.
|
boolean |
prePut(Put put,
WALEdit edit,
Durability durability)
Supports Coprocessor 'bypass'.
|
void |
preReplayWALs(RegionInfo info,
Path edits) |
boolean |
preScannerClose(InternalScanner s)
Supports Coprocessor 'bypass'.
|
java.lang.Boolean |
preScannerNext(InternalScanner s,
java.util.List<Result> results,
int limit) |
void |
preScannerOpen(Scan scan) |
StoreFileReader |
preStoreFileReaderOpen(FileSystem fs,
Path p,
FSDataInputStreamWrapper in,
long size,
CacheConfig cacheConf,
Reference r) |
ScanInfo |
preStoreScannerOpen(HStore store)
Called before open store scanner for user scan.
|
boolean |
preWALRestore(RegionInfo info,
WALKey logKey,
WALEdit logEdit)
Deprecated.
Since hbase-2.0.0. No replacement. To be removed in hbase-3.0.0 and replaced
with something that doesn't expose IntefaceAudience.Private classes.
|
static void |
testTableCoprocessorAttrs(Configuration conf,
TableDescriptor htd)
Sanity check the table coprocessor attributes of the supplied schema.
|
public RegionCoprocessorHost(HRegion region, RegionServerServices rsServices, Configuration conf)
region - the regionrsServices - interface to available region server functionalityconf - the configurationpublic static void testTableCoprocessorAttrs(Configuration conf,
TableDescriptor htd)
throws java.io.IOException
conf - htd - java.io.IOExceptionpublic org.apache.hadoop.hbase.regionserver.RegionCoprocessorHost.RegionEnvironment createEnvironment(RegionCoprocessor instance,
int priority,
int seq,
Configuration conf)
public RegionCoprocessor checkAndGetInstance(java.lang.Class<?> implClass)
throws java.lang.InstantiationException,
java.lang.IllegalAccessException
java.lang.InstantiationExceptionjava.lang.IllegalAccessExceptionpublic void preOpen()
throws java.io.IOException
java.io.IOException - Signals that an I/O exception has occurred.public void postOpen()
public void preClose(boolean abortRequested)
throws java.io.IOException
abortRequested - true if the server is abortingjava.io.IOExceptionpublic void postClose(boolean abortRequested)
abortRequested - true if the server is abortingpublic boolean preCompactSelection(HStore store, java.util.List<HStoreFile> candidates, CompactionLifeCycleTracker tracker, User user) throws java.io.IOException
HStoreFiles for compaction from the list of currently
available candidates.
Supports Coprocessor 'bypass' -- 'bypass' is how this method indicates that it changed
the passed in candidates.
store - The store where compaction is being requestedcandidates - The currently available store filestracker - used to track the life cycle of a compactionuser - the userjava.io.IOExceptionpublic void postCompactSelection(HStore store, java.util.List<HStoreFile> selected, CompactionLifeCycleTracker tracker, CompactionRequest request, User user) throws java.io.IOException
HStoreFiles to be compacted have been selected from the available
candidates.store - The store where compaction is being requestedselected - The store files selected to compacttracker - used to track the life cycle of a compactionrequest - the compaction requestuser - the userjava.io.IOExceptionpublic ScanInfo preCompactScannerOpen(HStore store, ScanType scanType, CompactionLifeCycleTracker tracker, CompactionRequest request, User user) throws java.io.IOException
java.io.IOExceptionpublic InternalScanner preCompact(HStore store, InternalScanner scanner, ScanType scanType, CompactionLifeCycleTracker tracker, CompactionRequest request, User user) throws java.io.IOException
store - the store being compactedscanner - the scanner used to read store data during compactionscanType - type of Scantracker - used to track the life cycle of a compactionrequest - the compaction requestuser - the userjava.io.IOExceptionpublic void postCompact(HStore store, HStoreFile resultFile, CompactionLifeCycleTracker tracker, CompactionRequest request, User user) throws java.io.IOException
store - the store being compactedresultFile - the new store file written during compactiontracker - used to track the life cycle of a compactionrequest - the compaction requestuser - the userjava.io.IOExceptionpublic ScanInfo preFlushScannerOpen(HStore store, FlushLifeCycleTracker tracker) throws java.io.IOException
java.io.IOExceptionpublic InternalScanner preFlush(HStore store, InternalScanner scanner, FlushLifeCycleTracker tracker) throws java.io.IOException
java.io.IOExceptionpublic void preFlush(FlushLifeCycleTracker tracker) throws java.io.IOException
java.io.IOExceptionpublic void postFlush(FlushLifeCycleTracker tracker) throws java.io.IOException
java.io.IOExceptionpublic void preMemStoreCompaction(HStore store) throws java.io.IOException
java.io.IOExceptionpublic ScanInfo preMemStoreCompactionCompactScannerOpen(HStore store) throws java.io.IOException
java.io.IOExceptionpublic InternalScanner preMemStoreCompactionCompact(HStore store, InternalScanner scanner) throws java.io.IOException
java.io.IOExceptionpublic void postMemStoreCompaction(HStore store) throws java.io.IOException
java.io.IOExceptionpublic void postFlush(HStore store, HStoreFile storeFile, FlushLifeCycleTracker tracker) throws java.io.IOException
java.io.IOExceptionpublic boolean preGet(Get get,
java.util.List<Cell> results)
throws java.io.IOException
get - the Get requestresults - What to return if return is true/'bypass'.java.io.IOException - Exceptionpublic void postGet(Get get,
java.util.List<Cell> results)
throws java.io.IOException
get - the Get requestresults - the result setjava.io.IOException - Exceptionpublic java.lang.Boolean preExists(Get get)
throws java.io.IOException
get - the Get requestjava.io.IOException - Exceptionpublic boolean postExists(Get get,
boolean result)
throws java.io.IOException
get - the Get requestresult - the result returned by the region serverjava.io.IOException - Exceptionpublic boolean prePut(Put put,
WALEdit edit,
Durability durability)
throws java.io.IOException
put - The Put objectedit - The WALEdit object.durability - The durability usedjava.io.IOException - Exception@Deprecated
public boolean prePrepareTimeStampForDeleteVersion(Mutation mutation,
Cell kv,
byte[] byteNow,
Get get)
throws java.io.IOException
mutation - - the current mutationkv - - the current cellbyteNow - - current timestamp in bytesget - - the get that could be used
Note that the get only does not specify the family and qualifier that should be usedjava.io.IOExceptionpublic void postPut(Put put,
WALEdit edit,
Durability durability)
throws java.io.IOException
put - The Put objectedit - The WALEdit object.durability - The durability usedjava.io.IOException - Exceptionpublic boolean preDelete(Delete delete,
WALEdit edit,
Durability durability)
throws java.io.IOException
delete - The Delete objectedit - The WALEdit object.durability - The durability usedjava.io.IOException - Exceptionpublic void postDelete(Delete delete,
WALEdit edit,
Durability durability)
throws java.io.IOException
delete - The Delete objectedit - The WALEdit object.durability - The durability usedjava.io.IOException - Exceptionpublic void preBatchMutate(MiniBatchOperationInProgress<Mutation> miniBatchOp) throws java.io.IOException
java.io.IOExceptionpublic void postBatchMutate(MiniBatchOperationInProgress<Mutation> miniBatchOp) throws java.io.IOException
java.io.IOExceptionpublic void postBatchMutateIndispensably(MiniBatchOperationInProgress<Mutation> miniBatchOp, boolean success) throws java.io.IOException
java.io.IOExceptionpublic java.lang.Boolean preCheckAndPut(byte[] row,
byte[] family,
byte[] qualifier,
CompareOperator op,
ByteArrayComparable comparator,
Put put)
throws java.io.IOException
row - row to checkfamily - column familyqualifier - column qualifierop - the comparison operationcomparator - the comparatorput - data to put if check succeedsjava.io.IOExceptionpublic java.lang.Boolean preCheckAndPutAfterRowLock(byte[] row,
byte[] family,
byte[] qualifier,
CompareOperator op,
ByteArrayComparable comparator,
Put put)
throws java.io.IOException
row - row to checkfamily - column familyqualifier - column qualifierop - the comparison operationcomparator - the comparatorput - data to put if check succeedsjava.io.IOExceptionpublic boolean postCheckAndPut(byte[] row,
byte[] family,
byte[] qualifier,
CompareOperator op,
ByteArrayComparable comparator,
Put put,
boolean result)
throws java.io.IOException
row - row to checkfamily - column familyqualifier - column qualifierop - the comparison operationcomparator - the comparatorput - data to put if check succeedsjava.io.IOException - epublic java.lang.Boolean preCheckAndDelete(byte[] row,
byte[] family,
byte[] qualifier,
CompareOperator op,
ByteArrayComparable comparator,
Delete delete)
throws java.io.IOException
row - row to checkfamily - column familyqualifier - column qualifierop - the comparison operationcomparator - the comparatordelete - delete to commit if check succeedsjava.io.IOExceptionpublic java.lang.Boolean preCheckAndDeleteAfterRowLock(byte[] row,
byte[] family,
byte[] qualifier,
CompareOperator op,
ByteArrayComparable comparator,
Delete delete)
throws java.io.IOException
row - row to checkfamily - column familyqualifier - column qualifierop - the comparison operationcomparator - the comparatordelete - delete to commit if check succeedsjava.io.IOExceptionpublic boolean postCheckAndDelete(byte[] row,
byte[] family,
byte[] qualifier,
CompareOperator op,
ByteArrayComparable comparator,
Delete delete,
boolean result)
throws java.io.IOException
row - row to checkfamily - column familyqualifier - column qualifierop - the comparison operationcomparator - the comparatordelete - delete to commit if check succeedsjava.io.IOException - epublic Result preAppend(Append append)
throws java.io.IOException
append - append objectjava.io.IOException - if an error occurred on the coprocessorpublic Result preAppendAfterRowLock(Append append)
throws java.io.IOException
append - append objectjava.io.IOException - if an error occurred on the coprocessorpublic Result preIncrement(Increment increment)
throws java.io.IOException
increment - increment objectjava.io.IOException - if an error occurred on the coprocessorpublic Result preIncrementAfterRowLock(Increment increment)
throws java.io.IOException
increment - increment objectjava.io.IOException - if an error occurred on the coprocessorpublic Result postAppend(Append append,
Result result)
throws java.io.IOException
append - Append objectresult - the result returned by the appendjava.io.IOException - if an error occurred on the coprocessorpublic Result postIncrement(Increment increment,
Result result)
throws java.io.IOException
increment - increment objectresult - the result returned by postIncrementjava.io.IOException - if an error occurred on the coprocessorpublic void preScannerOpen(Scan scan)
throws java.io.IOException
scan - the Scan specificationjava.io.IOException - Exceptionpublic RegionScanner postScannerOpen(Scan scan, RegionScanner s) throws java.io.IOException
scan - the Scan specifications - the scannerjava.io.IOException - Exceptionpublic java.lang.Boolean preScannerNext(InternalScanner s, java.util.List<Result> results, int limit) throws java.io.IOException
s - the scannerresults - the result set returned by the region serverlimit - the maximum number of results to returnjava.io.IOException - Exceptionpublic boolean postScannerNext(InternalScanner s, java.util.List<Result> results, int limit, boolean hasMore) throws java.io.IOException
s - the scannerresults - the result set returned by the region serverlimit - the maximum number of results to returnhasMore - java.io.IOException - Exceptionpublic boolean postScannerFilterRow(InternalScanner s, Cell curRowCell) throws java.io.IOException
s - the scannercurRowCell - The cell in the current row which got filtered outjava.io.IOExceptionpublic boolean preScannerClose(InternalScanner s) throws java.io.IOException
s - the scannerjava.io.IOException - Exceptionpublic void postScannerClose(InternalScanner s) throws java.io.IOException
java.io.IOException - Exceptionpublic ScanInfo preStoreScannerOpen(HStore store) throws java.io.IOException
java.io.IOExceptionpublic void preReplayWALs(RegionInfo info,
Path edits)
throws java.io.IOException
info - the RegionInfo for this regionedits - the file of recovered editsjava.io.IOExceptionpublic void postReplayWALs(RegionInfo info,
Path edits)
throws java.io.IOException
info - the RegionInfo for this regionedits - the file of recovered editsjava.io.IOException - Exception@Deprecated
public boolean preWALRestore(RegionInfo info,
WALKey logKey,
WALEdit logEdit)
throws java.io.IOException
java.io.IOException@Deprecated
public void postWALRestore(RegionInfo info,
WALKey logKey,
WALEdit logEdit)
throws java.io.IOException
java.io.IOExceptionpublic void preBulkLoadHFile(java.util.List<<any>> familyPaths)
throws java.io.IOException
familyPaths - pairs of { CF, file path } submitted for bulk loadjava.io.IOExceptionpublic boolean preCommitStoreFile(byte[] family,
java.util.List<<any>> pairs)
throws java.io.IOException
java.io.IOExceptionpublic void postCommitStoreFile(byte[] family,
Path srcPath,
Path dstPath)
throws java.io.IOException
java.io.IOExceptionpublic void postBulkLoadHFile(java.util.List<<any>> familyPaths,
java.util.Map<byte[],java.util.List<Path>> map)
throws java.io.IOException
familyPaths - pairs of { CF, file path } submitted for bulk loadmap - Map of CF to List of file paths for the final loaded filesjava.io.IOExceptionpublic void postStartRegionOperation(Operation op)
throws java.io.IOException
java.io.IOExceptionpublic void postCloseRegionOperation(Operation op)
throws java.io.IOException
java.io.IOExceptionpublic StoreFileReader preStoreFileReaderOpen(FileSystem fs, Path p, FSDataInputStreamWrapper in, long size, CacheConfig cacheConf, Reference r) throws java.io.IOException
fs - 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.java.io.IOExceptionpublic StoreFileReader postStoreFileReaderOpen(FileSystem fs, Path p, FSDataInputStreamWrapper in, long size, CacheConfig cacheConf, Reference r, StoreFileReader reader) throws java.io.IOException
fs - 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 instancejava.io.IOExceptionpublic Cell postMutationBeforeWAL(MutationType opType,
Mutation mutation,
Cell oldCell,
Cell newCell)
throws java.io.IOException
java.io.IOExceptionpublic Message preEndpointInvocation(Service service,
java.lang.String methodName,
Message request)
throws java.io.IOException
java.io.IOExceptionpublic void postEndpointInvocation(Service service,
java.lang.String methodName,
Message request,
Message.Builder responseBuilder)
throws java.io.IOException
java.io.IOException@Deprecated public DeleteTracker postInstantiateDeleteTracker(DeleteTracker result) throws java.io.IOException
java.io.IOExceptionpublic void prePrepareBulkLoad(User user)
throws java.io.IOException
java.io.IOExceptionpublic void preCleanupBulkLoad(User user)
throws java.io.IOException
java.io.IOException