@InterfaceAudience.Public public interface AsyncTableBuilder<C extends ScanResultConsumerBase>
AsyncTable
.
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 AsyncTable/RawAsyncTable instance.
Modifier and Type | Method and Description |
---|---|
AsyncTable<C> |
build()
Create the
AsyncTable instance. |
AsyncTableBuilder<C> |
setMaxAttempts(int maxAttempts)
Set the max attempt times for an operation.
|
default AsyncTableBuilder<C> |
setMaxRetries(int maxRetries)
Set the max retry times for an operation.
|
AsyncTableBuilder<C> |
setOperationTimeout(long timeout,
TimeUnit unit)
Set timeout for a whole operation such as get, put or delete.
|
AsyncTableBuilder<C> |
setReadRpcTimeout(long timeout,
TimeUnit unit)
Set timeout for each read(get, scan) rpc request.
|
AsyncTableBuilder<C> |
setRetryPause(long pause,
TimeUnit unit)
Set the base pause time for retrying.
|
default AsyncTableBuilder<C> |
setRetryPauseForCQTBE(long pause,
TimeUnit unit)
Deprecated.
Since 2.5.0, will be removed in 4.0.0. Please use
setRetryPauseForServerOverloaded(long, TimeUnit) instead. |
AsyncTableBuilder<C> |
setRetryPauseForServerOverloaded(long pause,
TimeUnit unit)
Set the base pause time for retrying when
HBaseServerException.isServerOverloaded() . |
AsyncTableBuilder<C> |
setRpcTimeout(long timeout,
TimeUnit unit)
Set timeout for each rpc request.
|
AsyncTableBuilder<C> |
setScanTimeout(long timeout,
TimeUnit unit)
As now we have heartbeat support for scan, ideally a scan will never timeout unless the RS is
crash.
|
AsyncTableBuilder<C> |
setStartLogErrorsCnt(int startLogErrorsCnt)
Set the number of retries that are allowed before we start to log.
|
AsyncTableBuilder<C> |
setWriteRpcTimeout(long timeout,
TimeUnit unit)
Set timeout for each write(put, delete) rpc request.
|
AsyncTableBuilder<C> setOperationTimeout(long timeout, TimeUnit unit)
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.
AsyncTableBuilder<C> setScanTimeout(long timeout, TimeUnit unit)
setScanTimeout(long, TimeUnit)
AsyncTableBuilder<C> setRpcTimeout(long timeout, TimeUnit unit)
Notice that this will NOT change the rpc timeout for read(get, scan) request and write request(put, delete).
AsyncTableBuilder<C> setReadRpcTimeout(long timeout, TimeUnit unit)
AsyncTableBuilder<C> setWriteRpcTimeout(long timeout, TimeUnit unit)
AsyncTableBuilder<C> setRetryPause(long pause, TimeUnit unit)
@Deprecated default AsyncTableBuilder<C> setRetryPauseForCQTBE(long pause, TimeUnit unit)
setRetryPauseForServerOverloaded(long, TimeUnit)
instead.HBaseServerException.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 above
setRetryPause(long, TimeUnit)
method, as usually
HBaseServerException.isServerOverloaded()
means the server is overloaded. We just use
the normal pause value for HBaseServerException.isServerOverloaded()
if here you
specify a smaller value.setRetryPause(long, TimeUnit)
AsyncTableBuilder<C> setRetryPauseForServerOverloaded(long pause, TimeUnit unit)
HBaseServerException.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 above
setRetryPause(long, TimeUnit)
method, as usually
HBaseServerException.isServerOverloaded()
means the server is overloaded. We just use
the normal pause value for HBaseServerException.isServerOverloaded()
if here you
specify a smaller value.setRetryPause(long, TimeUnit)
default AsyncTableBuilder<C> setMaxRetries(int maxRetries)
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.
AsyncTableBuilder<C> setMaxAttempts(int maxAttempts)
AsyncTableBuilder<C> setStartLogErrorsCnt(int startLogErrorsCnt)
AsyncTable<C> build()
AsyncTable
instance.Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.