org.apache.hadoop.hbase.mapred
Class TableOutputFormat.TableRecordWriter

java.lang.Object
  extended by org.apache.hadoop.hbase.mapred.TableOutputFormat.TableRecordWriter
All Implemented Interfaces:
RecordWriter
Enclosing class:
TableOutputFormat

protected class TableOutputFormat.TableRecordWriter
extends Object
implements RecordWriter

Convert Reduce output (key, value) to (HStoreKey, KeyedDataArrayWritable) and write to an HBase table


Constructor Summary
TableOutputFormat.TableRecordWriter(HClient client)
          Instantiate a TableRecordWriter with the HBase HClient for writing.
 
Method Summary
 void close(Reporter reporter)
          Close this to future operations.
 void write(WritableComparable key, Writable value)
          Expect key to be of type Text Expect value to be of type KeyedDataArrayWritable
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TableOutputFormat.TableRecordWriter

public TableOutputFormat.TableRecordWriter(HClient client)
Instantiate a TableRecordWriter with the HBase HClient for writing.

Parameters:
client -
Method Detail

close

public void close(Reporter reporter)
Description copied from interface: RecordWriter
Close this to future operations.

Specified by:
close in interface RecordWriter

write

public void write(WritableComparable key,
                  Writable value)
           throws IOException
Expect key to be of type Text Expect value to be of type KeyedDataArrayWritable

Specified by:
write in interface RecordWriter
Parameters:
key - the key to write
value - the value to write
Throws:
IOException
See Also:
RecordWriter.write(org.apache.hadoop.io.WritableComparable, org.apache.hadoop.io.Writable)


Copyright © 2006 The Apache Software Foundation