org.apache.hadoop.mapred

## Class SequenceFileAsTextInputFormat

- java.lang.Object
- - org.apache.hadoop.mapred.FileInputFormat<K,V>
  - - org.apache.hadoop.mapred.SequenceFileInputFormat<org.apache.hadoop.io.Text,org.apache.hadoop.io.Text>
    - - org.apache.hadoop.mapred.SequenceFileAsTextInputFormat

- All Implemented Interfaces:
    InputFormat<org.apache.hadoop.io.Text,org.apache.hadoop.io.Text>

      @InterfaceAudience.Public
       @InterfaceStability.Stable
      public class SequenceFileAsTextInputFormat
      extends SequenceFileInputFormat<org.apache.hadoop.io.Text,org.apache.hadoop.io.Text>

  This class is similar to SequenceFileInputFormat, except it generates SequenceFileAsTextRecordReader which converts the input keys and values to their String forms by calling toString() method.

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from class org.apache.hadoop.mapred.FileInputFormat

      `FileInputFormat.Counter`

  - ### Field Summary

    - ### Fields inherited from class org.apache.hadoop.mapred.FileInputFormat

      `INPUT_DIR_NONRECURSIVE_IGNORE_SUBDIRS, INPUT_DIR_RECURSIVE, LOG, NUM_INPUT_FILES`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `SequenceFileAsTextInputFormat()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `RecordReader<org.apache.hadoop.io.Text,org.apache.hadoop.io.Text>` | `getRecordReader(InputSplit split, JobConf job, Reporter reporter)` Get the `RecordReader` for the given `InputSplit`.

    - ### Methods inherited from class org.apache.hadoop.mapred.SequenceFileInputFormat

      `listStatus`

    - ### Methods inherited from class org.apache.hadoop.mapred.FileInputFormat

      `addInputPath, addInputPathRecursively, addInputPaths, computeSplitSize, getBlockIndex, getInputPathFilter, getInputPaths, getSplitHosts, getSplits, isSplitable, makeSplit, makeSplit, setInputPathFilter, setInputPaths, setInputPaths, setMinSplitSize`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### SequenceFileAsTextInputFormat

          public SequenceFileAsTextInputFormat()

  - ### Method Detail

    - #### getRecordReader

          public RecordReader<org.apache.hadoop.io.Text,org.apache.hadoop.io.Text> getRecordReader(InputSplit split,
                                                                                                   JobConf job,
                                                                                                   Reporter reporter)
                                                                                            throws IOException

      Description copied from interface: `InputFormat`
      Get the `RecordReader` 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.

      Specified by:
        `getRecordReader` in interface `InputFormat<org.apache.hadoop.io.Text,org.apache.hadoop.io.Text>`
      Overrides:
        `getRecordReader` in class `SequenceFileInputFormat<org.apache.hadoop.io.Text,org.apache.hadoop.io.Text>`
      Parameters:
        `split` - the `InputSplit`
        `job` - the job that this split belongs to
      Returns:
        a `RecordReader`
      Throws:
        `IOException`

Copyright © 2008–2022 Apache Software Foundation. All rights reserved.