@InterfaceAudience.Public
public interface ScanResultConsumer
Result for an asynchronous scan.| 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.
|
boolean |
onNext(Result result) |
default void |
onScanMetricsCreated(ScanMetrics scanMetrics)
If
scan.isScanMetricsEnabled() returns true, then this method will be called prior to
all other methods in this interface to give you the ScanMetrics instance for this scan
operation. |
boolean onNext(Result result)
result - the data fetched from HBase service.false if you want to terminate the scan process. Otherwise truevoid onError(Throwable error)
We will not call onComplete() after calling onError(Throwable).
void onComplete()
default void onScanMetricsCreated(ScanMetrics scanMetrics)
scan.isScanMetricsEnabled() returns true, then this method will be called prior to
all other methods in this interface to give you the ScanMetrics instance for this scan
operation. The ScanMetrics instance will be updated on-the-fly during the scan, you can
store it somewhere to get the metrics at any time if you want.Copyright © 2007–2017 The Apache Software Foundation. All rights reserved.