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

    • Improvement
    • Status: Resolved
    • Trivial
    • Resolution: Fixed
    • None
    • 3.3.0
    • None
    • None
    • 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

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

            Dates

              Created:
              Updated:
              Resolved: