Package org.apache.hadoop.hbase.client
Class AsyncScanSingleRegionRpcRetryingCaller
java.lang.Object
org.apache.hadoop.hbase.client.AsyncScanSingleRegionRpcRetryingCaller
Retry caller for scanning a region.
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.
-
Nested Class Summary
Modifier and TypeClassDescriptionprivate final class
private static enum
(package private) final class
private static enum
-
Field Summary
Modifier and TypeFieldDescriptionprivate final Runnable
protected final AsyncConnectionImpl
private final AdvancedScanResultConsumer
private final HBaseRpcController
private final List<RetriesExhaustedException.ThrowableWithExtraContext>
private final CompletableFuture<Boolean>
private boolean
private final HRegionLocation
private static final org.slf4j.Logger
private final int
private long
private long
private byte[]
private final HBaseServerExceptionPauseManager
private final int
private final boolean
private final ScanResultCache
private final org.apache.hbase.thirdparty.io.netty.util.Timer
private final long
private final Scan
private final ScanMetrics
private final long
private final long
private final long
private final int
private final org.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos.ClientService.Interface
private int
-
Constructor Summary
ConstructorDescriptionAsyncScanSingleRegionRpcRetryingCaller
(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, int priority, long scannerLeaseTimeoutPeriodNs, long pauseNs, long pauseNsForServerOverloaded, int maxAttempts, long scanTimeoutNs, long rpcTimeoutNs, int startLogErrorsCnt, Map<String, byte[]> requestAttributes) -
Method Summary
Modifier and TypeMethodDescriptionprivate void
call()
private void
private void
completeExceptionally
(boolean closeScanner) private void
private void
completeOrNext
(org.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos.ScanResponse resp, int numberOfCompleteRows) private void
private void
completeWhenError
(boolean closeScanner) private void
private void
completeWithNextStartRow
(byte[] row, boolean inclusive) private long
private void
next()
private void
onComplete
(HBaseRpcController controller, org.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos.ScanResponse resp) private void
private void
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
stopScan
(org.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos.ScanResponse resp) private void
updateNextStartRowWhenError
(Result result)
-
Field Details
-
LOG
-
retryTimer
-
scan
-
scanMetrics
-
scannerId
-
resultCache
-
consumer
-
stub
private final org.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos.ClientService.Interface stub -
loc
-
regionServerRemote
-
priority
-
scannerLeaseTimeoutPeriodNs
-
maxAttempts
-
scanTimeoutNs
-
rpcTimeoutNs
-
startLogErrorsCnt
-
completeWhenNoMoreResultsInRegion
-
conn
-
future
-
controller
-
nextStartRowWhenError
-
includeNextStartRowWhenError
-
nextCallStartNs
-
tries
-
exceptions
-
nextCallSeq
-
pauseManager
-
-
Constructor Details
-
AsyncScanSingleRegionRpcRetryingCaller
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, int priority, long scannerLeaseTimeoutPeriodNs, long pauseNs, long pauseNsForServerOverloaded, int maxAttempts, long scanTimeoutNs, long rpcTimeoutNs, int startLogErrorsCnt, Map<String, byte[]> requestAttributes)
-
-
Method Details
-
elapsedMs
-
closeScanner
-
completeExceptionally
-
completeNoMoreResults
-
completeWithNextStartRow
-
completeWhenError
-
onError
-
updateNextStartRowWhenError
-
completeWhenNoMoreResultsInRegion
-
completeReversedWhenNoMoreResultsInRegion
-
completeOrNext
private void completeOrNext(org.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos.ScanResponse resp, int numberOfCompleteRows) -
onComplete
private void onComplete(HBaseRpcController controller, org.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos.ScanResponse resp) -
stopScan
private void stopScan(org.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos.ScanResponse resp) -
call
-
next
-
renewLease
-
start
public 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. The HBaseRpcController for the open scanner request is also needed because we may have some data in the CellScanner which is contained in the controller.- Returns:
true
if we should continue, otherwisefalse
.
-