Uploaded image for project: 'Hadoop YARN'
  1. Hadoop YARN
  2. YARN-8975

[Submarine] Use predefined Charset object StandardCharsets.UTF_8 instead of String "UTF-8"

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Trivial
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.3.0
    • Component/s: None
    • Labels:
      None
    • Hadoop Flags:
      Reviewed

      Description

      Writer w = new OutputStreamWriter(new FileOutputStream(file), "UTF-8");

      Could be refactored to this to improve a little bit performance due to avoid string lookup:

      Writer w = new OutputStreamWriter(new FileOutputStream(file), StandardCharsets.UTF_8);

        Attachments

        1. YARN-8975-trunk.001.patch
          1 kB
          Zhankun Tang
        2. YARN-8975-trunk.002.patch
          1 kB
          Zhankun Tang

          Activity

            People

            • Assignee:
              tangzhankun Zhankun Tang
              Reporter:
              tangzhankun Zhankun Tang
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: