Package org.apache.hadoop.hbase.client
Interface ScanResultCache
- All Known Implementing Classes:
AllowPartialScanResultCache
,BatchScanResultCache
,CompleteScanResultCache
Used to separate the row constructing logic.
After we add heartbeat support for scan, RS may return partial result even if allowPartial is false and batch is 0. With this interface, the implementation now looks like:
- Get results from ScanResponse proto.
- Pass them to ScanResultCache and get something back.
- If we actually get something back, then pass it to ScanConsumer.
-
Field Details
-
EMPTY_RESULT_ARRAY
-
-
Method Details
-
addAndGet
Add the given results to cache and get valid results back.- Parameters:
results
- the results of a scan next. Must not be null.isHeartbeatMessage
- indicate whether the results is gotten from a heartbeat response.- Returns:
- valid results, never null.
- Throws:
IOException
-
clear
void clear()Clear the cached result if any. Called when scan error and we will start from a start of a row again. -
numberOfCompleteRows
int numberOfCompleteRows()Return the number of complete rows. Used to implement limited scan.
-