@InterfaceAudience.Public @InterfaceStability.Stable public class FixedLengthInputFormat extends FileInputFormat<LongWritable,BytesWritable> implements JobConfigurable
FixedLengthRecordReader| 修飾子とタイプ | フィールドと説明 | 
|---|---|
| static String | FIXED_RECORD_LENGTH | 
INPUT_DIR_RECURSIVE, LOG, NUM_INPUT_FILES| コンストラクタと説明 | 
|---|
| FixedLengthInputFormat() | 
| 修飾子とタイプ | メソッドと説明 | 
|---|---|
| void | configure(JobConf conf)Initializes a new instance from a  JobConf. | 
| static int | getRecordLength(Configuration conf)Get record length value | 
| RecordReader<LongWritable,BytesWritable> | getRecordReader(InputSplit genericSplit,
               JobConf job,
               Reporter reporter)Get the  RecordReaderfor the givenInputSplit. | 
| protected boolean | isSplitable(FileSystem fs,
           Path file)Is the given filename splittable? | 
| static void | setRecordLength(Configuration conf,
               int recordLength)Set the length of each record | 
addInputPath, addInputPathRecursively, addInputPaths, computeSplitSize, getBlockIndex, getInputPathFilter, getInputPaths, getSplitHosts, getSplits, listStatus, makeSplit, makeSplit, setInputPathFilter, setInputPaths, setInputPaths, setMinSplitSizepublic static final String FIXED_RECORD_LENGTH
public FixedLengthInputFormat()
public static void setRecordLength(Configuration conf, int recordLength)
conf - configurationrecordLength - the length of a recordpublic static int getRecordLength(Configuration conf)
conf - configurationpublic void configure(JobConf conf)
JobConfigurableJobConf.configure インタフェース内 JobConfigurableconf - the configurationpublic RecordReader<LongWritable,BytesWritable> 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,BytesWritable>getRecordReader クラス内 FileInputFormat<LongWritable,BytesWritable>genericSplit - the InputSplitjob - the job that this split belongs toRecordReaderIOExceptionprotected boolean isSplitable(FileSystem fs, Path file)
FileInputFormatFileInputFormat always returns
 true. Implementations that may deal with non-splittable files must
 override this method.
 FileInputFormat 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,BytesWritable>fs - the file system that the file is onfile - the file name to checkCopyright © 2016 Apache Software Foundation. All rights reserved.