@InterfaceAudience.Private class AllowPartialScanResultCache extends Object implements ScanResultCache
As we can only scan from the starting of a row when error, so here we also implement the logic that skips the cells that have already been returned.
Modifier and Type | Field and Description |
---|---|
private Cell |
lastCell |
private boolean |
lastResultPartial |
private int |
numberOfCompleteRows |
EMPTY_RESULT_ARRAY
Constructor and Description |
---|
AllowPartialScanResultCache() |
Modifier and Type | Method and Description |
---|---|
Result[] |
addAndGet(Result[] results,
boolean isHeartbeatMessage)
Add the given results to cache and get valid results back.
|
void |
clear()
Clear the cached result if any.
|
int |
numberOfCompleteRows()
Return the number of complete rows.
|
private void |
recordLastResult(Result result) |
private boolean lastResultPartial
private int numberOfCompleteRows
AllowPartialScanResultCache()
private void recordLastResult(Result result)
public Result[] addAndGet(Result[] results, boolean isHeartbeatMessage) throws IOException
ScanResultCache
addAndGet
in interface ScanResultCache
results
- the results of a scan next. Must not be null.isHeartbeatMessage
- indicate whether the results is gotten from a heartbeat response.IOException
public void clear()
ScanResultCache
clear
in interface ScanResultCache
public int numberOfCompleteRows()
ScanResultCache
numberOfCompleteRows
in interface ScanResultCache
Copyright © 2007–2019 The Apache Software Foundation. All rights reserved.