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

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

protected class TableOutputFormat.TableRecordWriter
extends Object
implements RecordWriter<Text,MapWritable>

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


Constructor Summary
TableOutputFormat.TableRecordWriter(HTable table)
          Instantiate a TableRecordWriter with the HBase HClient for writing.
 
Method Summary
 void close(Reporter reporter)
          Close this RecordWriter to future operations.
 void write(Text key, MapWritable value)
          Writes a key/value pair.
 
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(HTable table)
Instantiate a TableRecordWriter with the HBase HClient for writing.

Parameters:
table -
Method Detail

close

public void close(Reporter reporter)
Close this RecordWriter to future operations.

Specified by:
close in interface RecordWriter<Text,MapWritable>
Parameters:
reporter - facility to report progress.

write

public void write(Text key,
                  MapWritable value)
           throws IOException
Writes a key/value pair.

Specified by:
write in interface RecordWriter<Text,MapWritable>
Parameters:
key - the key to write.
value - the value to write.
Throws:
IOException
See Also:
Writable.write(DataOutput)


Copyright © 2006 The Apache Software Foundation