public class MockBatchWriter extends Object implements BatchWriter
Modifier and Type | Method and Description |
---|---|
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.
|
public void addMutation(Mutation m) throws MutationsRejectedException
BatchWriter
addMutation
in interface BatchWriter
m
- the mutation to addMutationsRejectedException
- this could be thrown because current or previous mutations failedpublic void addMutations(Iterable<Mutation> iterable) throws MutationsRejectedException
BatchWriter
addMutations
in interface BatchWriter
iterable
- allows adding any number of mutations iterativelyMutationsRejectedException
- this could be thrown because current or previous mutations failedpublic void flush() throws MutationsRejectedException
BatchWriter
flush
in interface BatchWriter
MutationsRejectedException
- this could be thrown because current or previous mutations failedpublic void close() throws MutationsRejectedException
BatchWriter
close
in interface BatchWriter
MutationsRejectedException
- this could be thrown because current or previous mutations failedCopyright © 2011–2018 The Apache Software Foundation. All rights reserved.