org.apache.accumulo.core.client.mapred
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 create RecordWriter
instances that write to Accumulo.
Method Summary |
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. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AccumuloOutputFormat.AccumuloRecordWriter
protected AccumuloOutputFormat.AccumuloRecordWriter(org.apache.hadoop.mapred.JobConf job)
throws AccumuloException,
AccumuloSecurityException,
IOException
- Throws:
AccumuloException
AccumuloSecurityException
IOException
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. If canCreateTable 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 interface org.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
- Throws:
AccumuloException
AccumuloSecurityException
close
public void close(org.apache.hadoop.mapred.Reporter reporter)
throws IOException
- Specified by:
close
in interface org.apache.hadoop.mapred.RecordWriter<org.apache.hadoop.io.Text,Mutation>
- Throws:
IOException
Copyright © 2015 Apache Accumulo Project. All rights reserved.