Package org.apache.accumulo.core.client
Interface MultiTableBatchWriter
-
- All Known Implementing Classes:
MockMultiTableBatchWriter,MultiTableBatchWriterImpl
public interface MultiTableBatchWriterThis class enables efficient batch writing to multiple tables. When creating a batch writer for each table, each has its own memory and network resources. Using this class these resources may be shared among multiple tables.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidclose()Flush and release all resources.voidflush()Send mutations for all tables to accumulo.BatchWritergetBatchWriter(String table)Returns a BatchWriter for a particular table.booleanisClosed()Returns true if this batch writer has been closed.
-
-
-
Method Detail
-
getBatchWriter
BatchWriter getBatchWriter(String table) throws AccumuloException, AccumuloSecurityException, TableNotFoundException
Returns a BatchWriter for a particular table.- Parameters:
table- the name of a table whose batch writer you wish to retrieve- Returns:
- an instance of a batch writer for the specified table
- Throws:
AccumuloException- when a general exception occurs with accumuloAccumuloSecurityException- when the user is not allowed to insert data into that tableTableNotFoundException- when the table does not exist
-
flush
void flush() throws MutationsRejectedExceptionSend mutations for all tables to accumulo.- Throws:
MutationsRejectedException- when queued mutations are unable to be inserted
-
close
void close() throws MutationsRejectedExceptionFlush and release all resources.- Throws:
MutationsRejectedException- when queued mutations are unable to be inserted
-
isClosed
boolean isClosed()
Returns true if this batch writer has been closed.- Returns:
- true if this batch writer has been closed
-
-