@InterfaceAudience.Private public abstract class AsyncRpcRetryingCaller<T> extends Object
Modifier and Type | Field and Description |
---|---|
protected AsyncConnectionImpl |
conn |
protected HBaseRpcController |
controller |
private List<RetriesExhaustedException.ThrowableWithExtraContext> |
exceptions |
protected CompletableFuture<T> |
future |
private static org.slf4j.Logger |
LOG |
private int |
maxAttempts |
protected long |
operationTimeoutNs |
private long |
pauseForCQTBENs |
private long |
pauseNs |
private int |
priority |
private org.apache.hbase.thirdparty.io.netty.util.Timer |
retryTimer |
private long |
rpcTimeoutNs |
private int |
startLogErrorsCnt |
private long |
startNs |
private int |
tries |
Constructor and Description |
---|
AsyncRpcRetryingCaller(org.apache.hbase.thirdparty.io.netty.util.Timer retryTimer,
AsyncConnectionImpl conn,
int priority,
long pauseNs,
long pauseForCQTBENs,
int maxAttempts,
long operationTimeoutNs,
long rpcTimeoutNs,
int startLogErrorsCnt) |
Modifier and Type | Method and Description |
---|---|
(package private) CompletableFuture<T> |
call() |
protected void |
completeExceptionally() |
protected abstract void |
doCall() |
private long |
elapsedMs() |
protected Optional<TableName> |
getTableName() |
protected void |
onError(Throwable t,
Supplier<String> errMsg,
Consumer<Throwable> updateCachedLocation) |
protected long |
remainingTimeNs() |
protected void |
resetCallTimeout() |
private void |
tryScheduleRetry(Throwable error) |
private static final org.slf4j.Logger LOG
private final org.apache.hbase.thirdparty.io.netty.util.Timer retryTimer
private final int priority
private final long startNs
private final long pauseNs
private final long pauseForCQTBENs
private int tries
private final int maxAttempts
private final int startLogErrorsCnt
private final List<RetriesExhaustedException.ThrowableWithExtraContext> exceptions
private final long rpcTimeoutNs
protected final long operationTimeoutNs
protected final AsyncConnectionImpl conn
protected final CompletableFuture<T> future
protected final HBaseRpcController controller
public AsyncRpcRetryingCaller(org.apache.hbase.thirdparty.io.netty.util.Timer retryTimer, AsyncConnectionImpl conn, int priority, long pauseNs, long pauseForCQTBENs, int maxAttempts, long operationTimeoutNs, long rpcTimeoutNs, int startLogErrorsCnt)
private long elapsedMs()
protected final long remainingTimeNs()
protected final void completeExceptionally()
protected final void resetCallTimeout()
private void tryScheduleRetry(Throwable error)
protected Optional<TableName> getTableName()
protected final void onError(Throwable t, Supplier<String> errMsg, Consumer<Throwable> updateCachedLocation)
protected abstract void doCall()
CompletableFuture<T> call()
Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.