org.apache.hadoop.hbase.mapred
Class TableInputFormat

java.lang.Object
  extended by org.apache.hadoop.hbase.mapred.TableInputFormat
All Implemented Interfaces:
org.apache.hadoop.mapred.InputFormat<HStoreKey,org.apache.hadoop.io.MapWritable>, org.apache.hadoop.mapred.JobConfigurable

public class TableInputFormat
extends Object
implements org.apache.hadoop.mapred.InputFormat<HStoreKey,org.apache.hadoop.io.MapWritable>, org.apache.hadoop.mapred.JobConfigurable

Convert HBase tabular data into a format that is consumable by Map/Reduce


Field Summary
static String COLUMN_LIST
          space delimited list of columns
 
Constructor Summary
TableInputFormat()
           
 
Method Summary
 void configure(org.apache.hadoop.mapred.JobConf job)
           
 org.apache.hadoop.mapred.RecordReader<HStoreKey,org.apache.hadoop.io.MapWritable> getRecordReader(org.apache.hadoop.mapred.InputSplit split, org.apache.hadoop.mapred.JobConf job, org.apache.hadoop.mapred.Reporter reporter)
           
 org.apache.hadoop.mapred.InputSplit[] getSplits(org.apache.hadoop.mapred.JobConf job, int numSplits)
          A split will be created for each HRegion of the input table
 void validateInput(org.apache.hadoop.mapred.JobConf job)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

COLUMN_LIST

public static final String COLUMN_LIST
space delimited list of columns

See Also:
for column name wildcards, Constant Field Values
Constructor Detail

TableInputFormat

public TableInputFormat()
Method Detail

getRecordReader

public org.apache.hadoop.mapred.RecordReader<HStoreKey,org.apache.hadoop.io.MapWritable> getRecordReader(org.apache.hadoop.mapred.InputSplit split,
                                                                                                         org.apache.hadoop.mapred.JobConf job,
                                                                                                         org.apache.hadoop.mapred.Reporter reporter)
                                                                                                  throws IOException
Specified by:
getRecordReader in interface org.apache.hadoop.mapred.InputFormat<HStoreKey,org.apache.hadoop.io.MapWritable>
Throws:
IOException

getSplits

public org.apache.hadoop.mapred.InputSplit[] getSplits(org.apache.hadoop.mapred.JobConf job,
                                                       int numSplits)
                                                throws IOException
A split will be created for each HRegion of the input table

Specified by:
getSplits in interface org.apache.hadoop.mapred.InputFormat<HStoreKey,org.apache.hadoop.io.MapWritable>
Throws:
IOException
See Also:
InputFormat.getSplits(org.apache.hadoop.mapred.JobConf, int)

configure

public void configure(org.apache.hadoop.mapred.JobConf job)
Specified by:
configure in interface org.apache.hadoop.mapred.JobConfigurable

validateInput

public void validateInput(org.apache.hadoop.mapred.JobConf job)
                   throws IOException
Specified by:
validateInput in interface org.apache.hadoop.mapred.InputFormat<HStoreKey,org.apache.hadoop.io.MapWritable>
Throws:
IOException


Copyright © 2008 The Apache Software Foundation