protected class TableOutputFormat.TableRecordWriter extends org.apache.hadoop.mapreduce.RecordWriter<KEY,Mutation>
| Modifier and Type | Field and Description |
|---|---|
private Connection |
connection |
private BufferedMutator |
mutator |
| Constructor and Description |
|---|
TableRecordWriter() |
| 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(KEY key,
Mutation value)
Writes a key/value pair into the table.
|
private Connection connection
private BufferedMutator mutator
public TableRecordWriter() throws IOException
IOExceptionpublic void close(org.apache.hadoop.mapreduce.TaskAttemptContext context) throws IOException
close in class org.apache.hadoop.mapreduce.RecordWriter<KEY,Mutation>context - The context.IOException - When closing the writer fails.RecordWriter.close(TaskAttemptContext)public void write(KEY key, Mutation value) throws IOException
write in class org.apache.hadoop.mapreduce.RecordWriter<KEY,Mutation>key - The key.value - The value.IOException - When writing fails.RecordWriter.write(Object, Object)Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.