Class AccumuloOutputFormat.AccumuloRecordWriter
- java.lang.Object
-
- org.apache.accumulo.core.client.mapred.AccumuloOutputFormat.AccumuloRecordWriter
-
- All Implemented Interfaces:
org.apache.hadoop.mapred.RecordWriter<org.apache.hadoop.io.Text,Mutation>
- Enclosing class:
- AccumuloOutputFormat
protected static class AccumuloOutputFormat.AccumuloRecordWriter extends Object implements org.apache.hadoop.mapred.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.mapred.JobConf job)
-
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.mapred.Reporter reporter)
void
write(org.apache.hadoop.io.Text table, Mutation mutation)
Push a mutation into a table.
-
-
-
Constructor Detail
-
AccumuloRecordWriter
protected AccumuloRecordWriter(org.apache.hadoop.mapred.JobConf job) 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(JobConf)
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 interfaceorg.apache.hadoop.mapred.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.mapred.Reporter reporter) throws IOException
- Specified by:
close
in interfaceorg.apache.hadoop.mapred.RecordWriter<org.apache.hadoop.io.Text,Mutation>
- Throws:
IOException
-
-