org.apache.hadoop.hbase.mapred
Class TableOutputFormat

java.lang.Object
  extended by org.apache.hadoop.mapred.FileOutputFormat<ImmutableBytesWritable,BatchUpdate>
      extended by org.apache.hadoop.hbase.mapred.TableOutputFormat
All Implemented Interfaces:
org.apache.hadoop.mapred.OutputFormat<ImmutableBytesWritable,BatchUpdate>

public class TableOutputFormat
extends org.apache.hadoop.mapred.FileOutputFormat<ImmutableBytesWritable,BatchUpdate>

Convert Map/Reduce output and write it to an HBase table


Nested Class Summary
protected  class TableOutputFormat.TableRecordWriter
          Convert Reduce output (key, value) to (HStoreKey, KeyedDataArrayWritable) and write to an HBase table
 
Field Summary
static String OUTPUT_TABLE
          JobConf parameter that specifies the output table
 
Constructor Summary
TableOutputFormat()
           
 
Method Summary
 void checkOutputSpecs(org.apache.hadoop.fs.FileSystem ignored, org.apache.hadoop.mapred.JobConf job)
          
 org.apache.hadoop.mapred.RecordWriter getRecordWriter(org.apache.hadoop.fs.FileSystem ignored, org.apache.hadoop.mapred.JobConf job, String name, org.apache.hadoop.util.Progressable progress)
          
 
Methods inherited from class org.apache.hadoop.mapred.FileOutputFormat
getCompressOutput, getOutputCompressorClass, getOutputPath, getWorkOutputPath, setCompressOutput, setOutputCompressorClass, setOutputPath
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

OUTPUT_TABLE

public static final String OUTPUT_TABLE
JobConf parameter that specifies the output table

See Also:
Constant Field Values
Constructor Detail

TableOutputFormat

public TableOutputFormat()
Method Detail

getRecordWriter

public org.apache.hadoop.mapred.RecordWriter getRecordWriter(org.apache.hadoop.fs.FileSystem ignored,
                                                             org.apache.hadoop.mapred.JobConf job,
                                                             String name,
                                                             org.apache.hadoop.util.Progressable progress)
                                                      throws IOException

Specified by:
getRecordWriter in interface org.apache.hadoop.mapred.OutputFormat<ImmutableBytesWritable,BatchUpdate>
Specified by:
getRecordWriter in class org.apache.hadoop.mapred.FileOutputFormat<ImmutableBytesWritable,BatchUpdate>
Throws:
IOException

checkOutputSpecs

public void checkOutputSpecs(org.apache.hadoop.fs.FileSystem ignored,
                             org.apache.hadoop.mapred.JobConf job)
                      throws org.apache.hadoop.mapred.FileAlreadyExistsException,
                             org.apache.hadoop.mapred.InvalidJobConfException,
                             IOException

Specified by:
checkOutputSpecs in interface org.apache.hadoop.mapred.OutputFormat<ImmutableBytesWritable,BatchUpdate>
Overrides:
checkOutputSpecs in class org.apache.hadoop.mapred.FileOutputFormat<ImmutableBytesWritable,BatchUpdate>
Throws:
org.apache.hadoop.mapred.FileAlreadyExistsException
org.apache.hadoop.mapred.InvalidJobConfException
IOException


Copyright © 2008 The Apache Software Foundation