org.apache.accumulo.test.randomwalk.concurrent
public static class BulkImport.RFileBatchWriter extends Object implements BatchWriter
Constructor and Description |
---|
BulkImport.RFileBatchWriter(org.apache.hadoop.conf.Configuration conf,
org.apache.hadoop.fs.FileSystem fs,
String file) |
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 BulkImport.RFileBatchWriter(org.apache.hadoop.conf.Configuration conf, org.apache.hadoop.fs.FileSystem fs, String file) throws IOException
IOException
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-2015 The Apache Software Foundation. All Rights Reserved.