Package org.apache.hadoop.hbase.client
Interface AsyncBufferedMutator
- All Superinterfaces:
AutoCloseable,Closeable
- All Known Implementing Classes:
AsyncBufferedMutatorImpl
Used to communicate with a single HBase table in batches. Obtain an instance from a
AsyncConnection and call close() afterwards.
The implementation is required to be thread safe.
-
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Performs aflush()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.default longReturns the periodical flush interval, 0 means disabled.Returns the rpc request attributes.longReturns the maximum size in bytes of the write buffer.Send someMutations to the table.default CompletableFuture<Void>Sends aMutationto the table.
-
Method Details
-
getName
Gets the fully qualified table name instance of the table that thisAsyncBufferedMutatorwrites to. -
getConfiguration
org.apache.hadoop.conf.Configuration getConfiguration()Returns theConfigurationobject used by this instance.The reference returned is not a copy, so any change made to it will affect this instance.
-
mutate
Sends aMutationto the table. The mutations will be buffered and sent over the wire as part of a batch. Currently only supportsPutandDeletemutations.- Parameters:
mutation- The data to send.
-
mutate
Send 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.- Parameters:
mutations- The data to send.
-
flush
void flush()Executes all the buffered, asynchronous operations. -
close
void close()Performs aflush()and releases any resources held.- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable
-
getWriteBufferSize
long getWriteBufferSize()Returns the maximum size in bytes of the write buffer.The default value comes from the configuration parameter
hbase.client.write.buffer.- Returns:
- The size of the write buffer in bytes.
-
getMaxMutations
int getMaxMutations()The maximum number of mutations that this buffered mutator will buffer before flushing them -
getPeriodicalFlushTimeout
Returns the periodical flush interval, 0 means disabled. -
getRequestAttributes
Returns the rpc request attributes.
-