Class SequenceFileInputFormat<K,V>
java.lang.Object
org.apache.hadoop.mapreduce.InputFormat<K,V>
org.apache.hadoop.mapreduce.lib.input.FileInputFormat<K,V>
org.apache.hadoop.mapreduce.lib.input.SequenceFileInputFormat<K,V>
- Direct Known Subclasses:
SequenceFileAsBinaryInputFormat,SequenceFileAsTextInputFormat,SequenceFileInputFilter
An
InputFormat for SequenceFiles.-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.hadoop.mapreduce.lib.input.FileInputFormat
FileInputFormat.Counter -
Field Summary
Fields inherited from class org.apache.hadoop.mapreduce.lib.input.FileInputFormat
DEFAULT_LIST_STATUS_NUM_THREADS, INPUT_DIR, INPUT_DIR_NONRECURSIVE_IGNORE_SUBDIRS, INPUT_DIR_RECURSIVE, LIST_STATUS_NUM_THREADS, NUM_INPUT_FILES, PATHFILTER_CLASS, SPLIT_MAXSIZE, SPLIT_MINSIZE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreateRecordReader(InputSplit split, TaskAttemptContext context) Create a record reader for a given split.protected longGet the lower bound on split size imposed by the format.protected List<FileStatus>listStatus(JobContext job) List input directories.Methods inherited from class org.apache.hadoop.mapreduce.lib.input.FileInputFormat
addInputPath, addInputPathRecursively, addInputPaths, computeSplitSize, getBlockIndex, getInputDirRecursive, getInputPathFilter, getInputPaths, getMaxSplitSize, getMinSplitSize, getSplits, isSplitable, makeSplit, makeSplit, setInputDirRecursive, setInputPathFilter, setInputPaths, setInputPaths, setMaxInputSplitSize, setMinInputSplitSize, shrinkStatus
-
Constructor Details
-
SequenceFileInputFormat
public SequenceFileInputFormat()
-
-
Method Details
-
createRecordReader
public RecordReader<K,V> createRecordReader(InputSplit split, TaskAttemptContext context) throws IOException Description copied from class:InputFormatCreate a record reader for a given split. The framework will callRecordReader.initialize(InputSplit, TaskAttemptContext)before the split is used.- Specified by:
createRecordReaderin classInputFormat<K,V> - Parameters:
split- the split to be readcontext- the information about the task- Returns:
- a new record reader
- Throws:
IOException
-
getFormatMinSplitSize
protected long getFormatMinSplitSize()Description copied from class:FileInputFormatGet the lower bound on split size imposed by the format.- Overrides:
getFormatMinSplitSizein classFileInputFormat<K,V> - Returns:
- the number of bytes of the minimal split for this format
-
listStatus
Description copied from class:FileInputFormatList input directories. Subclasses may override to, e.g., select only files matching a regular expression. If security is enabled, this method collects delegation tokens from the input paths and adds them to the job's credentials.- Overrides:
listStatusin classFileInputFormat<K,V> - Parameters:
job- the job to list input paths for and attach tokens to.- Returns:
- array of FileStatus objects
- Throws:
IOException- if zero items.
-