Package org.apache.hadoop.hbase.client
Interface AsyncAdminBuilder
- All Known Implementing Classes:
AsyncAdminBuilderBase
For creating
AsyncAdmin
. The implementation should have default configurations set before
returning the builder to user. So users are free to only set the configs they care about to
create a new AsyncAdmin instance.- Since:
- 2.0.0
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Create aAsyncAdmin
instance.setMaxAttempts
(int maxAttempts) Set the max attempt times for an admin operation.default AsyncAdminBuilder
setMaxRetries
(int maxRetries) Set the max retry times for an admin operation.setOperationTimeout
(long timeout, TimeUnit unit) Set timeout for a whole admin operation.setRetryPause
(long timeout, TimeUnit unit) Set the base pause time for retrying.default AsyncAdminBuilder
setRetryPauseForCQTBE
(long pause, TimeUnit unit) Deprecated.Since 2.5.0, will be removed in 4.0.0.setRetryPauseForServerOverloaded
(long pause, TimeUnit unit) Set the base pause time for retrying whenHBaseServerException.isServerOverloaded()
.setRpcTimeout
(long timeout, TimeUnit unit) Set timeout for each rpc request.setStartLogErrorsCnt
(int startLogErrorsCnt) Set the number of retries that are allowed before we start to log.
-
Method Details
-
setOperationTimeout
Set timeout for a whole admin operation. Operation timeout and max attempt times(or max retry times) are both limitations for retrying, we will stop retrying when we reach any of the limitations.- Returns:
- this for invocation chaining
-
setRpcTimeout
Set timeout for each rpc request.- Returns:
- this for invocation chaining
-
setRetryPause
Set the base pause time for retrying. We use an exponential policy to generate sleep time when retrying.- Returns:
- this for invocation chaining
- See Also:
-
setRetryPauseForCQTBE
Deprecated.Since 2.5.0, will be removed in 4.0.0. Please usesetRetryPauseForServerOverloaded(long, TimeUnit)
instead.Set the base pause time for retrying whenHBaseServerException.isServerOverloaded()
. We use an exponential policy to generate sleep time from this base when retrying. This value should be greater than the normal pause value which could be set with the abovesetRetryPause(long, TimeUnit)
method, as usuallyHBaseServerException.isServerOverloaded()
means the server is overloaded. We just use the normal pause value forHBaseServerException.isServerOverloaded()
if here you specify a smaller value.- See Also:
-
setRetryPauseForServerOverloaded
Set the base pause time for retrying whenHBaseServerException.isServerOverloaded()
. 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 abovesetRetryPause(long, TimeUnit)
method, as usuallyHBaseServerException.isServerOverloaded()
means the server is overloaded. We just use the normal pause value forHBaseServerException.isServerOverloaded()
if here you specify a smaller value.- See Also:
-
setMaxRetries
Set the max retry times for an admin operation. Usually it is the max attempt times minus 1. Operation timeout and max attempt times(or max retry times) are both limitations for retrying, we will stop retrying when we reach any of the limitations.- Returns:
- this for invocation chaining
-
setMaxAttempts
Set the max attempt times for an admin operation. Usually it is the max retry times plus 1. Operation timeout and max attempt times(or max retry times) are both limitations for retrying, we will stop retrying when we reach any of the limitations.- Returns:
- this for invocation chaining
-
setStartLogErrorsCnt
Set the number of retries that are allowed before we start to log.- Returns:
- this for invocation chaining
-
build
Create aAsyncAdmin
instance.- Returns:
- a
AsyncAdmin
instance
-