Package org.apache.hadoop.hbase.client
Class AsyncTableBuilderBase<C extends ScanResultConsumerBase>
java.lang.Object
org.apache.hadoop.hbase.client.AsyncTableBuilderBase<C>
- All Implemented Interfaces:
AsyncTableBuilder<C>
@Private
abstract class AsyncTableBuilderBase<C extends ScanResultConsumerBase>
extends Object
implements AsyncTableBuilder<C>
Base class for all asynchronous table builders.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected intprotected longprotected longprotected longprotected longprotected longprotected longprotected intprotected TableNameprotected long -
Constructor Summary
ConstructorsConstructorDescriptionAsyncTableBuilderBase(TableName tableName, AsyncConnectionConfiguration connConf) -
Method Summary
Modifier and TypeMethodDescriptionsetMaxAttempts(int maxAttempts) Set the max attempt times for an operation.setOperationTimeout(long timeout, TimeUnit unit) Set timeout for a whole operation such as get, put or delete.setReadRpcTimeout(long timeout, TimeUnit unit) Set timeout for each read(get, scan) rpc request.setRequestAttribute(String key, byte[] value) Set a request attributesetRetryPause(long pause, TimeUnit unit) Set the base pause time for retrying.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.setScanTimeout(long timeout, TimeUnit unit) As now we have heartbeat support for scan, ideally a scan will never timeout unless the RS is crash.setStartLogErrorsCnt(int startLogErrorsCnt) Set the number of retries that are allowed before we start to log.setWriteRpcTimeout(long timeout, TimeUnit unit) Set timeout for each write(put, delete) rpc request.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.hadoop.hbase.client.AsyncTableBuilder
build, setMaxRetries, setRetryPauseForCQTBE
-
Field Details
-
tableName
-
operationTimeoutNs
-
scanTimeoutNs
-
rpcTimeoutNs
-
readRpcTimeoutNs
-
writeRpcTimeoutNs
-
pauseNs
-
pauseNsForServerOverloaded
-
maxAttempts
-
startLogErrorsCnt
-
requestAttributes
-
-
Constructor Details
-
AsyncTableBuilderBase
AsyncTableBuilderBase(TableName tableName, AsyncConnectionConfiguration connConf)
-
-
Method Details
-
setOperationTimeout
Description copied from interface:AsyncTableBuilderSet timeout for a whole operation such as get, put or delete. Notice that scan will not be effected by this value, see scanTimeoutNs.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.
- Specified by:
setOperationTimeoutin interfaceAsyncTableBuilder<C extends ScanResultConsumerBase>- See Also:
-
setScanTimeout
Description copied from interface:AsyncTableBuilderAs now we have heartbeat support for scan, ideally a scan will never timeout unless the RS is crash. The RS will always return something before the rpc timed out or scan timed out to tell the client that it is still alive. The scan timeout is used as operation timeout for every operation in a scan, such as openScanner or next.- Specified by:
setScanTimeoutin interfaceAsyncTableBuilder<C extends ScanResultConsumerBase>- See Also:
-
setRpcTimeout
Description copied from interface:AsyncTableBuilderSet timeout for each rpc request.Notice that this will NOT change the rpc timeout for read(get, scan) request and write request(put, delete).
- Specified by:
setRpcTimeoutin interfaceAsyncTableBuilder<C extends ScanResultConsumerBase>
-
setReadRpcTimeout
Description copied from interface:AsyncTableBuilderSet timeout for each read(get, scan) rpc request.- Specified by:
setReadRpcTimeoutin interfaceAsyncTableBuilder<C extends ScanResultConsumerBase>
-
setWriteRpcTimeout
Description copied from interface:AsyncTableBuilderSet timeout for each write(put, delete) rpc request.- Specified by:
setWriteRpcTimeoutin interfaceAsyncTableBuilder<C extends ScanResultConsumerBase>
-
setRetryPause
Description copied from interface:AsyncTableBuilderSet the base pause time for retrying. We use an exponential policy to generate sleep time when retrying.- Specified by:
setRetryPausein interfaceAsyncTableBuilder<C extends ScanResultConsumerBase>- See Also:
-
setRetryPauseForServerOverloaded
Description copied from interface:AsyncTableBuilderSet 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 aboveAsyncTableBuilder.setRetryPause(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.- Specified by:
setRetryPauseForServerOverloadedin interfaceAsyncTableBuilder<C extends ScanResultConsumerBase>- See Also:
-
setMaxAttempts
Description copied from interface:AsyncTableBuilderSet the max attempt times for an 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.- Specified by:
setMaxAttemptsin interfaceAsyncTableBuilder<C extends ScanResultConsumerBase>- See Also:
-
setStartLogErrorsCnt
Description copied from interface:AsyncTableBuilderSet the number of retries that are allowed before we start to log.- Specified by:
setStartLogErrorsCntin interfaceAsyncTableBuilder<C extends ScanResultConsumerBase>
-
setRequestAttribute
Description copied from interface:AsyncTableBuilderSet a request attribute- Specified by:
setRequestAttributein interfaceAsyncTableBuilder<C extends ScanResultConsumerBase>
-