Uploaded image for project: 'Hadoop Map/Reduce'
  1. Hadoop Map/Reduce
  2. MAPREDUCE-6730

Use StandardCharsets instead of String overload in TextOutputFormat

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.8.0, 3.0.0-alpha1
    • Component/s: None
    • Labels:
      None
    • Hadoop Flags:
      Reviewed

      Description

      In TextOutputFormat.java, instead of:

      private static final String utf8 = "UTF-8";
      private static final byte[] newline;
      static {
        try {
          newline = "\n".getBytes(utf8);
        } catch (UnsupportedException uee) {
          threw new IllegalArgumentException("can't find " + utf8 + " encoding");
        }
      }
      

      Let's do something like:

      private static final byte[] newline = "\n".getBytes(StandardCharsets.UTF_8);
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                ssk Sahil Kang
                Reporter:
                ssk Sahil Kang
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: