org.apache.hadoop.hbase.regionserver
Class RegionCoprocessorHost

java.lang.Object
  extended by org.apache.hadoop.hbase.coprocessor.CoprocessorHost<org.apache.hadoop.hbase.regionserver.RegionCoprocessorHost.RegionEnvironment>
      extended by org.apache.hadoop.hbase.regionserver.RegionCoprocessorHost

@InterfaceAudience.LimitedPrivate(value="Coprocesssor")
@InterfaceStability.Evolving
public class RegionCoprocessorHost
extends CoprocessorHost<org.apache.hadoop.hbase.regionserver.RegionCoprocessorHost.RegionEnvironment>

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
ABORT_ON_ERROR_KEY, abortable, conf, coprocessors, COPROCESSORS_ENABLED_CONF_KEY, DEFAULT_ABORT_ON_ERROR, DEFAULT_COPROCESSORS_ENABLED, DEFAULT_USER_COPROCESSORS_ENABLED, loadSequence, MASTER_COPROCESSOR_CONF_KEY, pathPrefix, REGION_COPROCESSOR_CONF_KEY, REGIONSERVER_COPROCESSOR_CONF_KEY, USER_COPROCESSORS_ENABLED_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
 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
 Map<String,org.apache.commons.math.stat.descriptive.DescriptiveStatistics> getCoprocessorExecutionStatistics()
           
 void postAppend(Append append, Result result)
           
 void postBatchMutate(MiniBatchOperationInProgress<Mutation> miniBatchOp)
           
 void postBatchMutateIndispensably(MiniBatchOperationInProgress<Mutation> miniBatchOp, boolean success)
           
 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 postCloseRegionOperation(HRegion.Operation op)
           
 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 StoreFiles 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, Durability durability)
           
 void postEndpointInvocation(com.google.protobuf.Service service, String methodName, com.google.protobuf.Message request, com.google.protobuf.Message.Builder responseBuilder)
           
 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<Cell> results)
           
 void postGetClosestRowBefore(byte[] row, byte[] family, Result result)
           
 Result postIncrement(Increment increment, Result result)
           
 DeleteTracker postInstantiateDeleteTracker(DeleteTracker tracker)
           
 void postLogReplay()
          Invoked after log replay on region
 Cell postMutationBeforeWAL(RegionObserver.MutationType opType, Mutation mutation, Cell oldCell, Cell newCell)
           
 void postOpen()
          Invoked after a region open
 void postPut(Put put, WALEdit edit, Durability durability)
           
 void postRollBackSplit()
          Invoked just after the rollback of a failed split is done
 void postScannerClose(InternalScanner s)
           
 boolean postScannerFilterRow(InternalScanner s, byte[] currentRow, int offset, short length)
          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 postStartRegionOperation(HRegion.Operation op)
           
 StoreFile.Reader postStoreFileReaderOpen(org.apache.hadoop.fs.FileSystem fs, org.apache.hadoop.fs.Path p, FSDataInputStreamWrapper in, long size, CacheConfig cacheConf, Reference r, StoreFile.Reader reader)
           
 void postWALRestore(HRegionInfo info, HLogKey logKey, WALEdit logEdit)
           
 Result preAppend(Append append)
           
 Result preAppendAfterRowLock(Append append)
           
 boolean preBatchMutate(MiniBatchOperationInProgress<Mutation> miniBatchOp)
           
 boolean preBulkLoadHFile(List<Pair<byte[],String>> familyPaths)
           
 Boolean preCheckAndDelete(byte[] row, byte[] family, byte[] qualifier, CompareFilter.CompareOp compareOp, ByteArrayComparable comparator, Delete delete)
           
 Boolean preCheckAndDeleteAfterRowLock(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)
           
 Boolean preCheckAndPutAfterRowLock(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 StoreFiles for compaction from the list of currently available candidates.
 boolean preDelete(Delete delete, WALEdit edit, Durability durability)
           
 com.google.protobuf.Message preEndpointInvocation(com.google.protobuf.Service service, String methodName, com.google.protobuf.Message request)
           
 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<Cell> results)
           
 boolean preGetClosestRowBefore(byte[] row, byte[] family, Result result)
           
 Result preIncrement(Increment increment)
           
 Result preIncrementAfterRowLock(Increment increment)
           
 void preOpen()
          Invoked before a region open.
 boolean prePrepareTimeStampForDeleteVersion(Mutation mutation, Cell kv, byte[] byteNow, Get get)
           
 boolean prePut(Put put, WALEdit edit, Durability durability)
           
 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
 void preSplitAfterPONR()
           
 boolean preSplitBeforePONR(byte[] splitKey, List<Mutation> metaEntries)
           
 StoreFile.Reader preStoreFileReaderOpen(org.apache.hadoop.fs.FileSystem fs, org.apache.hadoop.fs.Path p, FSDataInputStreamWrapper in, long size, CacheConfig cacheConf, Reference r)
           
 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)
           
static void testTableCoprocessorAttrs(org.apache.hadoop.conf.Configuration conf, HTableDescriptor htd)
          Sanity check the table coprocessor attributes of the supplied schema.
 
Methods inherited from class org.apache.hadoop.hbase.coprocessor.CoprocessorHost
abortServer, abortServer, findCoprocessor, findCoprocessorEnvironment, findCoprocessors, 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

RegionCoprocessorHost

public RegionCoprocessorHost(HRegion region,
                             RegionServerServices rsServices,
                             org.apache.hadoop.conf.Configuration conf)
Constructor

Parameters:
region - the region
rsServices - interface to available region server functionality
conf - the configuration
Method Detail

testTableCoprocessorAttrs

public static void testTableCoprocessorAttrs(org.apache.hadoop.conf.Configuration conf,
                                             HTableDescriptor htd)
                                      throws IOException
Sanity check the table coprocessor attributes of the supplied schema. Will throw an exception if there is a problem.

Parameters:
conf -
htd -
Throws:
IOException

createEnvironment

public org.apache.hadoop.hbase.regionserver.RegionCoprocessorHost.RegionEnvironment createEnvironment(Class<?> implClass,
                                                                                                      Coprocessor instance,
                                                                                                      int priority,
                                                                                                      int seq,
                                                                                                      org.apache.hadoop.conf.Configuration conf)
Description copied from class: CoprocessorHost
Called when a new Coprocessor class is loaded

Specified by:
createEnvironment in class CoprocessorHost<org.apache.hadoop.hbase.regionserver.RegionCoprocessorHost.RegionEnvironment>

preOpen

public void preOpen()
             throws IOException
Invoked before a region open.

Throws:
IOException - Signals that an I/O exception has occurred.

postOpen

public void postOpen()
Invoked after a region open


postLogReplay

public void postLogReplay()
Invoked after log replay on region


preClose

public void preClose(boolean abortRequested)
              throws IOException
Invoked before a region is closed

Parameters:
abortRequested - true if the server is aborting
Throws:
IOException

postClose

public void postClose(boolean abortRequested)
Invoked after a region is closed

Parameters:
abortRequested - true if the server is aborting

preCompactScannerOpen

public InternalScanner preCompactScannerOpen(Store store,
                                             List<StoreFileScanner> scanners,
                                             ScanType scanType,
                                             long earliestPutTs,
                                             CompactionRequest request)
                                      throws IOException
See RegionObserver.preCompactScannerOpen(ObserverContext, Store, List, ScanType, long, InternalScanner, CompactionRequest)

Throws:
IOException

preCompactSelection

public boolean preCompactSelection(Store store,
                                   List<StoreFile> candidates,
                                   CompactionRequest request)
                            throws IOException
Called prior to selecting the StoreFiles for compaction from the list of currently available candidates.

Parameters:
store - The store where compaction is being requested
candidates - The currently available store files
request - custom compaction request
Returns:
If true, skip the normal selection process and use the current list
Throws:
IOException

postCompactSelection

public void postCompactSelection(Store store,
                                 com.google.common.collect.ImmutableList<StoreFile> selected,
                                 CompactionRequest request)
Called after the StoreFiles to be compacted have been selected from the available candidates.

Parameters:
store - The store where compaction is being requested
selected - The store files selected to compact
request - custom compaction

preCompact

public InternalScanner preCompact(Store store,
                                  InternalScanner scanner,
                                  ScanType scanType,
                                  CompactionRequest request)
                           throws IOException
Called prior to rewriting the store files selected for compaction

Parameters:
store - the store being compacted
scanner - the scanner used to read store data during compaction
scanType - type of Scan
request - the compaction that will be executed
Throws:
IOException

postCompact

public void postCompact(Store store,
                        StoreFile resultFile,
                        CompactionRequest request)
                 throws IOException
Called after the store compaction has completed.

Parameters:
store - the store being compacted
resultFile - the new store file written during compaction
request - the compaction that is being executed
Throws:
IOException

preFlush

public InternalScanner preFlush(Store store,
                                InternalScanner scanner)
                         throws IOException
Invoked before a memstore flush

Throws:
IOException

preFlush

public void preFlush()
              throws IOException
Invoked before a memstore flush

Throws:
IOException

preFlushScannerOpen

public InternalScanner preFlushScannerOpen(Store store,
                                           KeyValueScanner memstoreScanner)
                                    throws IOException
See RegionObserver.preFlushScannerOpen(ObserverContext, Store, KeyValueScanner, InternalScanner)

Throws:
IOException

postFlush

public void postFlush()
               throws IOException
Invoked after a memstore flush

Throws:
IOException

postFlush

public void postFlush(Store store,
                      StoreFile storeFile)
               throws IOException
Invoked after a memstore flush

Throws:
IOException

preSplit

public void preSplit()
              throws IOException
Invoked just before a split

Throws:
IOException

preSplit

public void preSplit(byte[] splitRow)
              throws IOException
Invoked just before a split

Throws:
IOException

postSplit

public void postSplit(HRegion l,
                      HRegion r)
               throws IOException
Invoked just after a split

Parameters:
l - the new left-hand daughter region
r - the new right-hand daughter region
Throws:
IOException

preSplitBeforePONR

public boolean preSplitBeforePONR(byte[] splitKey,
                                  List<Mutation> metaEntries)
                           throws IOException
Throws:
IOException

preSplitAfterPONR

public void preSplitAfterPONR()
                       throws IOException
Throws:
IOException

preRollBackSplit

public void preRollBackSplit()
                      throws IOException
Invoked just before the rollback of a failed split is started

Throws:
IOException

postRollBackSplit

public void postRollBackSplit()
                       throws IOException
Invoked just after the rollback of a failed split is done

Throws:
IOException

postCompleteSplit

public void postCompleteSplit()
                       throws IOException
Invoked after a split is completed irrespective of a failure or success.

Throws:
IOException

preGetClosestRowBefore

public boolean preGetClosestRowBefore(byte[] row,
                                      byte[] family,
                                      Result result)
                               throws IOException
Parameters:
row - the row key
family - the family
result - the result set from the region
Returns:
true if default processing should be bypassed
Throws:
IOException - Exception

postGetClosestRowBefore

public void postGetClosestRowBefore(byte[] row,
                                    byte[] family,
                                    Result result)
                             throws IOException
Parameters:
row - the row key
family - the family
result - the result set from the region
Throws:
IOException - Exception

preGet

public boolean preGet(Get get,
                      List<Cell> results)
               throws IOException
Parameters:
get - the Get request
Returns:
true if default processing should be bypassed
Throws:
IOException - Exception

postGet

public void postGet(Get get,
                    List<Cell> results)
             throws IOException
Parameters:
get - the Get request
results - the result sett
Throws:
IOException - Exception

preExists

public Boolean preExists(Get get)
                  throws IOException
Parameters:
get - the Get request
Returns:
true or false to return to client if bypassing normal operation, or null otherwise
Throws:
IOException - Exception

postExists

public boolean postExists(Get get,
                          boolean exists)
                   throws IOException
Parameters:
get - the Get request
exists - the result returned by the region server
Returns:
the result to return to the client
Throws:
IOException - Exception

prePut

public boolean prePut(Put put,
                      WALEdit edit,
                      Durability durability)
               throws IOException
Parameters:
put - The Put object
edit - The WALEdit object.
durability - The durability used
Returns:
true if default processing should be bypassed
Throws:
IOException - Exception

prePrepareTimeStampForDeleteVersion

public boolean prePrepareTimeStampForDeleteVersion(Mutation mutation,
                                                   Cell kv,
                                                   byte[] byteNow,
                                                   Get get)
                                            throws IOException
Parameters:
mutation - - the current mutation
kv - - the current cell
byteNow - - current timestamp in bytes
get - - the get that could be used Note that the get only does not specify the family and qualifier that should be used
Returns:
true if default processing should be bypassed
Throws:
IOException - Exception

postPut

public void postPut(Put put,
                    WALEdit edit,
                    Durability durability)
             throws IOException
Parameters:
put - The Put object
edit - The WALEdit object.
durability - The durability used
Throws:
IOException - Exception

preDelete

public boolean preDelete(Delete delete,
                         WALEdit edit,
                         Durability durability)
                  throws IOException
Parameters:
delete - The Delete object
edit - The WALEdit object.
durability - The durability used
Returns:
true if default processing should be bypassed
Throws:
IOException - Exception

postDelete

public void postDelete(Delete delete,
                       WALEdit edit,
                       Durability durability)
                throws IOException
Parameters:
delete - The Delete object
edit - The WALEdit object.
durability - The durability used
Throws:
IOException - Exception

preBatchMutate

public boolean preBatchMutate(MiniBatchOperationInProgress<Mutation> miniBatchOp)
                       throws IOException
Parameters:
miniBatchOp -
Returns:
true if default processing should be bypassed
Throws:
IOException

postBatchMutate

public void postBatchMutate(MiniBatchOperationInProgress<Mutation> miniBatchOp)
                     throws IOException
Parameters:
miniBatchOp -
Throws:
IOException

postBatchMutateIndispensably

public void postBatchMutateIndispensably(MiniBatchOperationInProgress<Mutation> miniBatchOp,
                                         boolean success)
                                  throws IOException
Throws:
IOException

preCheckAndPut

public Boolean preCheckAndPut(byte[] row,
                              byte[] family,
                              byte[] qualifier,
                              CompareFilter.CompareOp compareOp,
                              ByteArrayComparable comparator,
                              Put put)
                       throws IOException
Parameters:
row - row to check
family - column family
qualifier - column qualifier
compareOp - the comparison operation
comparator - the comparator
put - data to put if check succeeds
Returns:
true or false to return to client if default processing should be bypassed, or null otherwise
Throws:
IOException - e

preCheckAndPutAfterRowLock

public Boolean preCheckAndPutAfterRowLock(byte[] row,
                                          byte[] family,
                                          byte[] qualifier,
                                          CompareFilter.CompareOp compareOp,
                                          ByteArrayComparable comparator,
                                          Put put)
                                   throws IOException
Parameters:
row - row to check
family - column family
qualifier - column qualifier
compareOp - the comparison operation
comparator - the comparator
put - data to put if check succeeds
Returns:
true or false to return to client if default processing should be bypassed, or null otherwise
Throws:
IOException - e

postCheckAndPut

public boolean postCheckAndPut(byte[] row,
                               byte[] family,
                               byte[] qualifier,
                               CompareFilter.CompareOp compareOp,
                               ByteArrayComparable comparator,
                               Put put,
                               boolean result)
                        throws IOException
Parameters:
row - row to check
family - column family
qualifier - column qualifier
compareOp - the comparison operation
comparator - the comparator
put - data to put if check succeeds
Throws:
IOException - e

preCheckAndDelete

public Boolean preCheckAndDelete(byte[] row,
                                 byte[] family,
                                 byte[] qualifier,
                                 CompareFilter.CompareOp compareOp,
                                 ByteArrayComparable comparator,
                                 Delete delete)
                          throws IOException
Parameters:
row - row to check
family - column family
qualifier - column qualifier
compareOp - the comparison operation
comparator - the comparator
delete - delete to commit if check succeeds
Returns:
true or false to return to client if default processing should be bypassed, or null otherwise
Throws:
IOException - e

preCheckAndDeleteAfterRowLock

public Boolean preCheckAndDeleteAfterRowLock(byte[] row,
                                             byte[] family,
                                             byte[] qualifier,
                                             CompareFilter.CompareOp compareOp,
                                             ByteArrayComparable comparator,
                                             Delete delete)
                                      throws IOException
Parameters:
row - row to check
family - column family
qualifier - column qualifier
compareOp - the comparison operation
comparator - the comparator
delete - delete to commit if check succeeds
Returns:
true or false to return to client if default processing should be bypassed, or null otherwise
Throws:
IOException - e

postCheckAndDelete

public boolean postCheckAndDelete(byte[] row,
                                  byte[] family,
                                  byte[] qualifier,
                                  CompareFilter.CompareOp compareOp,
                                  ByteArrayComparable comparator,
                                  Delete delete,
                                  boolean result)
                           throws IOException
Parameters:
row - row to check
family - column family
qualifier - column qualifier
compareOp - the comparison operation
comparator - the comparator
delete - delete to commit if check succeeds
Throws:
IOException - e

preAppend

public Result preAppend(Append append)
                 throws IOException
Parameters:
append - append object
Returns:
result to return to client if default operation should be bypassed, null otherwise
Throws:
IOException - if an error occurred on the coprocessor

preAppendAfterRowLock

public Result preAppendAfterRowLock(Append append)
                             throws IOException
Parameters:
append - append object
Returns:
result to return to client if default operation should be bypassed, null otherwise
Throws:
IOException - if an error occurred on the coprocessor

preIncrement

public Result preIncrement(Increment increment)
                    throws IOException
Parameters:
increment - increment object
Returns:
result to return to client if default operation should be bypassed, null otherwise
Throws:
IOException - if an error occurred on the coprocessor

preIncrementAfterRowLock

public Result preIncrementAfterRowLock(Increment increment)
                                throws IOException
Parameters:
increment - increment object
Returns:
result to return to client if default operation should be bypassed, null otherwise
Throws:
IOException - if an error occurred on the coprocessor

postAppend

public void postAppend(Append append,
                       Result result)
                throws IOException
Parameters:
append - Append object
result - the result returned by the append
Throws:
IOException - if an error occurred on the coprocessor

postIncrement

public Result postIncrement(Increment increment,
                            Result result)
                     throws IOException
Parameters:
increment - increment object
result - the result returned by postIncrement
Throws:
IOException - if an error occurred on the coprocessor

preScannerOpen

public RegionScanner preScannerOpen(Scan scan)
                             throws IOException
Parameters:
scan - the Scan specification
Returns:
scanner id to return to client if default operation should be bypassed, false otherwise
Throws:
IOException - Exception

preStoreScannerOpen

public KeyValueScanner preStoreScannerOpen(Store store,
                                           Scan scan,
                                           NavigableSet<byte[]> targetCols)
                                    throws IOException
See RegionObserver.preStoreScannerOpen(ObserverContext, Store, Scan, NavigableSet, KeyValueScanner)

Throws:
IOException

postScannerOpen

public RegionScanner postScannerOpen(Scan scan,
                                     RegionScanner s)
                              throws IOException
Parameters:
scan - the Scan specification
s - the scanner
Returns:
the scanner instance to use
Throws:
IOException - Exception

preScannerNext

public Boolean preScannerNext(InternalScanner s,
                              List<Result> results,
                              int limit)
                       throws IOException
Parameters:
s - the scanner
results - the result set returned by the region server
limit - the maximum number of results to return
Returns:
'has next' indication to client if bypassing default behavior, or null otherwise
Throws:
IOException - Exception

postScannerNext

public boolean postScannerNext(InternalScanner s,
                               List<Result> results,
                               int limit,
                               boolean hasMore)
                        throws IOException
Parameters:
s - the scanner
results - the result set returned by the region server
limit - the maximum number of results to return
hasMore -
Returns:
'has more' indication to give to client
Throws:
IOException - Exception

postScannerFilterRow

public boolean postScannerFilterRow(InternalScanner s,
                                    byte[] currentRow,
                                    int offset,
                                    short length)
                             throws IOException
This will be called by the scan flow when the current scanned row is being filtered out by the filter.

Parameters:
s - the scanner
currentRow - The current rowkey which got filtered out
offset - offset to rowkey
length - length of rowkey
Returns:
whether more rows are available for the scanner or not
Throws:
IOException

preScannerClose

public boolean preScannerClose(InternalScanner s)
                        throws IOException
Parameters:
s - the scanner
Returns:
true if default behavior should be bypassed, false otherwise
Throws:
IOException - Exception

postScannerClose

public void postScannerClose(InternalScanner s)
                      throws IOException
Throws:
IOException - Exception

preWALRestore

public boolean preWALRestore(HRegionInfo info,
                             HLogKey logKey,
                             WALEdit logEdit)
                      throws IOException
Parameters:
info -
logKey -
logEdit -
Returns:
true if default behavior should be bypassed, false otherwise
Throws:
IOException

postWALRestore

public void postWALRestore(HRegionInfo info,
                           HLogKey logKey,
                           WALEdit logEdit)
                    throws IOException
Parameters:
info -
logKey -
logEdit -
Throws:
IOException

preBulkLoadHFile

public boolean preBulkLoadHFile(List<Pair<byte[],String>> familyPaths)
                         throws IOException
Parameters:
familyPaths - pairs of { CF, file path } submitted for bulk load
Returns:
true if the default operation should be bypassed
Throws:
IOException

postBulkLoadHFile

public boolean postBulkLoadHFile(List<Pair<byte[],String>> familyPaths,
                                 boolean hasLoaded)
                          throws IOException
Parameters:
familyPaths - pairs of { CF, file path } submitted for bulk load
hasLoaded - whether load was successful or not
Returns:
the possibly modified value of hasLoaded
Throws:
IOException

postStartRegionOperation

public void postStartRegionOperation(HRegion.Operation op)
                              throws IOException
Throws:
IOException

postCloseRegionOperation

public void postCloseRegionOperation(HRegion.Operation op)
                              throws IOException
Throws:
IOException

preStoreFileReaderOpen

public StoreFile.Reader preStoreFileReaderOpen(org.apache.hadoop.fs.FileSystem fs,
                                               org.apache.hadoop.fs.Path p,
                                               FSDataInputStreamWrapper in,
                                               long size,
                                               CacheConfig cacheConf,
                                               Reference r)
                                        throws IOException
Parameters:
fs - fileystem to read from
p - path to the file
in - FSDataInputStreamWrapper
size - Full size of the file
cacheConf -
r - original reference file. This will be not null only when reading a split file.
Returns:
a Reader instance to use instead of the base reader if overriding default behavior, null otherwise
Throws:
IOException

postStoreFileReaderOpen

public StoreFile.Reader postStoreFileReaderOpen(org.apache.hadoop.fs.FileSystem fs,
                                                org.apache.hadoop.fs.Path p,
                                                FSDataInputStreamWrapper in,
                                                long size,
                                                CacheConfig cacheConf,
                                                Reference r,
                                                StoreFile.Reader reader)
                                         throws IOException
Parameters:
fs - fileystem to read from
p - path to the file
in - FSDataInputStreamWrapper
size - Full size of the file
cacheConf -
r - original reference file. This will be not null only when reading a split file.
reader - the base reader instance
Returns:
The reader to use
Throws:
IOException

postMutationBeforeWAL

public Cell postMutationBeforeWAL(RegionObserver.MutationType opType,
                                  Mutation mutation,
                                  Cell oldCell,
                                  Cell newCell)
                           throws IOException
Throws:
IOException

preEndpointInvocation

public com.google.protobuf.Message preEndpointInvocation(com.google.protobuf.Service service,
                                                         String methodName,
                                                         com.google.protobuf.Message request)
                                                  throws IOException
Throws:
IOException

postEndpointInvocation

public void postEndpointInvocation(com.google.protobuf.Service service,
                                   String methodName,
                                   com.google.protobuf.Message request,
                                   com.google.protobuf.Message.Builder responseBuilder)
                            throws IOException
Throws:
IOException

postInstantiateDeleteTracker

public DeleteTracker postInstantiateDeleteTracker(DeleteTracker tracker)
                                           throws IOException
Throws:
IOException

getCoprocessorExecutionStatistics

public Map<String,org.apache.commons.math.stat.descriptive.DescriptiveStatistics> getCoprocessorExecutionStatistics()


Copyright © 2007–2016 The Apache Software Foundation. All rights reserved.