Package org.apache.hadoop.hbase.client
Class AllowPartialScanResultCache
java.lang.Object
org.apache.hadoop.hbase.client.AllowPartialScanResultCache
- All Implemented Interfaces:
ScanResultCache
A ScanResultCache that may return partial result.
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.
-
Field Summary
Fields inherited from interface org.apache.hadoop.hbase.client.ScanResultCache
EMPTY_RESULT_ARRAY
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionResult[]
Add the given results to cache and get valid results back.void
clear()
Clear the cached result if any.int
Return the number of complete rows.private void
recordLastResult
(Result result)
-
Field Details
-
lastCell
-
lastResultPartial
-
numberOfCompleteRows
-
-
Constructor Details
-
AllowPartialScanResultCache
-
-
Method Details
-
recordLastResult
-
addAndGet
Description copied from interface:ScanResultCache
Add the given results to cache and get valid results back.- Specified by:
addAndGet
in interfaceScanResultCache
- 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
Description copied from interface:ScanResultCache
Clear the cached result if any. Called when scan error and we will start from a start of a row again.- Specified by:
clear
in interfaceScanResultCache
-
numberOfCompleteRows
Description copied from interface:ScanResultCache
Return the number of complete rows. Used to implement limited scan.- Specified by:
numberOfCompleteRows
in interfaceScanResultCache
-