@InterfaceAudience.Public @InterfaceStability.Stable public class NLineInputFormat extends FileInputFormat<LongWritable,Text> implements JobConfigurable
INPUT_DIR_RECURSIVE, LOG, NUM_INPUT_FILES| コンストラクタと説明 | 
|---|
| NLineInputFormat() | 
| 修飾子とタイプ | メソッドと説明 | 
|---|---|
| void | configure(JobConf conf)Initializes a new instance from a  JobConf. | 
| protected static FileSplit | createFileSplit(Path fileName,
               long begin,
               long length)NLineInputFormat uses LineRecordReader, which always reads
 (and consumes) at least one character out of its upper split
 boundary. | 
| RecordReader<LongWritable,Text> | getRecordReader(InputSplit genericSplit,
               JobConf job,
               Reporter reporter)Get the  RecordReaderfor the givenInputSplit. | 
| InputSplit[] | getSplits(JobConf job,
         int numSplits)Logically splits the set of input files for the job, splits N lines
 of the input as one split. | 
addInputPath, addInputPathRecursively, addInputPaths, computeSplitSize, getBlockIndex, getInputPathFilter, getInputPaths, getSplitHosts, isSplitable, listStatus, makeSplit, makeSplit, setInputPathFilter, setInputPaths, setInputPaths, setMinSplitSizepublic NLineInputFormat()
public RecordReader<LongWritable,Text> getRecordReader(InputSplit genericSplit, JobConf job, Reporter reporter) throws IOException
InputFormatRecordReader for the given InputSplit.
 It is the responsibility of the RecordReader to respect
 record boundaries while processing the logical split to present a 
 record-oriented view to the individual task.
getRecordReader インタフェース内 InputFormat<LongWritable,Text>getRecordReader クラス内 FileInputFormat<LongWritable,Text>genericSplit - the InputSplitjob - the job that this split belongs toRecordReaderIOExceptionpublic InputSplit[] getSplits(JobConf job, int numSplits) throws IOException
getSplits インタフェース内 InputFormat<LongWritable,Text>getSplits クラス内 FileInputFormat<LongWritable,Text>job - job configuration.numSplits - the desired number of splits, a hint.InputSplits for the job.IOExceptionFileInputFormat.getSplits(JobConf, int)public void configure(JobConf conf)
JobConfigurableJobConf.configure インタフェース内 JobConfigurableconf - the configurationprotected static FileSplit createFileSplit(Path fileName, long begin, long length)
fileName - Path of filebegin - the position of the first byte in the file to processlength - number of bytes in InputSplitCopyright © 2016 Apache Software Foundation. All rights reserved.