@InterfaceAudience.Private public class BatchScanResultCache extends ScanResultCache
scan.getBatch() > 0 && !scan.getAllowPartialResults().
If user setBatch(5) and rpc returns 3+5+5+5+3 cells, we should return 5+5+5+5+1 to user. setBatch doesn't mean setAllowPartialResult(true).
| Constructor and Description |
|---|
BatchScanResultCache(List<Result> cache,
int batch) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
checkUpdateNumberOfCompleteRowsAndCache(Result rs)
Check and update number of complete rows and add result to cache
|
void |
clear()
Clear the cached result if any.
|
void |
loadResultsToCache(Result[] results,
boolean isHeartbeatMessage)
Process the results from the server and load it to cache.
|
public void loadResultsToCache(Result[] results, boolean isHeartbeatMessage) throws IOException
ScanResultCacheresults - the results of a scan next. Must not be null.isHeartbeatMessage - indicate whether the results is gotten from a heartbeat response.IOExceptionprotected void checkUpdateNumberOfCompleteRowsAndCache(Result rs)
ScanResultCachers - Result to cache from Results array or constructed from partial resultspublic void clear()
ScanResultCacheCopyright © 2007–2019 The Apache Software Foundation. All rights reserved.