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

Improve toString implementation for PBImpls

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.0.4-alpha
    • Fix Version/s: 2.1.0-beta
    • Component/s: None
    • Labels:
      None
    • Target Version/s:
    • Hadoop Flags:
      Reviewed

      Description

      The generic toString implementation that is used in most of the PBImpls

      getProto().toString().replaceAll("\\n", ", ").replaceAll("\\s+", " ");

      is rather inefficient - replacing "\n" and "\s" to generate a one line string. Instead, we can use

      TextFormat.shortDebugString(getProto());

      .

      If we can get this into 2.1.0 - great, otherwise the next release.

        Attachments

        1. YARN-1045.patch
          76 kB
          Jian He
        2. YARN-1045.1.patch
          82 kB
          Jian He

          Issue Links

            Activity

              People

              • Assignee:
                jianhe Jian He
                Reporter:
                sseth Siddharth Seth
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: