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
FieldsModifier and TypeFieldDescriptionprivate intprivate intprivate final org.apache.hbase.thirdparty.io.netty.util.HashedWheelTimerprivate longprivate final AsyncTableBuilder<?>private long -
Constructor Summary
ConstructorsConstructorDescriptionAsyncBufferedMutatorBuilderImpl(AsyncConnectionConfiguration connConf, AsyncTableBuilder<?> tableBuilder, org.apache.hbase.thirdparty.io.netty.util.HashedWheelTimer periodicalFlushTimer) -
Method Summary
Modifier and TypeMethodDescriptionbuild()Create theAsyncBufferedMutatorinstance.setMaxAttempts(int maxAttempts) Set the max attempt times for an operation.setMaxKeyValueSize(int maxKeyValueSize) Override the maximum key-value size specified by the providedAsyncConnection'sConfigurationinstance, via the configuration keyhbase.client.keyvalue.maxsize.setMaxMutations(int maxMutations) Set the maximum number of mutations that this buffered mutator will buffer before flushing them.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'sConfigurationinstance, via the configuration keyhbase.client.write.buffer.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.AsyncBufferedMutatorBuilder
disableWriteBufferPeriodicFlush, setMaxRetries
-
Field Details
-
periodicalFlushTimer
-
tableBuilder
-
writeBufferSize
-
periodicFlushTimeoutNs
-
maxKeyValueSize
-
maxMutations
-
-
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:AsyncBufferedMutatorBuilderSet timeout for the background flush operation.- Specified by:
setOperationTimeoutin interfaceAsyncBufferedMutatorBuilder
-
setRpcTimeout
Description copied from interface:AsyncBufferedMutatorBuilderSet timeout for each rpc request when doing background flush.- Specified by:
setRpcTimeoutin interfaceAsyncBufferedMutatorBuilder
-
setRetryPause
Description copied from interface:AsyncBufferedMutatorBuilderSet the base pause time for retrying. We use an exponential policy to generate sleep time when retrying.- Specified by:
setRetryPausein interfaceAsyncBufferedMutatorBuilder
-
setMaxAttempts
Description copied from interface:AsyncBufferedMutatorBuilderSet 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 interfaceAsyncBufferedMutatorBuilder- See Also:
-
setStartLogErrorsCnt
Description copied from interface:AsyncBufferedMutatorBuilderSet the number of retries that are allowed before we start to log.- Specified by:
setStartLogErrorsCntin interfaceAsyncBufferedMutatorBuilder
-
setRequestAttribute
Description copied from interface:AsyncBufferedMutatorBuilderSet a rpc request attribute.- Specified by:
setRequestAttributein interfaceAsyncBufferedMutatorBuilder
-
setRequestAttributes
Description copied from interface:AsyncBufferedMutatorBuilderSet multiple rpc request attributes.- Specified by:
setRequestAttributesin interfaceAsyncBufferedMutatorBuilder
-
setWriteBufferSize
Description copied from interface:AsyncBufferedMutatorBuilderOverride the write buffer size specified by the providedAsyncConnection'sConfigurationinstance, via the configuration keyhbase.client.write.buffer.- Specified by:
setWriteBufferSizein interfaceAsyncBufferedMutatorBuilder
-
setWriteBufferPeriodicFlush
Description copied from interface:AsyncBufferedMutatorBuilderSet 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:
setWriteBufferPeriodicFlushin interfaceAsyncBufferedMutatorBuilder
-
setMaxKeyValueSize
Description copied from interface:AsyncBufferedMutatorBuilderOverride the maximum key-value size specified by the providedAsyncConnection'sConfigurationinstance, via the configuration keyhbase.client.keyvalue.maxsize.- Specified by:
setMaxKeyValueSizein interfaceAsyncBufferedMutatorBuilder
-
setMaxMutations
Description copied from interface:AsyncBufferedMutatorBuilderSet the maximum number of mutations that this buffered mutator will buffer before flushing them. If you are talking to a cluster that uses hbase.rpc.rows.size.threshold.reject to reject large Multi requests, you may need this setting to avoid rejections. Default is no limit.- Specified by:
setMaxMutationsin interfaceAsyncBufferedMutatorBuilder
-
build
Description copied from interface:AsyncBufferedMutatorBuilderCreate theAsyncBufferedMutatorinstance.- Specified by:
buildin interfaceAsyncBufferedMutatorBuilder
-