org.apache.avro.mapred
Class AvroUtf8InputFormat

java.lang.Object
  extended by org.apache.hadoop.mapred.FileInputFormat<AvroWrapper<Utf8>,NullWritable>
      extended by org.apache.avro.mapred.AvroUtf8InputFormat
All Implemented Interfaces:
InputFormat<AvroWrapper<Utf8>,NullWritable>, JobConfigurable

public class AvroUtf8InputFormat
extends FileInputFormat<AvroWrapper<Utf8>,NullWritable>
implements JobConfigurable

An InputFormat for text files. Each line is a Utf8 key; values are null.


Field Summary
 
Fields inherited from class org.apache.hadoop.mapred.FileInputFormat
LOG
 
Constructor Summary
AvroUtf8InputFormat()
           
 
Method Summary
 void configure(JobConf conf)
           
 RecordReader<AvroWrapper<Utf8>,NullWritable> getRecordReader(InputSplit split, JobConf job, Reporter reporter)
           
protected  boolean isSplitable(FileSystem fs, Path file)
           
 
Methods inherited from class org.apache.hadoop.mapred.FileInputFormat
addInputPath, addInputPaths, computeSplitSize, getBlockIndex, getInputPathFilter, getInputPaths, getSplitHosts, getSplits, listStatus, setInputPathFilter, setInputPaths, setInputPaths, setMinSplitSize
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AvroUtf8InputFormat

public AvroUtf8InputFormat()
Method Detail

configure

public void configure(JobConf conf)
Specified by:
configure in interface JobConfigurable

isSplitable

protected boolean isSplitable(FileSystem fs,
                              Path file)
Overrides:
isSplitable in class FileInputFormat<AvroWrapper<Utf8>,NullWritable>

getRecordReader

public RecordReader<AvroWrapper<Utf8>,NullWritable> getRecordReader(InputSplit split,
                                                                    JobConf job,
                                                                    Reporter reporter)
                                                             throws IOException
Specified by:
getRecordReader in interface InputFormat<AvroWrapper<Utf8>,NullWritable>
Specified by:
getRecordReader in class FileInputFormat<AvroWrapper<Utf8>,NullWritable>
Throws:
IOException


Copyright © 2011 The Apache Software Foundation. All Rights Reserved.