@InterfaceAudience.Public @InterfaceStability.Stable public class FixedLengthInputFormat extends FileInputFormat<LongWritable,BytesWritable>
FixedLengthRecordReader| 修飾子とタイプ | フィールドと説明 | 
|---|---|
| static String | FIXED_RECORD_LENGTH | 
DEFAULT_LIST_STATUS_NUM_THREADS, INPUT_DIR, INPUT_DIR_RECURSIVE, LIST_STATUS_NUM_THREADS, NUM_INPUT_FILES, PATHFILTER_CLASS, SPLIT_MAXSIZE, SPLIT_MINSIZE| コンストラクタと説明 | 
|---|
| FixedLengthInputFormat() | 
| 修飾子とタイプ | メソッドと説明 | 
|---|---|
| RecordReader<LongWritable,BytesWritable> | createRecordReader(InputSplit split,
                  TaskAttemptContext context)Create a record reader for a given split. | 
| static int | getRecordLength(Configuration conf)Get record length value | 
| protected boolean | isSplitable(JobContext context,
           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, getFormatMinSplitSize, getInputDirRecursive, getInputPathFilter, getInputPaths, getMaxSplitSize, getMinSplitSize, getSplits, listStatus, makeSplit, makeSplit, setInputDirRecursive, setInputPathFilter, setInputPaths, setInputPaths, setMaxInputSplitSize, setMinInputSplitSizepublic 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 RecordReader<LongWritable,BytesWritable> createRecordReader(InputSplit split, TaskAttemptContext context) throws IOException, InterruptedException
InputFormatRecordReader.initialize(InputSplit, TaskAttemptContext) before
 the split is used.createRecordReader クラス内 InputFormat<LongWritable,BytesWritable>split - the split to be readcontext - the information about the taskIOExceptionInterruptedExceptionprotected boolean isSplitable(JobContext context, 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>context - the job contextfile - the file name to checkCopyright © 2016 Apache Software Foundation. All rights reserved.