org.apache.hadoop.mapreduce.lib.output

## Class TextOutputFormat<K,V>

- java.lang.Object
- - org.apache.hadoop.mapreduce.OutputFormat<K,V>
  - - org.apache.hadoop.mapreduce.lib.output.FileOutputFormat<K,V>
    - - org.apache.hadoop.mapreduce.lib.output.TextOutputFormat<K,V>

-     @InterfaceAudience.Public
       @InterfaceStability.Stable
      public class TextOutputFormat<K,V>
      extends FileOutputFormat<K,V>

  An `OutputFormat` that writes plain text files.

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `protected static class` | `TextOutputFormat.LineRecordWriter<K,V>`

    - ### Nested classes/interfaces inherited from class org.apache.hadoop.mapreduce.lib.output.FileOutputFormat

      `FileOutputFormat.Counter`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static String` | `SEPARATOR`
    `static String` | `SEPERATOR` Deprecated. Use `SEPARATOR`

    - ### Fields inherited from class org.apache.hadoop.mapreduce.lib.output.FileOutputFormat

      `BASE_OUTPUT_NAME, COMPRESS, COMPRESS_CODEC, COMPRESS_TYPE, OUTDIR, PART`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `TextOutputFormat()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `RecordWriter<K,V>` | `getRecordWriter(TaskAttemptContext job)` Get the `RecordWriter` for the given task.

    - ### Methods inherited from class org.apache.hadoop.mapreduce.lib.output.FileOutputFormat

      `checkOutputSpecs, getCompressOutput, getDefaultWorkFile, getOutputCommitter, getOutputCompressorClass, getOutputName, getOutputPath, getPathForWorkFile, getUniqueFile, getWorkOutputPath, setCompressOutput, setOutputCompressorClass, setOutputName, setOutputPath`

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

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

- - ### Field Detail

    - #### SEPARATOR

          public static String SEPARATOR

    - #### SEPERATOR

          @Deprecated
          public static String SEPERATOR

      Deprecated. Use `SEPARATOR`

  - ### Constructor Detail

    - #### TextOutputFormat

          public TextOutputFormat()

  - ### Method Detail

    - #### getRecordWriter

          public RecordWriter<K,V> getRecordWriter(TaskAttemptContext job)
                                            throws IOException,
                                                   InterruptedException

      Description copied from class: `OutputFormat`
      Get the `RecordWriter` for the given task.
      Specified by:
        `getRecordWriter` in class `FileOutputFormat<K,V>`
      Parameters:
        `job` - the information about the current task.
      Returns:
        a `RecordWriter` to write the output for the job.
      Throws:
        `IOException`
        `InterruptedException`

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