private static final class AsyncMetaTableAccessor.MetaTableScanResultConsumer extends Object implements AdvancedScanResultConsumer
AdvancedScanResultConsumer.ScanController, AdvancedScanResultConsumer.ScanResumer
Modifier and Type | Field and Description |
---|---|
private int |
currentRowCount |
private CompletableFuture<Void> |
future |
private int |
rowUpperLimit |
private MetaTableAccessor.Visitor |
visitor |
Constructor and Description |
---|
MetaTableScanResultConsumer(int rowUpperLimit,
MetaTableAccessor.Visitor visitor,
CompletableFuture<Void> future) |
Modifier and Type | Method and Description |
---|---|
void |
onComplete()
Indicate that the scan operation is completed normally.
|
void |
onError(Throwable error)
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.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
onHeartbeat
onScanMetricsCreated
private int currentRowCount
private final int rowUpperLimit
private final MetaTableAccessor.Visitor visitor
private final CompletableFuture<Void> future
MetaTableScanResultConsumer(int rowUpperLimit, MetaTableAccessor.Visitor visitor, CompletableFuture<Void> future)
public void onError(Throwable error)
ScanResultConsumerBase
We will not call ScanResultConsumerBase.onComplete()
after calling ScanResultConsumerBase.onError(Throwable)
.
onError
in interface ScanResultConsumerBase
public void onComplete()
ScanResultConsumerBase
onComplete
in interface ScanResultConsumerBase
public void onNext(Result[] results, AdvancedScanResultConsumer.ScanController controller)
AdvancedScanResultConsumer
onNext
in interface AdvancedScanResultConsumer
results
- the data fetched from HBase service.controller
- used to suspend or terminate the scan. Notice that the controller
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.Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.