org.apache.accumulo.core.client.mapreduce
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.
Method Summary |
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. |
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.mapreduce.TaskAttemptContext context)
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 class org.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
- Throws:
AccumuloException
AccumuloSecurityException
close
public void close(org.apache.hadoop.mapreduce.TaskAttemptContext attempt)
throws IOException,
InterruptedException
- Specified by:
close
in class org.apache.hadoop.mapreduce.RecordWriter<org.apache.hadoop.io.Text,Mutation>
- Throws:
IOException
InterruptedException
Copyright © 2015 Apache Accumulo Project. All rights reserved.