org.apache.hadoop.mapred
Class TextInputFormat
java.lang.Object
org.apache.hadoop.mapred.InputFormatBase
org.apache.hadoop.mapred.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..
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TextInputFormat
public TextInputFormat()
getRecordReader
public RecordReader getRecordReader(FileSystem fs,
FileSplit split,
JobConf job,
Reporter reporter)
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
- Parameters:
fs
- the FileSystem
split
- the FileSplit
job
- the job that this split belongs to
- Returns:
- a
RecordReader
- Throws:
IOException
Copyright © 2006 The Apache Software Foundation