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 createRecordWriter
instances that write to Accumulo.
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
AccumuloRecordWriter(org.apache.hadoop.mapreduce.TaskAttemptContext context)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addTable(org.apache.hadoop.io.Text tableName)
void
close(org.apache.hadoop.mapreduce.TaskAttemptContext attempt)
void
write(org.apache.hadoop.io.Text table, Mutation mutation)
Push a mutation into a table.
-
-
-
Constructor Detail
-
AccumuloRecordWriter
protected AccumuloRecordWriter(org.apache.hadoop.mapreduce.TaskAttemptContext context) throws AccumuloException, AccumuloSecurityException, IOException
-
-
Method Detail
-
write
public void write(org.apache.hadoop.io.Text table, Mutation mutation) throws IOException
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
-
-