Class TableOutputFormat.TableRecordWriter

java.lang.Object
org.apache.hadoop.mapreduce.RecordWriter<KEY,Mutation>
org.apache.hadoop.hbase.mapreduce.TableOutputFormat.TableRecordWriter
Enclosing class:
TableOutputFormat<KEY>

protected class TableOutputFormat.TableRecordWriter extends org.apache.hadoop.mapreduce.RecordWriter<KEY,Mutation>
Writes the reducer output to an HBase table.
  • Field Details

  • Constructor Details

  • Method Details

    • close

      public void close(org.apache.hadoop.mapreduce.TaskAttemptContext context) throws IOException
      Closes the writer, in this case flush table commits.
      Specified by:
      close in class org.apache.hadoop.mapreduce.RecordWriter<KEY,Mutation>
      Parameters:
      context - The context.
      Throws:
      IOException - When closing the writer fails.
      See Also:
      • RecordWriter.close(TaskAttemptContext)
    • write

      public void write(KEY key, Mutation value) throws IOException
      Writes a key/value pair into the table.
      Specified by:
      write in class org.apache.hadoop.mapreduce.RecordWriter<KEY,Mutation>
      Parameters:
      key - The key.
      value - The value.
      Throws:
      IOException - When writing fails.
      See Also:
      • RecordWriter.write(Object, Object)