org.apache.accumulo.core.client
Interface BatchWriter

All Known Implementing Classes:
BatchWriterImpl, MockBatchWriter

public interface BatchWriter

Send Mutations to a single Table in Accumulo.


Method Summary
 void addMutation(Mutation m)
          Queues one mutation to write.
 void addMutations(Iterable<Mutation> iterable)
          Queues several mutations to write.
 void close()
          Flush and release any resources.
 void flush()
          Send any buffered mutations to Accumulo immediately.
 

Method Detail

addMutation

void addMutation(Mutation m)
                 throws MutationsRejectedException
Queues one mutation to write.

Parameters:
m - the mutation to add
Throws:
MutationsRejectedException - this could be thrown because current or previous mutations failed

addMutations

void addMutations(Iterable<Mutation> iterable)
                  throws MutationsRejectedException
Queues several mutations to write.

Parameters:
iterable - allows adding any number of mutations iteratively
Throws:
MutationsRejectedException - this could be thrown because current or previous mutations failed

flush

void flush()
           throws MutationsRejectedException
Send any buffered mutations to Accumulo immediately.

Throws:
MutationsRejectedException - this could be thrown because current or previous mutations failed

close

void close()
           throws MutationsRejectedException
Flush and release any resources.

Throws:
MutationsRejectedException - this could be thrown because current or previous mutations failed


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