Package org.apache.hadoop.hbase
Class AsyncMetaTableAccessor.MetaTableScanResultConsumer
java.lang.Object
org.apache.hadoop.hbase.AsyncMetaTableAccessor.MetaTableScanResultConsumer
- All Implemented Interfaces:
AdvancedScanResultConsumer
,ScanResultConsumerBase
- Enclosing class:
- AsyncMetaTableAccessor
private static final class AsyncMetaTableAccessor.MetaTableScanResultConsumer
extends Object
implements AdvancedScanResultConsumer
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.apache.hadoop.hbase.client.AdvancedScanResultConsumer
AdvancedScanResultConsumer.ScanController, AdvancedScanResultConsumer.ScanResumer
-
Field Summary
Modifier and TypeFieldDescriptionprivate int
private final CompletableFuture<Void>
private final int
private final MetaTableAccessor.Visitor
-
Constructor Summary
ConstructorDescriptionMetaTableScanResultConsumer
(int rowUpperLimit, MetaTableAccessor.Visitor visitor, CompletableFuture<Void> future) -
Method Summary
Modifier and TypeMethodDescriptionvoid
Indicate that the scan operation is completed normally.void
Indicate that we hit an unrecoverable error and the scan operation is terminated.void
onNext
(Result[] results, AdvancedScanResultConsumer.ScanController controller) Indicate that we have receive some data.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
Methods inherited from interface org.apache.hadoop.hbase.client.ScanResultConsumerBase
onScanMetricsCreated
-
Field Details
-
currentRowCount
-
rowUpperLimit
-
visitor
-
future
-
-
Constructor Details
-
MetaTableScanResultConsumer
MetaTableScanResultConsumer(int rowUpperLimit, MetaTableAccessor.Visitor visitor, CompletableFuture<Void> future)
-
-
Method Details
-
onError
Description copied from interface:ScanResultConsumerBase
Indicate that we hit an unrecoverable error and the scan operation is terminated.We will not call
ScanResultConsumerBase.onComplete()
after callingScanResultConsumerBase.onError(Throwable)
.- Specified by:
onError
in interfaceScanResultConsumerBase
-
onComplete
Description copied from interface:ScanResultConsumerBase
Indicate that the scan operation is completed normally.- Specified by:
onComplete
in interfaceScanResultConsumerBase
-
onNext
Description copied from interface:AdvancedScanResultConsumer
Indicate that we have receive some data.- Specified by:
onNext
in interfaceAdvancedScanResultConsumer
- Parameters:
results
- the data fetched from HBase service.controller
- used to suspend or terminate the scan. Notice that thecontroller
instance is only valid within scope of onNext method. You can only call its method in onNext, do NOT store it and call it later outside onNext.
-