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

Use StandardCharsets instead of String overload in TextOutputFormat

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • None
    • 2.8.0, 3.0.0-alpha1
    • None
    • None
    • 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

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

              Dates

                Created:
                Updated:
                Resolved: