|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.hadoop.hbase.coprocessor.CoprocessorHost<org.apache.hadoop.hbase.regionserver.RegionCoprocessorHost.RegionEnvironment>
org.apache.hadoop.hbase.regionserver.RegionCoprocessorHost
public class RegionCoprocessorHost
Implements the coprocessor environment and runtime support for coprocessors
loaded within a HRegion
.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class org.apache.hadoop.hbase.coprocessor.CoprocessorHost |
---|
CoprocessorHost.Environment |
Field Summary |
---|
Fields inherited from class org.apache.hadoop.hbase.coprocessor.CoprocessorHost |
---|
conf, coprocessors, loadSequence, MASTER_COPROCESSOR_CONF_KEY, pathPrefix, REGION_COPROCESSOR_CONF_KEY, REGIONSERVER_COPROCESSOR_CONF_KEY, USER_REGION_COPROCESSOR_CONF_KEY, WAL_COPROCESSOR_CONF_KEY |
Constructor Summary | |
---|---|
RegionCoprocessorHost(HRegion region,
RegionServerServices rsServices,
org.apache.hadoop.conf.Configuration conf)
Constructor |
Method Summary | |
---|---|
protected void |
abortServer(CoprocessorEnvironment env,
Throwable e)
|
org.apache.hadoop.hbase.regionserver.RegionCoprocessorHost.RegionEnvironment |
createEnvironment(Class<?> implClass,
Coprocessor instance,
int priority,
int seq,
org.apache.hadoop.conf.Configuration conf)
Called when a new Coprocessor class is loaded |
void |
postAppend(Append append,
Result result)
|
void |
postBatchMutate(MiniBatchOperationInProgress<Pair<Mutation,Integer>> miniBatchOp)
|
boolean |
postBulkLoadHFile(List<Pair<byte[],String>> familyPaths,
boolean hasLoaded)
|
boolean |
postCheckAndDelete(byte[] row,
byte[] family,
byte[] qualifier,
CompareFilter.CompareOp compareOp,
ByteArrayComparable comparator,
Delete delete,
boolean result)
|
boolean |
postCheckAndPut(byte[] row,
byte[] family,
byte[] qualifier,
CompareFilter.CompareOp compareOp,
ByteArrayComparable comparator,
Put put,
boolean result)
|
void |
postClose(boolean abortRequested)
Invoked after a region is closed |
void |
postCompact(Store store,
StoreFile resultFile,
CompactionRequest request)
Called after the store compaction has completed. |
void |
postCompactSelection(Store store,
com.google.common.collect.ImmutableList<StoreFile> selected,
CompactionRequest request)
Called after the StoreFile s to be compacted have been selected from the available
candidates. |
void |
postCompleteSplit()
Invoked after a split is completed irrespective of a failure or success. |
void |
postDelete(Delete delete,
WALEdit edit,
boolean writeToWAL)
|
boolean |
postExists(Get get,
boolean exists)
|
void |
postFlush()
Invoked after a memstore flush |
void |
postFlush(Store store,
StoreFile storeFile)
Invoked after a memstore flush |
void |
postGet(Get get,
List<KeyValue> results)
|
void |
postGetClosestRowBefore(byte[] row,
byte[] family,
Result result)
|
Result |
postIncrement(Increment increment,
Result result)
|
void |
postOpen()
Invoked after a region open |
void |
postPut(Put put,
WALEdit edit,
boolean writeToWAL)
|
void |
postRollBackSplit()
Invoked just after the rollback of a failed split is done |
void |
postScannerClose(InternalScanner s)
|
boolean |
postScannerFilterRow(InternalScanner s,
byte[] currentRow)
This will be called by the scan flow when the current scanned row is being filtered out by the filter. |
boolean |
postScannerNext(InternalScanner s,
List<Result> results,
int limit,
boolean hasMore)
|
RegionScanner |
postScannerOpen(Scan scan,
RegionScanner s)
|
void |
postSplit(HRegion l,
HRegion r)
Invoked just after a split |
void |
postWALRestore(HRegionInfo info,
HLogKey logKey,
WALEdit logEdit)
|
Result |
preAppend(Append append)
|
boolean |
preBatchMutate(MiniBatchOperationInProgress<Pair<Mutation,Integer>> miniBatchOp)
|
boolean |
preBulkLoadHFile(List<Pair<byte[],String>> familyPaths)
|
Boolean |
preCheckAndDelete(byte[] row,
byte[] family,
byte[] qualifier,
CompareFilter.CompareOp compareOp,
ByteArrayComparable comparator,
Delete delete)
|
Boolean |
preCheckAndPut(byte[] row,
byte[] family,
byte[] qualifier,
CompareFilter.CompareOp compareOp,
ByteArrayComparable comparator,
Put put)
|
void |
preClose(boolean abortRequested)
Invoked before a region is closed |
InternalScanner |
preCompact(Store store,
InternalScanner scanner,
ScanType scanType,
CompactionRequest request)
Called prior to rewriting the store files selected for compaction |
InternalScanner |
preCompactScannerOpen(Store store,
List<StoreFileScanner> scanners,
ScanType scanType,
long earliestPutTs,
CompactionRequest request)
See RegionObserver.preCompactScannerOpen(ObserverContext, Store, List, ScanType, long, InternalScanner, CompactionRequest) |
boolean |
preCompactSelection(Store store,
List<StoreFile> candidates,
CompactionRequest request)
Called prior to selecting the StoreFile s for compaction from the list of currently
available candidates. |
boolean |
preDelete(Delete delete,
WALEdit edit,
boolean writeToWAL)
|
Boolean |
preExists(Get get)
|
void |
preFlush()
Invoked before a memstore flush |
InternalScanner |
preFlush(Store store,
InternalScanner scanner)
Invoked before a memstore flush |
InternalScanner |
preFlushScannerOpen(Store store,
KeyValueScanner memstoreScanner)
See RegionObserver.preFlushScannerOpen(ObserverContext,
Store, KeyValueScanner, InternalScanner) |
boolean |
preGet(Get get,
List<KeyValue> results)
|
boolean |
preGetClosestRowBefore(byte[] row,
byte[] family,
Result result)
|
Result |
preIncrement(Increment increment)
|
void |
preOpen()
Invoked before a region open. |
boolean |
prePut(Put put,
WALEdit edit,
boolean writeToWAL)
|
void |
preRollBackSplit()
Invoked just before the rollback of a failed split is started |
boolean |
preScannerClose(InternalScanner s)
|
Boolean |
preScannerNext(InternalScanner s,
List<Result> results,
int limit)
|
RegionScanner |
preScannerOpen(Scan scan)
|
void |
preSplit()
Invoked just before a split |
void |
preSplit(byte[] splitRow)
Invoked just before a split |
KeyValueScanner |
preStoreScannerOpen(Store store,
Scan scan,
NavigableSet<byte[]> targetCols)
See RegionObserver.preStoreScannerOpen(ObserverContext,
Store, Scan, NavigableSet, KeyValueScanner) |
boolean |
preWALRestore(HRegionInfo info,
HLogKey logKey,
WALEdit logEdit)
|
Methods inherited from class org.apache.hadoop.hbase.coprocessor.CoprocessorHost |
---|
abortServer, findCoprocessor, findCoprocessorEnvironment, getCoprocessors, getLoadedCoprocessors, handleCoprocessorThrowable, load, load, loadInstance, loadSystemCoprocessors, shutdown |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public RegionCoprocessorHost(HRegion region, RegionServerServices rsServices, org.apache.hadoop.conf.Configuration conf)
region
- the regionrsServices
- interface to available region server functionalityconf
- the configurationMethod Detail |
---|
public org.apache.hadoop.hbase.regionserver.RegionCoprocessorHost.RegionEnvironment createEnvironment(Class<?> implClass, Coprocessor instance, int priority, int seq, org.apache.hadoop.conf.Configuration conf)
CoprocessorHost
createEnvironment
in class CoprocessorHost<org.apache.hadoop.hbase.regionserver.RegionCoprocessorHost.RegionEnvironment>
protected void abortServer(CoprocessorEnvironment env, Throwable e)
abortServer
in class CoprocessorHost<org.apache.hadoop.hbase.regionserver.RegionCoprocessorHost.RegionEnvironment>
public void preOpen() throws IOException
IOException
- Signals that an I/O exception has occurred.public void postOpen()
public void preClose(boolean abortRequested) throws IOException
abortRequested
- true if the server is aborting
IOException
public void postClose(boolean abortRequested)
abortRequested
- true if the server is abortingpublic InternalScanner preCompactScannerOpen(Store store, List<StoreFileScanner> scanners, ScanType scanType, long earliestPutTs, CompactionRequest request) throws IOException
RegionObserver.preCompactScannerOpen(ObserverContext, Store, List, ScanType, long, InternalScanner, CompactionRequest)
IOException
public boolean preCompactSelection(Store store, List<StoreFile> candidates, CompactionRequest request) throws IOException
StoreFile
s for compaction from the list of currently
available candidates.
store
- The store where compaction is being requestedcandidates
- The currently available store filesrequest
- custom compaction request
true
, skip the normal selection process and use the current list
IOException
public void postCompactSelection(Store store, com.google.common.collect.ImmutableList<StoreFile> selected, CompactionRequest request)
StoreFile
s to be compacted have been selected from the available
candidates.
store
- The store where compaction is being requestedselected
- The store files selected to compactrequest
- custom compactionpublic InternalScanner preCompact(Store store, InternalScanner scanner, ScanType scanType, CompactionRequest request) throws IOException
store
- the store being compactedscanner
- the scanner used to read store data during compactionscanType
- type of Scanrequest
- the compaction that will be executed
IOException
public void postCompact(Store store, StoreFile resultFile, CompactionRequest request) throws IOException
store
- the store being compactedresultFile
- the new store file written during compactionrequest
- the compaction that is being executed
IOException
public InternalScanner preFlush(Store store, InternalScanner scanner) throws IOException
IOException
public void preFlush() throws IOException
IOException
public InternalScanner preFlushScannerOpen(Store store, KeyValueScanner memstoreScanner) throws IOException
RegionObserver.preFlushScannerOpen(ObserverContext,
Store, KeyValueScanner, InternalScanner)
IOException
public void postFlush() throws IOException
IOException
public void postFlush(Store store, StoreFile storeFile) throws IOException
IOException
public void preSplit() throws IOException
IOException
public void preSplit(byte[] splitRow) throws IOException
IOException
public void postSplit(HRegion l, HRegion r) throws IOException
l
- the new left-hand daughter regionr
- the new right-hand daughter region
IOException
public void preRollBackSplit() throws IOException
IOException
public void postRollBackSplit() throws IOException
IOException
public void postCompleteSplit() throws IOException
IOException
public boolean preGetClosestRowBefore(byte[] row, byte[] family, Result result) throws IOException
row
- the row keyfamily
- the familyresult
- the result set from the region
IOException
- Exceptionpublic void postGetClosestRowBefore(byte[] row, byte[] family, Result result) throws IOException
row
- the row keyfamily
- the familyresult
- the result set from the region
IOException
- Exceptionpublic boolean preGet(Get get, List<KeyValue> results) throws IOException
get
- the Get request
IOException
- Exceptionpublic void postGet(Get get, List<KeyValue> results) throws IOException
get
- the Get requestresults
- the result set
IOException
- Exceptionpublic Boolean preExists(Get get) throws IOException
get
- the Get request
IOException
- Exceptionpublic boolean postExists(Get get, boolean exists) throws IOException
get
- the Get requestexists
- the result returned by the region server
IOException
- Exceptionpublic boolean prePut(Put put, WALEdit edit, boolean writeToWAL) throws IOException
put
- The Put objectedit
- The WALEdit object.writeToWAL
- true if the change should be written to the WAL
IOException
- Exceptionpublic void postPut(Put put, WALEdit edit, boolean writeToWAL) throws IOException
put
- The Put objectedit
- The WALEdit object.writeToWAL
- true if the change should be written to the WAL
IOException
- Exceptionpublic boolean preDelete(Delete delete, WALEdit edit, boolean writeToWAL) throws IOException
delete
- The Delete objectedit
- The WALEdit object.writeToWAL
- true if the change should be written to the WAL
IOException
- Exceptionpublic void postDelete(Delete delete, WALEdit edit, boolean writeToWAL) throws IOException
delete
- The Delete objectedit
- The WALEdit object.writeToWAL
- true if the change should be written to the WAL
IOException
- Exceptionpublic boolean preBatchMutate(MiniBatchOperationInProgress<Pair<Mutation,Integer>> miniBatchOp) throws IOException
miniBatchOp
-
IOException
public void postBatchMutate(MiniBatchOperationInProgress<Pair<Mutation,Integer>> miniBatchOp) throws IOException
miniBatchOp
-
IOException
public Boolean preCheckAndPut(byte[] row, byte[] family, byte[] qualifier, CompareFilter.CompareOp compareOp, ByteArrayComparable comparator, Put put) throws IOException
row
- row to checkfamily
- column familyqualifier
- column qualifiercompareOp
- the comparison operationcomparator
- the comparatorput
- data to put if check succeeds
IOException
- epublic boolean postCheckAndPut(byte[] row, byte[] family, byte[] qualifier, CompareFilter.CompareOp compareOp, ByteArrayComparable comparator, Put put, boolean result) throws IOException
row
- row to checkfamily
- column familyqualifier
- column qualifiercompareOp
- the comparison operationcomparator
- the comparatorput
- data to put if check succeeds
IOException
- epublic Boolean preCheckAndDelete(byte[] row, byte[] family, byte[] qualifier, CompareFilter.CompareOp compareOp, ByteArrayComparable comparator, Delete delete) throws IOException
row
- row to checkfamily
- column familyqualifier
- column qualifiercompareOp
- the comparison operationcomparator
- the comparatordelete
- delete to commit if check succeeds
IOException
- epublic boolean postCheckAndDelete(byte[] row, byte[] family, byte[] qualifier, CompareFilter.CompareOp compareOp, ByteArrayComparable comparator, Delete delete, boolean result) throws IOException
row
- row to checkfamily
- column familyqualifier
- column qualifiercompareOp
- the comparison operationcomparator
- the comparatordelete
- delete to commit if check succeeds
IOException
- epublic Result preAppend(Append append) throws IOException
append
- append object
IOException
- if an error occurred on the coprocessorpublic Result preIncrement(Increment increment) throws IOException
increment
- increment object
IOException
- if an error occurred on the coprocessorpublic void postAppend(Append append, Result result) throws IOException
append
- Append objectresult
- the result returned by postAppend
IOException
- if an error occurred on the coprocessorpublic Result postIncrement(Increment increment, Result result) throws IOException
increment
- increment objectresult
- the result returned by postIncrement
IOException
- if an error occurred on the coprocessorpublic RegionScanner preScannerOpen(Scan scan) throws IOException
scan
- the Scan specification
IOException
- Exceptionpublic KeyValueScanner preStoreScannerOpen(Store store, Scan scan, NavigableSet<byte[]> targetCols) throws IOException
RegionObserver.preStoreScannerOpen(ObserverContext,
Store, Scan, NavigableSet, KeyValueScanner)
IOException
public RegionScanner postScannerOpen(Scan scan, RegionScanner s) throws IOException
scan
- the Scan specifications
- the scanner
IOException
- Exceptionpublic Boolean preScannerNext(InternalScanner s, List<Result> results, int limit) throws IOException
s
- the scannerresults
- the result set returned by the region serverlimit
- the maximum number of results to return
IOException
- Exceptionpublic boolean postScannerNext(InternalScanner s, List<Result> results, int limit, boolean hasMore) throws IOException
s
- the scannerresults
- the result set returned by the region serverlimit
- the maximum number of results to returnhasMore
-
IOException
- Exceptionpublic boolean postScannerFilterRow(InternalScanner s, byte[] currentRow) throws IOException
s
- the scannercurrentRow
- The current rowkey which got filtered out
IOException
public boolean preScannerClose(InternalScanner s) throws IOException
s
- the scanner
IOException
- Exceptionpublic void postScannerClose(InternalScanner s) throws IOException
s
- the scanner
IOException
- Exceptionpublic boolean preWALRestore(HRegionInfo info, HLogKey logKey, WALEdit logEdit) throws IOException
info
- logKey
- logEdit
-
IOException
public void postWALRestore(HRegionInfo info, HLogKey logKey, WALEdit logEdit) throws IOException
info
- logKey
- logEdit
-
IOException
public boolean preBulkLoadHFile(List<Pair<byte[],String>> familyPaths) throws IOException
familyPaths
- pairs of { CF, file path } submitted for bulk load
IOException
public boolean postBulkLoadHFile(List<Pair<byte[],String>> familyPaths, boolean hasLoaded) throws IOException
familyPaths
- pairs of { CF, file path } submitted for bulk loadhasLoaded
- whether load was successful or not
IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |