com.cloudera.crunch.io.avro
Class AvroFileSource<T>

java.lang.Object
  extended by com.cloudera.crunch.io.impl.FileSourceImpl<T>
      extended by com.cloudera.crunch.io.avro.AvroFileSource<T>
All Implemented Interfaces:
ReadableSource<T>, Source<T>

public class AvroFileSource<T>
extends FileSourceImpl<T>
implements ReadableSource<T>


Field Summary
 
Fields inherited from class com.cloudera.crunch.io.impl.FileSourceImpl
inputFormatClass, path, ptype
 
Constructor Summary
AvroFileSource(org.apache.hadoop.fs.Path path, AvroType<T> ptype)
           
 
Method Summary
 void configureSource(org.apache.hadoop.mapreduce.Job job, int inputId)
          Configure the given job to use this source as an input.
 Iterable<T> read(org.apache.hadoop.conf.Configuration conf)
           
 String toString()
           
 
Methods inherited from class com.cloudera.crunch.io.impl.FileSourceImpl
equals, getSize, getType, hashCode
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.cloudera.crunch.Source
getSize, getType
 

Constructor Detail

AvroFileSource

public AvroFileSource(org.apache.hadoop.fs.Path path,
                      AvroType<T> ptype)
Method Detail

toString

public String toString()
Overrides:
toString in class FileSourceImpl<T>

configureSource

public void configureSource(org.apache.hadoop.mapreduce.Job job,
                            int inputId)
                     throws IOException
Description copied from interface: Source
Configure the given job to use this source as an input.

Specified by:
configureSource in interface Source<T>
Overrides:
configureSource in class FileSourceImpl<T>
Parameters:
job - The job to configure
inputId - For a multi-input job, an identifier for this input to the job
Throws:
IOException

read

public Iterable<T> read(org.apache.hadoop.conf.Configuration conf)
                 throws IOException
Specified by:
read in interface ReadableSource<T>
Throws:
IOException


Copyright © 2012. All Rights Reserved.