public class TableRecordWriter
extends org.apache.hadoop.mapreduce.RecordWriter<org.ojai.Value,org.ojai.Document>
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
OUTPUT_TABLE
Job parameter that specifies the output table.
|
Constructor and Description |
---|
TableRecordWriter(com.mapr.db.Table table) |
Modifier and Type | Method and Description |
---|---|
void |
close(org.apache.hadoop.mapreduce.TaskAttemptContext context)
Closes the writer, in this case flush table commits.
|
void |
write(org.ojai.Value key,
org.ojai.Document value)
Writes a key/value pair into the table.
|
public static final java.lang.String OUTPUT_TABLE
public void close(org.apache.hadoop.mapreduce.TaskAttemptContext context) throws java.io.IOException
close
in class org.apache.hadoop.mapreduce.RecordWriter<org.ojai.Value,org.ojai.Document>
context
- The context.java.io.IOException
- When closing the writer fails.RecordWriter.close(org.apache.hadoop.mapreduce.TaskAttemptContext)
public void write(org.ojai.Value key, org.ojai.Document value) throws java.io.IOException
write
in class org.apache.hadoop.mapreduce.RecordWriter<org.ojai.Value,org.ojai.Document>
key
- The key.value
- The value.java.io.IOException
- When writing fails.RecordWriter.write(java.lang.Object, java.lang.Object)