@InterfaceAudience.Private abstract class AsyncTableBuilderBase<C extends ScanResultConsumerBase> extends Object implements AsyncTableBuilder<C>
Modifier and Type | Field and Description |
---|---|
protected int |
maxAttempts |
protected long |
operationTimeoutNs |
protected long |
pauseNs |
protected long |
readRpcTimeoutNs |
protected long |
rpcTimeoutNs |
protected long |
scanTimeoutNs |
protected int |
startLogErrorsCnt |
protected TableName |
tableName |
protected long |
writeRpcTimeoutNs |
Constructor and Description |
---|
AsyncTableBuilderBase(TableName tableName,
AsyncConnectionConfiguration connConf) |
Modifier and Type | Method and Description |
---|---|
AsyncTableBuilderBase<C> |
setMaxAttempts(int maxAttempts)
Set the max attempt times for an operation.
|
AsyncTableBuilderBase<C> |
setOperationTimeout(long timeout,
TimeUnit unit)
Set timeout for a whole operation such as get, put or delete.
|
AsyncTableBuilderBase<C> |
setReadRpcTimeout(long timeout,
TimeUnit unit)
Set timeout for each read(get, scan) rpc request.
|
AsyncTableBuilderBase<C> |
setRetryPause(long pause,
TimeUnit unit)
Set the base pause time for retrying.
|
AsyncTableBuilderBase<C> |
setRpcTimeout(long timeout,
TimeUnit unit)
Set timeout for each rpc request.
|
AsyncTableBuilderBase<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.
|
AsyncTableBuilderBase<C> |
setStartLogErrorsCnt(int startLogErrorsCnt)
Set the number of retries that are allowed before we start to log.
|
AsyncTableBuilderBase<C> |
setWriteRpcTimeout(long timeout,
TimeUnit unit)
Set timeout for each write(put, delete) rpc request.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
build, setMaxRetries
protected long operationTimeoutNs
protected long scanTimeoutNs
protected long rpcTimeoutNs
protected long readRpcTimeoutNs
protected long writeRpcTimeoutNs
protected long pauseNs
protected int maxAttempts
protected int startLogErrorsCnt
AsyncTableBuilderBase(TableName tableName, AsyncConnectionConfiguration connConf)
public AsyncTableBuilderBase<C> setOperationTimeout(long timeout, TimeUnit unit)
AsyncTableBuilder
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.
setOperationTimeout
in interface AsyncTableBuilder<C extends ScanResultConsumerBase>
AsyncTableBuilder.setMaxAttempts(int)
,
AsyncTableBuilder.setMaxRetries(int)
,
AsyncTableBuilder.setScanTimeout(long, TimeUnit)
public AsyncTableBuilderBase<C> setScanTimeout(long timeout, TimeUnit unit)
AsyncTableBuilder
setScanTimeout
in interface AsyncTableBuilder<C extends ScanResultConsumerBase>
AsyncTableBuilder.setScanTimeout(long, TimeUnit)
public AsyncTableBuilderBase<C> setRpcTimeout(long timeout, TimeUnit unit)
AsyncTableBuilder
Notice that this will NOT change the rpc timeout for read(get, scan) request and write request(put, delete).
setRpcTimeout
in interface AsyncTableBuilder<C extends ScanResultConsumerBase>
public AsyncTableBuilderBase<C> setReadRpcTimeout(long timeout, TimeUnit unit)
AsyncTableBuilder
setReadRpcTimeout
in interface AsyncTableBuilder<C extends ScanResultConsumerBase>
public AsyncTableBuilderBase<C> setWriteRpcTimeout(long timeout, TimeUnit unit)
AsyncTableBuilder
setWriteRpcTimeout
in interface AsyncTableBuilder<C extends ScanResultConsumerBase>
public AsyncTableBuilderBase<C> setRetryPause(long pause, TimeUnit unit)
AsyncTableBuilder
setRetryPause
in interface AsyncTableBuilder<C extends ScanResultConsumerBase>
public AsyncTableBuilderBase<C> setMaxAttempts(int maxAttempts)
AsyncTableBuilder
setMaxAttempts
in interface AsyncTableBuilder<C extends ScanResultConsumerBase>
AsyncTableBuilder.setMaxRetries(int)
,
AsyncTableBuilder.setOperationTimeout(long, TimeUnit)
public AsyncTableBuilderBase<C> setStartLogErrorsCnt(int startLogErrorsCnt)
AsyncTableBuilder
setStartLogErrorsCnt
in interface AsyncTableBuilder<C extends ScanResultConsumerBase>
Copyright © 2007–2019 The Apache Software Foundation. All rights reserved.