com.cloudera.crunch.type.avro
Class AvroUtf8InputFormat

java.lang.Object
  extended by org.apache.hadoop.mapreduce.InputFormat<K,V>
      extended by org.apache.hadoop.mapreduce.lib.input.FileInputFormat<org.apache.avro.mapred.AvroWrapper<org.apache.avro.util.Utf8>,org.apache.hadoop.io.NullWritable>
          extended by com.cloudera.crunch.type.avro.AvroUtf8InputFormat

public class AvroUtf8InputFormat
extends org.apache.hadoop.mapreduce.lib.input.FileInputFormat<org.apache.avro.mapred.AvroWrapper<org.apache.avro.util.Utf8>,org.apache.hadoop.io.NullWritable>

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


Constructor Summary
AvroUtf8InputFormat()
           
 
Method Summary
 void configure(org.apache.hadoop.conf.Configuration conf)
           
 org.apache.hadoop.mapreduce.RecordReader<org.apache.avro.mapred.AvroWrapper<org.apache.avro.util.Utf8>,org.apache.hadoop.io.NullWritable> createRecordReader(org.apache.hadoop.mapreduce.InputSplit split, org.apache.hadoop.mapreduce.TaskAttemptContext context)
           
protected  boolean isSplitable(org.apache.hadoop.fs.FileSystem fs, org.apache.hadoop.fs.Path file)
           
 
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

AvroUtf8InputFormat

public AvroUtf8InputFormat()
Method Detail

configure

public void configure(org.apache.hadoop.conf.Configuration conf)

isSplitable

protected boolean isSplitable(org.apache.hadoop.fs.FileSystem fs,
                              org.apache.hadoop.fs.Path file)

createRecordReader

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


Copyright © 2012. All Rights Reserved.