@InterfaceAudience.Private abstract class AsyncAdminBuilderBase extends Object implements AsyncAdminBuilder
Modifier and Type | Field and Description |
---|---|
protected int |
maxAttempts |
protected long |
operationTimeoutNs |
protected long |
pauseForCQTBENs |
protected long |
pauseNs |
protected long |
rpcTimeoutNs |
protected int |
startLogErrorsCnt |
Constructor and Description |
---|
AsyncAdminBuilderBase(AsyncConnectionConfiguration connConf) |
Modifier and Type | Method and Description |
---|---|
AsyncAdminBuilder |
setMaxAttempts(int maxAttempts)
Set the max attempt times for an admin operation.
|
AsyncAdminBuilder |
setOperationTimeout(long timeout,
TimeUnit unit)
Set timeout for a whole admin operation.
|
AsyncAdminBuilder |
setRetryPause(long timeout,
TimeUnit unit)
Set the base pause time for retrying.
|
AsyncAdminBuilder |
setRetryPauseForCQTBE(long timeout,
TimeUnit unit)
Set the base pause time for retrying when we hit
CallQueueTooBigException . |
AsyncAdminBuilder |
setRpcTimeout(long timeout,
TimeUnit unit)
Set timeout for each rpc request.
|
AsyncAdminBuilder |
setStartLogErrorsCnt(int startLogErrorsCnt)
Set the number of retries that are allowed before we start to log.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
build, setMaxRetries
protected long rpcTimeoutNs
protected long operationTimeoutNs
protected long pauseNs
protected long pauseForCQTBENs
protected int maxAttempts
protected int startLogErrorsCnt
AsyncAdminBuilderBase(AsyncConnectionConfiguration connConf)
public AsyncAdminBuilder setOperationTimeout(long timeout, TimeUnit unit)
AsyncAdminBuilder
setOperationTimeout
in interface AsyncAdminBuilder
public AsyncAdminBuilder setRpcTimeout(long timeout, TimeUnit unit)
AsyncAdminBuilder
setRpcTimeout
in interface AsyncAdminBuilder
public AsyncAdminBuilder setRetryPause(long timeout, TimeUnit unit)
AsyncAdminBuilder
setRetryPause
in interface AsyncAdminBuilder
AsyncAdminBuilder.setRetryPauseForCQTBE(long, TimeUnit)
public AsyncAdminBuilder setRetryPauseForCQTBE(long timeout, TimeUnit unit)
AsyncAdminBuilder
CallQueueTooBigException
. We use an
exponential policy to generate sleep time when retrying.
This value should be greater than the normal pause value which could be set with the above
AsyncAdminBuilder.setRetryPause(long, TimeUnit)
method, as usually CallQueueTooBigException
means the server is overloaded. We just use the normal pause value for
CallQueueTooBigException
if here you specify a smaller value.setRetryPauseForCQTBE
in interface AsyncAdminBuilder
AsyncAdminBuilder.setRetryPause(long, TimeUnit)
public AsyncAdminBuilder setMaxAttempts(int maxAttempts)
AsyncAdminBuilder
setMaxAttempts
in interface AsyncAdminBuilder
public AsyncAdminBuilder setStartLogErrorsCnt(int startLogErrorsCnt)
AsyncAdminBuilder
setStartLogErrorsCnt
in interface AsyncAdminBuilder
Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.