Class AccumuloOutputFormat.AccumuloRecordWriter
java.lang.Object
org.apache.hadoop.mapreduce.RecordWriter<org.apache.hadoop.io.Text,Mutation>
org.apache.accumulo.core.client.mapreduce.AccumuloOutputFormat.AccumuloRecordWriter
- Enclosing class:
- AccumuloOutputFormat
protected static class AccumuloOutputFormat.AccumuloRecordWriter
extends org.apache.hadoop.mapreduce.RecordWriter<org.apache.hadoop.io.Text,Mutation>
A base class to be used to create
RecordWriter
instances that write to Accumulo.-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
AccumuloRecordWriter
(org.apache.hadoop.mapreduce.TaskAttemptContext context) -
Method Summary
-
Constructor Details
-
AccumuloRecordWriter
protected AccumuloRecordWriter(org.apache.hadoop.mapreduce.TaskAttemptContext context) throws AccumuloException, AccumuloSecurityException, IOException
-
-
Method Details
-
write
Push a mutation into a table. If table is null, the defaultTable will be used. IfAccumuloOutputFormat.canCreateTables(JobContext)
is set, the table will be created if it does not exist. The table name must only contain alphanumerics and underscore.- Specified by:
write
in classorg.apache.hadoop.mapreduce.RecordWriter<org.apache.hadoop.io.Text,
Mutation> - Throws:
IOException
-
addTable
public void addTable(org.apache.hadoop.io.Text tableName) throws AccumuloException, AccumuloSecurityException -
close
public void close(org.apache.hadoop.mapreduce.TaskAttemptContext attempt) throws IOException, InterruptedException - Specified by:
close
in classorg.apache.hadoop.mapreduce.RecordWriter<org.apache.hadoop.io.Text,
Mutation> - Throws:
IOException
InterruptedException
-