@InterfaceAudience.LimitedPrivate(value="Coprocesssor") @InterfaceStability.Evolving public interface RegionScanner extends InternalScanner
Modifier and Type | Method and Description |
---|---|
int |
getBatch() |
long |
getMaxResultSize() |
long |
getMvccReadPoint() |
HRegionInfo |
getRegionInfo() |
boolean |
isFilterDone() |
boolean |
nextRaw(List<Cell> result)
Grab the next row's worth of values.
|
boolean |
nextRaw(List<Cell> result,
ScannerContext scannerContext)
Grab the next row's worth of values.
|
boolean |
reseek(byte[] row)
Do a reseek to the required row.
|
close, next, next
HRegionInfo getRegionInfo()
boolean isFilterDone() throws IOException
IOException
- in case of I/O failure on a filter.boolean reseek(byte[] row) throws IOException
IOException
IllegalArgumentException
- if row is nulllong getMaxResultSize()
Scan.setMaxResultSize(long)
long getMvccReadPoint()
MultiVersionConsistencyControl
int getBatch()
Scan.setBatch(int)
boolean nextRaw(List<Cell> result) throws IOException
nextRaw(List, ScannerContext)
result
- return output arrayIOException
- eboolean nextRaw(List<Cell> result, ScannerContext scannerContext) throws IOException
ScannerContext
is used to enforce and track
any limits associated with this call. Any progress that exists in the ScannerContext
prior to calling this method will be LOST if ScannerContext.getKeepProgress()
is false.
Upon returning from this method, the ScannerContext
will contain information about the
progress made towards the limits. This is a special internal method to be called from
coprocessor hooks to avoid expensive setup. Caller must set the thread's readpoint, start and
close a region operation, an synchronize on the scanner object. Example:
HRegion region = ...;
RegionScanner scanner = ...
MultiVersionConsistencyControl.setThreadReadPoint(scanner.getMvccReadPoint());
region.startRegionOperation();
try {
synchronized(scanner) {
...
boolean moreRows = scanner.nextRaw(values);
...
}
} finally {
region.closeRegionOperation();
}
result
- return output arrayscannerContext
- The ScannerContext
instance encapsulating all limits that should
be tracked during calls to this method. The progress towards these limits can be
tracked within this instance.IOException
- eCopyright © 2007-2016 The Apache Software Foundation. All Rights Reserved.