@InterfaceAudience.Public public interface AsyncTableBuilder<T extends AsyncTableBase>
AsyncTable
or RawAsyncTable
.
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 |
---|---|
T |
build()
Create the
AsyncTable or RawAsyncTable instance. |
AsyncTableBuilder<T> |
setMaxAttempts(int maxAttempts)
Set the max attempt times for an operation.
|
default AsyncTableBuilder<T> |
setMaxRetries(int maxRetries)
Set the max retry times for an operation.
|
AsyncTableBuilder<T> |
setOperationTimeout(long timeout,
TimeUnit unit)
Set timeout for a whole operation such as get, put or delete.
|
AsyncTableBuilder<T> |
setReadRpcTimeout(long timeout,
TimeUnit unit)
Set timeout for each read(get, scan) rpc request.
|
AsyncTableBuilder<T> |
setRetryPause(long pause,
TimeUnit unit)
Set the base pause time for retrying.
|
AsyncTableBuilder<T> |
setRpcTimeout(long timeout,
TimeUnit unit)
Set timeout for each rpc request.
|
AsyncTableBuilder<T> |
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<T> |
setStartLogErrorsCnt(int startLogErrorsCnt)
Set the number of retries that are allowed before we start to log.
|
AsyncTableBuilder<T> |
setWriteRpcTimeout(long timeout,
TimeUnit unit)
Set timeout for each write(put, delete) rpc request.
|
AsyncTableBuilder<T> 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<T> setScanTimeout(long timeout, TimeUnit unit)
setScanTimeout(long, TimeUnit)
AsyncTableBuilder<T> 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<T> setReadRpcTimeout(long timeout, TimeUnit unit)
AsyncTableBuilder<T> setWriteRpcTimeout(long timeout, TimeUnit unit)
AsyncTableBuilder<T> setRetryPause(long pause, TimeUnit unit)
default AsyncTableBuilder<T> 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<T> setMaxAttempts(int maxAttempts)
AsyncTableBuilder<T> setStartLogErrorsCnt(int startLogErrorsCnt)
T build()
AsyncTable
or RawAsyncTable
instance.Copyright © 2007–2017 The Apache Software Foundation. All rights reserved.