@InterfaceAudience.LimitedPrivate(value="Coprocesssor") @InterfaceStability.Evolving public interface RegionScanner extends InternalScanner
Modifier and Type | Method and Description |
---|---|
int |
getBatch() |
long |
getMaxResultSize() |
long |
getMvccReadPoint()
Returns The Scanner's MVCC readPt see
MultiVersionConcurrencyControl |
default String |
getOperationId() |
RegionInfo |
getRegionInfo()
Returns The RegionInfo for this scanner.
|
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
RegionInfo getRegionInfo()
boolean isFilterDone() throws IOException
IOException
- in case of I/O failure on a filter.boolean reseek(byte[] row) throws IOException
IOException
long getMaxResultSize()
Scan.setMaxResultSize(long)
long getMvccReadPoint()
MultiVersionConcurrencyControl
int getBatch()
Scan.setBatch(int)
default String getOperationId()
OperationWithAttributes.ID_ATRIBUTE
value, or null if
not set.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 = ...
MultiVersionConcurrencyControl.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–2020 The Apache Software Foundation. All rights reserved.