Package org.apache.hadoop.hbase.client
Class CompleteScanResultCache
java.lang.Object
org.apache.hadoop.hbase.client.CompleteScanResultCache
- All Implemented Interfaces:
ScanResultCache
A scan result cache that only returns complete result.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate intFields inherited from interface org.apache.hadoop.hbase.client.ScanResultCache
EMPTY_RESULT_ARRAY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionResult[]Add the given results to cache and get valid results back.voidclear()Clear the cached result if any.private Resultcombine()intReturn the number of complete rows.private Result[]prependCombined(Result[] results, int length) private Result[]updateNumberOfCompleteResultsAndReturn(Result... results)
-
Field Details
-
numberOfCompleteRows
-
partialResults
-
-
Constructor Details
-
CompleteScanResultCache
-
-
Method Details
-
combine
- Throws:
IOException
-
prependCombined
- Throws:
IOException
-
updateNumberOfCompleteResultsAndReturn
-
addAndGet
Description copied from interface:ScanResultCacheAdd the given results to cache and get valid results back.- Specified by:
addAndGetin 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:ScanResultCacheClear the cached result if any. Called when scan error and we will start from a start of a row again.- Specified by:
clearin interfaceScanResultCache
-
numberOfCompleteRows
Description copied from interface:ScanResultCacheReturn the number of complete rows. Used to implement limited scan.- Specified by:
numberOfCompleteRowsin interfaceScanResultCache
-