public class TextInputFormat extends FileInputFormat<LongWritable,Text>
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..FileInputFormat.Counter| 构造器和说明 |
|---|
TextInputFormat() |
| 限定符和类型 | 方法和说明 |
|---|---|
RecordReader<LongWritable,Text> |
createRecordReader(InputSplit split,
TaskAttemptContext context)
Create a record reader for a given split.
|
protected boolean |
isSplitable(JobContext context,
Path file)
Is the given filename splitable?
|
addInputPath, addInputPaths, computeSplitSize, getBlockIndex, getFormatMinSplitSize, getInputPathFilter, getInputPaths, getMaxSplitSize, getMinSplitSize, getSplits, listStatus, setInputPathFilter, setInputPaths, setInputPaths, setMaxInputSplitSize, setMinInputSplitSizepublic RecordReader<LongWritable,Text> createRecordReader(InputSplit split, TaskAttemptContext context)
InputFormatRecordReader.initialize(InputSplit, TaskAttemptContext) before
the split is used.createRecordReader 在类中 InputFormat<LongWritable,Text>split - the split to be readcontext - the information about the taskprotected boolean isSplitable(JobContext context, Path file)
FileInputFormatFileInputFormat implementations can override this and return
false to ensure that individual input files are never split-up
so that Mappers process entire files.isSplitable 在类中 FileInputFormat<LongWritable,Text>context - the job contextfile - the file name to checkCopyright © 2009 The Apache Software Foundation