Class BatchWriterImpl
- java.lang.Object
-
- org.apache.accumulo.core.clientImpl.BatchWriterImpl
-
- All Implemented Interfaces:
AutoCloseable,BatchWriter
public class BatchWriterImpl extends Object implements BatchWriter
-
-
Constructor Summary
Constructors Constructor Description BatchWriterImpl(ClientContext context, TableId tableId, BatchWriterConfig config)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddMutation(Mutation m)Queues one mutation to write.voidaddMutations(Iterable<Mutation> iterable)Queues several mutations to write.voidclose()Flush and release any resources.voidflush()Send any buffered mutations to Accumulo immediately.
-
-
-
Constructor Detail
-
BatchWriterImpl
public BatchWriterImpl(ClientContext context, TableId tableId, BatchWriterConfig config)
-
-
Method Detail
-
addMutation
public void addMutation(Mutation m) throws MutationsRejectedException
Description copied from interface:BatchWriterQueues one mutation to write.- Specified by:
addMutationin interfaceBatchWriter- Parameters:
m- the mutation to add- Throws:
MutationsRejectedException- this could be thrown because current or previous mutations failed
-
addMutations
public void addMutations(Iterable<Mutation> iterable) throws MutationsRejectedException
Description copied from interface:BatchWriterQueues several mutations to write.- Specified by:
addMutationsin interfaceBatchWriter- Parameters:
iterable- allows adding any number of mutations iteratively- Throws:
MutationsRejectedException- this could be thrown because current or previous mutations failed
-
close
public void close() throws MutationsRejectedExceptionDescription copied from interface:BatchWriterFlush and release any resources.- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceBatchWriter- Throws:
MutationsRejectedException- this could be thrown because current or previous mutations failed
-
flush
public void flush() throws MutationsRejectedExceptionDescription copied from interface:BatchWriterSend any buffered mutations to Accumulo immediately.- Specified by:
flushin interfaceBatchWriter- Throws:
MutationsRejectedException- this could be thrown because current or previous mutations failed
-
-