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 TypeMethodDescriptionvoid
close()
Performs aflush()
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.default long
Returns the periodical flush interval, 0 means disabled.Returns the rpc request attributes.long
Returns the maximum size in bytes of the write buffer.Send someMutation
s to the table.default CompletableFuture<Void>
Sends aMutation
to the table.
-
Method Details
-
getName
Gets the fully qualified table name instance of the table that thisAsyncBufferedMutator
writes to. -
getConfiguration
org.apache.hadoop.conf.Configuration getConfiguration()Returns theConfiguration
object used by this instance.The reference returned is not a copy, so any change made to it will affect this instance.
-
mutate
Sends aMutation
to the table. The mutations will be buffered and sent over the wire as part of a batch. Currently only supportsPut
andDelete
mutations.- Parameters:
mutation
- The data to send.
-
mutate
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.- 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:
close
in interfaceAutoCloseable
- Specified by:
close
in 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.
-
getPeriodicalFlushTimeout
Returns the periodical flush interval, 0 means disabled. -
getRequestAttributes
Returns the rpc request attributes.
-