@InterfaceAudience.Private class AsyncScanSingleRegionRpcRetryingCaller extends Object
We will modify the Scan
object passed in directly. The upper layer should store the
reference of this object and use it to open new single region scanners.
Modifier and Type | Class and Description |
---|---|
private class |
AsyncScanSingleRegionRpcRetryingCaller.ScanControllerImpl |
private static class |
AsyncScanSingleRegionRpcRetryingCaller.ScanControllerState |
private class |
AsyncScanSingleRegionRpcRetryingCaller.ScanResumerImpl |
private static class |
AsyncScanSingleRegionRpcRetryingCaller.ScanResumerState |
Modifier and Type | Field and Description |
---|---|
private Runnable |
completeWhenNoMoreResultsInRegion |
private AdvancedScanResultConsumer |
consumer |
private HBaseRpcController |
controller |
private List<RetriesExhaustedException.ThrowableWithExtraContext> |
exceptions |
private CompletableFuture<Boolean> |
future |
private boolean |
includeNextStartRowWhenError |
private HRegionLocation |
loc |
private static org.slf4j.Logger |
LOG |
private int |
maxAttempts |
private long |
nextCallSeq |
private long |
nextCallStartNs |
private byte[] |
nextStartRowWhenError |
private long |
pauseNs |
private boolean |
regionServerRemote |
private ScanResultCache |
resultCache |
private org.apache.hbase.thirdparty.io.netty.util.Timer |
retryTimer |
private long |
rpcTimeoutNs |
private Scan |
scan |
private ScanMetrics |
scanMetrics |
private long |
scannerId |
private long |
scannerLeaseTimeoutPeriodNs |
private long |
scanTimeoutNs |
private int |
startLogErrorsCnt |
private org.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos.ClientService.Interface |
stub |
private int |
tries |
Constructor and Description |
---|
AsyncScanSingleRegionRpcRetryingCaller(org.apache.hbase.thirdparty.io.netty.util.Timer retryTimer,
AsyncConnectionImpl conn,
Scan scan,
ScanMetrics scanMetrics,
long scannerId,
ScanResultCache resultCache,
AdvancedScanResultConsumer consumer,
org.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos.ClientService.Interface stub,
HRegionLocation loc,
boolean isRegionServerRemote,
long scannerLeaseTimeoutPeriodNs,
long pauseNs,
int maxAttempts,
long scanTimeoutNs,
long rpcTimeoutNs,
int startLogErrorsCnt) |
Modifier and Type | Method and Description |
---|---|
private void |
call() |
private void |
closeScanner() |
private void |
completeExceptionally(boolean closeScanner) |
private void |
completeNoMoreResults() |
private void |
completeOrNext(org.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos.ScanResponse resp,
int numberOfCompleteRows) |
private void |
completeReversedWhenNoMoreResultsInRegion() |
private void |
completeWhenError(boolean closeScanner) |
private void |
completeWhenNoMoreResultsInRegion() |
private void |
completeWithNextStartRow(byte[] row,
boolean inclusive) |
private long |
elapsedMs() |
private void |
next() |
private void |
onComplete(HBaseRpcController controller,
org.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos.ScanResponse resp) |
private void |
onError(Throwable error) |
private long |
remainingTimeNs() |
private void |
renewLease() |
CompletableFuture<Boolean> |
start(HBaseRpcController controller,
org.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos.ScanResponse respWhenOpen)
Now we will also fetch some cells along with the scanner id when opening a scanner, so we also
need to process the ScanResponse for the open scanner request.
|
private void |
updateNextStartRowWhenError(Result result) |
private static final org.slf4j.Logger LOG
private final org.apache.hbase.thirdparty.io.netty.util.Timer retryTimer
private final ScanMetrics scanMetrics
private final long scannerId
private final ScanResultCache resultCache
private final AdvancedScanResultConsumer consumer
private final org.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos.ClientService.Interface stub
private final HRegionLocation loc
private final boolean regionServerRemote
private final long scannerLeaseTimeoutPeriodNs
private final long pauseNs
private final int maxAttempts
private final long scanTimeoutNs
private final long rpcTimeoutNs
private final int startLogErrorsCnt
private final Runnable completeWhenNoMoreResultsInRegion
private final CompletableFuture<Boolean> future
private final HBaseRpcController controller
private byte[] nextStartRowWhenError
private boolean includeNextStartRowWhenError
private long nextCallStartNs
private int tries
private final List<RetriesExhaustedException.ThrowableWithExtraContext> exceptions
private long nextCallSeq
public AsyncScanSingleRegionRpcRetryingCaller(org.apache.hbase.thirdparty.io.netty.util.Timer retryTimer, AsyncConnectionImpl conn, Scan scan, ScanMetrics scanMetrics, long scannerId, ScanResultCache resultCache, AdvancedScanResultConsumer consumer, org.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos.ClientService.Interface stub, HRegionLocation loc, boolean isRegionServerRemote, long scannerLeaseTimeoutPeriodNs, long pauseNs, int maxAttempts, long scanTimeoutNs, long rpcTimeoutNs, int startLogErrorsCnt)
private long elapsedMs()
private long remainingTimeNs()
private void closeScanner()
private void completeExceptionally(boolean closeScanner)
private void completeNoMoreResults()
private void completeWithNextStartRow(byte[] row, boolean inclusive)
private void completeWhenError(boolean closeScanner)
private void updateNextStartRowWhenError(Result result)
private void completeWhenNoMoreResultsInRegion()
private void completeReversedWhenNoMoreResultsInRegion()
private void completeOrNext(org.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos.ScanResponse resp, int numberOfCompleteRows)
private void onComplete(HBaseRpcController controller, org.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos.ScanResponse resp)
private void call()
private void next()
private void renewLease()
public CompletableFuture<Boolean> start(HBaseRpcController controller, org.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos.ScanResponse respWhenOpen)
true
if we should continue, otherwise false
.Copyright © 2007–2019 The Apache Software Foundation. All rights reserved.