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
Modifier and TypeFieldDescriptionprivate long
private boolean
private List<CompletableFuture<Void>>
private final int
private final org.apache.hbase.thirdparty.io.netty.util.HashedWheelTimer
(package private) org.apache.hbase.thirdparty.io.netty.util.Timeout
private final long
private final AsyncTable<?>
private final long
-
Constructor Summary
ConstructorDescriptionAsyncBufferedMutatorImpl
(org.apache.hbase.thirdparty.io.netty.util.HashedWheelTimer periodicalFlushTimer, AsyncTable<?> table, long writeBufferSize, long periodicFlushTimeoutNs, int maxKeyValueSize) -
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
Performs aAsyncBufferedMutator.flush()
and releases any resources held.void
flush()
Executes all the buffered, asynchronous operations.org.apache.hadoop.conf.Configuration
Returns theConfiguration
object used by this instance.getName()
Gets the fully qualified table name instance of the table that thisAsyncBufferedMutator
writes to.long
Returns the periodical flush interval, 0 means disabled.long
Returns the maximum size in bytes of the write buffer.protected void
Send someMutation
s to the table.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.AsyncBufferedMutator
mutate
-
Field Details
-
periodicalFlushTimer
-
table
-
writeBufferSize
-
periodicFlushTimeoutNs
-
maxKeyValueSize
-
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)
-
-
Method Details
-
getName
Description copied from interface:AsyncBufferedMutator
Gets the fully qualified table name instance of the table that thisAsyncBufferedMutator
writes to.- Specified by:
getName
in interfaceAsyncBufferedMutator
-
getConfiguration
Description copied from interface:AsyncBufferedMutator
Returns theConfiguration
object used by this instance.The reference returned is not a copy, so any change made to it will affect this instance.
- Specified by:
getConfiguration
in interfaceAsyncBufferedMutator
-
internalFlush
-
mutate
Description copied from interface:AsyncBufferedMutator
Send someMutation
s 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 ofmutations
in a single batch, the implementations are free to break it up according to the write buffer capacity.- Specified by:
mutate
in interfaceAsyncBufferedMutator
- Parameters:
mutations
- The data to send.
-
flush
Description copied from interface:AsyncBufferedMutator
Executes all the buffered, asynchronous operations.- Specified by:
flush
in interfaceAsyncBufferedMutator
-
close
Description copied from interface:AsyncBufferedMutator
Performs aAsyncBufferedMutator.flush()
and releases any resources held.- Specified by:
close
in interfaceAsyncBufferedMutator
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
-
getWriteBufferSize
Description copied from interface:AsyncBufferedMutator
Returns the maximum size in bytes of the write buffer.The default value comes from the configuration parameter
hbase.client.write.buffer
.- Specified by:
getWriteBufferSize
in interfaceAsyncBufferedMutator
- Returns:
- The size of the write buffer in bytes.
-
getPeriodicalFlushTimeout
Description copied from interface:AsyncBufferedMutator
Returns the periodical flush interval, 0 means disabled.- Specified by:
getPeriodicalFlushTimeout
in interfaceAsyncBufferedMutator
-