Package org.apache.hadoop.hbase.client
Class AsyncBufferedMutatorBuilderImpl
java.lang.Object
org.apache.hadoop.hbase.client.AsyncBufferedMutatorBuilderImpl
- All Implemented Interfaces:
AsyncBufferedMutatorBuilder
@Private
class AsyncBufferedMutatorBuilderImpl
extends Object
implements AsyncBufferedMutatorBuilder
The implementation of
AsyncBufferedMutatorBuilder
.-
Field Summary
Modifier and TypeFieldDescriptionprivate int
private final org.apache.hbase.thirdparty.io.netty.util.HashedWheelTimer
private long
private final AsyncTableBuilder<?>
private long
-
Constructor Summary
ConstructorDescriptionAsyncBufferedMutatorBuilderImpl
(AsyncConnectionConfiguration connConf, AsyncTableBuilder<?> tableBuilder, org.apache.hbase.thirdparty.io.netty.util.HashedWheelTimer periodicalFlushTimer) -
Method Summary
Modifier and TypeMethodDescriptionbuild()
Create theAsyncBufferedMutator
instance.setMaxAttempts
(int maxAttempts) Set the max attempt times for an operation.setMaxKeyValueSize
(int maxKeyValueSize) Override the maximum key-value size specified by the providedAsyncConnection
'sConfiguration
instance, via the configuration keyhbase.client.keyvalue.maxsize
.setOperationTimeout
(long timeout, TimeUnit unit) Set timeout for the background flush operation.setRequestAttribute
(String key, byte[] value) Set a rpc request attribute.setRequestAttributes
(Map<String, byte[]> requestAttributes) Set multiple rpc request attributes.setRetryPause
(long pause, TimeUnit unit) Set the base pause time for retrying.setRpcTimeout
(long timeout, TimeUnit unit) Set timeout for each rpc request when doing background flush.setStartLogErrorsCnt
(int startLogErrorsCnt) Set the number of retries that are allowed before we start to log.setWriteBufferPeriodicFlush
(long timeout, TimeUnit unit) Set the periodical flush interval.setWriteBufferSize
(long writeBufferSize) Override the write buffer size specified by the providedAsyncConnection
'sConfiguration
instance, via the configuration keyhbase.client.write.buffer
.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.apache.hadoop.hbase.client.AsyncBufferedMutatorBuilder
disableWriteBufferPeriodicFlush, setMaxRetries
-
Field Details
-
periodicalFlushTimer
-
tableBuilder
-
writeBufferSize
-
periodicFlushTimeoutNs
-
maxKeyValueSize
-
-
Constructor Details
-
AsyncBufferedMutatorBuilderImpl
public AsyncBufferedMutatorBuilderImpl(AsyncConnectionConfiguration connConf, AsyncTableBuilder<?> tableBuilder, org.apache.hbase.thirdparty.io.netty.util.HashedWheelTimer periodicalFlushTimer)
-
-
Method Details
-
setOperationTimeout
Description copied from interface:AsyncBufferedMutatorBuilder
Set timeout for the background flush operation.- Specified by:
setOperationTimeout
in interfaceAsyncBufferedMutatorBuilder
-
setRpcTimeout
Description copied from interface:AsyncBufferedMutatorBuilder
Set timeout for each rpc request when doing background flush.- Specified by:
setRpcTimeout
in interfaceAsyncBufferedMutatorBuilder
-
setRetryPause
Description copied from interface:AsyncBufferedMutatorBuilder
Set the base pause time for retrying. We use an exponential policy to generate sleep time when retrying.- Specified by:
setRetryPause
in interfaceAsyncBufferedMutatorBuilder
-
setMaxAttempts
Description copied from interface:AsyncBufferedMutatorBuilder
Set 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:
setMaxAttempts
in interfaceAsyncBufferedMutatorBuilder
- See Also:
-
setStartLogErrorsCnt
Description copied from interface:AsyncBufferedMutatorBuilder
Set the number of retries that are allowed before we start to log.- Specified by:
setStartLogErrorsCnt
in interfaceAsyncBufferedMutatorBuilder
-
setRequestAttribute
Description copied from interface:AsyncBufferedMutatorBuilder
Set a rpc request attribute.- Specified by:
setRequestAttribute
in interfaceAsyncBufferedMutatorBuilder
-
setRequestAttributes
Description copied from interface:AsyncBufferedMutatorBuilder
Set multiple rpc request attributes.- Specified by:
setRequestAttributes
in interfaceAsyncBufferedMutatorBuilder
-
setWriteBufferSize
Description copied from interface:AsyncBufferedMutatorBuilder
Override the write buffer size specified by the providedAsyncConnection
'sConfiguration
instance, via the configuration keyhbase.client.write.buffer
.- Specified by:
setWriteBufferSize
in interfaceAsyncBufferedMutatorBuilder
-
setWriteBufferPeriodicFlush
Description copied from interface:AsyncBufferedMutatorBuilder
Set the periodical flush interval. If the data in the buffer has not been flush for a long time, i.e, reach this timeout limit, we will flush it automatically. Notice that, set the timeout to 0 or a negative value means disable periodical flush, not 'flush immediately'. If you want to flush immediately then you should not use this class, as it is designed to be 'buffered'.- Specified by:
setWriteBufferPeriodicFlush
in interfaceAsyncBufferedMutatorBuilder
-
setMaxKeyValueSize
Description copied from interface:AsyncBufferedMutatorBuilder
Override the maximum key-value size specified by the providedAsyncConnection
'sConfiguration
instance, via the configuration keyhbase.client.keyvalue.maxsize
.- Specified by:
setMaxKeyValueSize
in interfaceAsyncBufferedMutatorBuilder
-
build
Description copied from interface:AsyncBufferedMutatorBuilder
Create theAsyncBufferedMutator
instance.- Specified by:
build
in interfaceAsyncBufferedMutatorBuilder
-