org.apache.accumulo.core.client
Interface MultiTableBatchWriter

All Known Implementing Classes:
MockMultiTableBatchWriter, MultiTableBatchWriterImpl

public interface MultiTableBatchWriter

This 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 resource may be shared among multiple tables.


Method Summary
 void close()
          Flush and release all resources.
 void flush()
          Send mutations for all tables to accumulo.
 BatchWriter getBatchWriter(java.lang.String table)
           
 boolean isClosed()
           
 

Method Detail

getBatchWriter

BatchWriter getBatchWriter(java.lang.String table)
                           throws AccumuloException,
                                  AccumuloSecurityException,
                                  TableNotFoundException
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 accumulo
AccumuloSecurityException - when the user is not allowed to insert data into that table
TableNotFoundException - when the table does not exist

flush

void flush()
           throws MutationsRejectedException
Send mutations for all tables to accumulo.

Throws:
MutationsRejectedException - when queued mutations are unable to be inserted

close

void close()
           throws MutationsRejectedException
Flush 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


Copyright © 2012 The Apache Software Foundation. All Rights Reserved.