Package org.apache.hadoop.hbase.client
Class AsyncBufferedMutatorImpl
java.lang.Object
org.apache.hadoop.hbase.client.AsyncBufferedMutatorImpl
- All Implemented Interfaces:
Closeable,AutoCloseable,AsyncBufferedMutator
The implementation of
AsyncBufferedMutator. Simply wrap an AsyncTable.-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate longprivate booleanprivate List<CompletableFuture<Void>>private static final org.slf4j.Loggerprivate final intprivate final intprivate final org.apache.hbase.thirdparty.io.netty.util.HashedWheelTimer(package private) org.apache.hbase.thirdparty.io.netty.util.Timeoutprivate final longprivate final AsyncTable<?>private final long -
Constructor Summary
ConstructorsConstructorDescriptionAsyncBufferedMutatorImpl(org.apache.hbase.thirdparty.io.netty.util.HashedWheelTimer periodicalFlushTimer, AsyncTable<?> table, long writeBufferSize, long periodicFlushTimeoutNs, int maxKeyValueSize, int maxMutations) -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Performs aAsyncBufferedMutator.flush()and releases any resources held.voidflush()Executes all the buffered, asynchronous operations.org.apache.hadoop.conf.ConfigurationReturns theConfigurationobject used by this instance.intThe maximum number of mutations that this buffered mutator will buffer before flushing themgetName()Gets the fully qualified table name instance of the table that thisAsyncBufferedMutatorwrites to.longReturns the periodical flush interval, 0 means disabled.Returns the rpc request attributes.longReturns the maximum size in bytes of the write buffer.protected voidSend someMutations to the table.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.AsyncBufferedMutator
mutate
-
Field Details
-
LOG
-
periodicalFlushTimer
-
table
-
writeBufferSize
-
periodicFlushTimeoutNs
-
maxKeyValueSize
-
maxMutations
-
mutations
-
futures
-
bufferedSize
-
closed
-
periodicFlushTask
org.apache.hbase.thirdparty.io.netty.util.Timeout periodicFlushTask
-
-
Constructor Details
-
AsyncBufferedMutatorImpl
AsyncBufferedMutatorImpl(org.apache.hbase.thirdparty.io.netty.util.HashedWheelTimer periodicalFlushTimer, AsyncTable<?> table, long writeBufferSize, long periodicFlushTimeoutNs, int maxKeyValueSize, int maxMutations)
-
-
Method Details
-
getName
Description copied from interface:AsyncBufferedMutatorGets the fully qualified table name instance of the table that thisAsyncBufferedMutatorwrites to.- Specified by:
getNamein interfaceAsyncBufferedMutator
-
getConfiguration
Description copied from interface:AsyncBufferedMutatorReturns theConfigurationobject used by this instance.The reference returned is not a copy, so any change made to it will affect this instance.
- Specified by:
getConfigurationin interfaceAsyncBufferedMutator
-
internalFlush
-
mutate
Description copied from interface:AsyncBufferedMutatorSend someMutations to the table. The mutations will be buffered and sent over the wire as part of a batch. There is no guarantee of sending entire content ofmutationsin a single batch, the implementations are free to break it up according to the write buffer capacity.- Specified by:
mutatein interfaceAsyncBufferedMutator- Parameters:
mutations- The data to send.
-
flush
Description copied from interface:AsyncBufferedMutatorExecutes all the buffered, asynchronous operations.- Specified by:
flushin interfaceAsyncBufferedMutator
-
close
Description copied from interface:AsyncBufferedMutatorPerforms aAsyncBufferedMutator.flush()and releases any resources held.- Specified by:
closein interfaceAsyncBufferedMutator- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable
-
getWriteBufferSize
Description copied from interface:AsyncBufferedMutatorReturns the maximum size in bytes of the write buffer.The default value comes from the configuration parameter
hbase.client.write.buffer.- Specified by:
getWriteBufferSizein interfaceAsyncBufferedMutator- Returns:
- The size of the write buffer in bytes.
-
getPeriodicalFlushTimeout
Description copied from interface:AsyncBufferedMutatorReturns the periodical flush interval, 0 means disabled.- Specified by:
getPeriodicalFlushTimeoutin interfaceAsyncBufferedMutator
-
getMaxMutations
Description copied from interface:AsyncBufferedMutatorThe maximum number of mutations that this buffered mutator will buffer before flushing them- Specified by:
getMaxMutationsin interfaceAsyncBufferedMutator
-
getRequestAttributes
Description copied from interface:AsyncBufferedMutatorReturns the rpc request attributes.- Specified by:
getRequestAttributesin interfaceAsyncBufferedMutator
-