Package org.apache.hadoop.hbase.client
Class BufferingScanResultConsumer
java.lang.Object
org.apache.hadoop.hbase.client.BufferingScanResultConsumer
- All Implemented Interfaces:
org.apache.hadoop.hbase.client.AdvancedScanResultConsumer
,org.apache.hadoop.hbase.client.ScanResultConsumerBase
class BufferingScanResultConsumer
extends Object
implements org.apache.hadoop.hbase.client.AdvancedScanResultConsumer
A scan result consumer which buffers all the data in memory and you can call the
take()
method below to get the result one by one. Should only be used by tests, do not write production
code like this as the buffer is unlimited and may cause OOM.-
Nested Class Summary
Nested classes/interfaces inherited from interface org.apache.hadoop.hbase.client.AdvancedScanResultConsumer
org.apache.hadoop.hbase.client.AdvancedScanResultConsumer.ScanController, org.apache.hadoop.hbase.client.AdvancedScanResultConsumer.ScanResumer
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionorg.apache.hadoop.hbase.client.metrics.ScanMetrics
void
void
void
onNext
(org.apache.hadoop.hbase.client.Result[] results, org.apache.hadoop.hbase.client.AdvancedScanResultConsumer.ScanController controller) void
onScanMetricsCreated
(org.apache.hadoop.hbase.client.metrics.ScanMetrics scanMetrics) org.apache.hadoop.hbase.client.Result
take()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.apache.hadoop.hbase.client.AdvancedScanResultConsumer
onHeartbeat
-
Field Details
-
scanMetrics
-
queue
-
finished
-
error
-
-
Constructor Details
-
BufferingScanResultConsumer
-
-
Method Details
-
onScanMetricsCreated
- Specified by:
onScanMetricsCreated
in interfaceorg.apache.hadoop.hbase.client.ScanResultConsumerBase
-
onNext
public void onNext(org.apache.hadoop.hbase.client.Result[] results, org.apache.hadoop.hbase.client.AdvancedScanResultConsumer.ScanController controller) - Specified by:
onNext
in interfaceorg.apache.hadoop.hbase.client.AdvancedScanResultConsumer
-
onError
- Specified by:
onError
in interfaceorg.apache.hadoop.hbase.client.ScanResultConsumerBase
-
onComplete
- Specified by:
onComplete
in interfaceorg.apache.hadoop.hbase.client.ScanResultConsumerBase
-
take
- Throws:
IOException
InterruptedException
-
getScanMetrics
-