org.apache.nutch.mapReduce
Class TextInputFormat

java.lang.Object
  extended byorg.apache.nutch.mapReduce.InputFormatBase
      extended byorg.apache.nutch.mapReduce.TextInputFormat
All Implemented Interfaces:
InputFormat

public class TextInputFormat
extends InputFormatBase

An InputFormat for plain text files. Files are broken into lines. Either linefeed or carriage-return are used to signal end of line. Keys are the position in the file, and values are the line of text..


Constructor Summary
TextInputFormat()
           
 
Method Summary
 String getName()
          The name of this input format.
 RecordReader getRecordReader(NutchFileSystem fs, FileSplit split, JobConf job)
          Construct a RecordReader for a FileSplit.
 
Methods inherited from class org.apache.nutch.mapReduce.InputFormatBase
getSplits, listFiles
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TextInputFormat

public TextInputFormat()
Method Detail

getName

public String getName()
Description copied from interface: InputFormat
The name of this input format.

Specified by:
getName in interface InputFormat
Specified by:
getName in class InputFormatBase

getRecordReader

public RecordReader getRecordReader(NutchFileSystem fs,
                                    FileSplit split,
                                    JobConf job)
                             throws IOException
Description copied from interface: InputFormat
Construct a RecordReader for a FileSplit.

Specified by:
getRecordReader in interface InputFormat
Specified by:
getRecordReader in class InputFormatBase
Throws:
IOException


Copyright © 2006 The Apache Software Foundation