This project has retired. For details please refer to its Attic page.
TextFileSource (Apache Crunch 0.3.0-incubating API)

org.apache.crunch.io.text
Class TextFileSource<T>

java.lang.Object
  extended by org.apache.crunch.io.impl.FileSourceImpl<T>
      extended by org.apache.crunch.io.text.TextFileSource<T>
All Implemented Interfaces:
ReadableSource<T>, Source<T>

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


Constructor Summary
TextFileSource(org.apache.hadoop.fs.Path path, PType<T> ptype)
           
 
Method Summary
 long getSize(org.apache.hadoop.conf.Configuration conf)
          Returns the number of bytes in this Source.
 Iterable<T> read(org.apache.hadoop.conf.Configuration conf)
           
 String toString()
           
 
Methods inherited from class org.apache.crunch.io.impl.FileSourceImpl
configureSource, equals, getType, hashCode
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.apache.crunch.Source
configureSource, getType
 

Constructor Detail

TextFileSource

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

getSize

public long getSize(org.apache.hadoop.conf.Configuration conf)
Description copied from interface: Source
Returns the number of bytes in this Source.

Specified by:
getSize in interface Source<T>
Overrides:
getSize in class FileSourceImpl<T>

toString

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

read

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


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