com.datasalt.pangool.tuplemr.mapred.lib.input
Class TupleInputFormat

java.lang.Object
  extended by org.apache.hadoop.mapreduce.InputFormat<K,V>
      extended by org.apache.hadoop.mapreduce.lib.input.FileInputFormat<ITuple,org.apache.hadoop.io.NullWritable>
          extended by com.datasalt.pangool.tuplemr.mapred.lib.input.TupleInputFormat
All Implemented Interfaces:
Serializable

public class TupleInputFormat
extends org.apache.hadoop.mapreduce.lib.input.FileInputFormat<ITuple,org.apache.hadoop.io.NullWritable>
implements Serializable

An InputFormat for reading TupleFiles containing ITuple

If a particular "Target Schema" is specified, it will be used as the Schema for the returned Tuples, trying to preserve backwards compatibility always when possible. Otherwise the Schema written in the Tuple File is read from its header and used.

See Also:
Serialized Form

Constructor Summary
TupleInputFormat()
           
TupleInputFormat(Schema targetSchema)
           
 
Method Summary
 org.apache.hadoop.mapreduce.RecordReader<ITuple,org.apache.hadoop.io.NullWritable> createRecordReader(org.apache.hadoop.mapreduce.InputSplit split, org.apache.hadoop.mapreduce.TaskAttemptContext context)
           
 
Methods inherited from class org.apache.hadoop.mapreduce.lib.input.FileInputFormat
addInputPath, addInputPaths, computeSplitSize, getBlockIndex, getFormatMinSplitSize, getInputPathFilter, getInputPaths, getMaxSplitSize, getMinSplitSize, getSplits, isSplitable, listStatus, setInputPathFilter, setInputPaths, setInputPaths, setMaxInputSplitSize, setMinInputSplitSize
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TupleInputFormat

public TupleInputFormat(Schema targetSchema)

TupleInputFormat

public TupleInputFormat()
Method Detail

createRecordReader

public org.apache.hadoop.mapreduce.RecordReader<ITuple,org.apache.hadoop.io.NullWritable> createRecordReader(org.apache.hadoop.mapreduce.InputSplit split,
                                                                                                             org.apache.hadoop.mapreduce.TaskAttemptContext context)
                                                                                                      throws IOException
Specified by:
createRecordReader in class org.apache.hadoop.mapreduce.InputFormat<ITuple,org.apache.hadoop.io.NullWritable>
Throws:
IOException


Copyright © –2014 Datasalt Systems S.L.. All rights reserved.