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

Misuse of format specifier in Preconditions.checkArgument

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Trivial
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.9.0, 3.0.0-alpha2
    • Component/s: None
    • Labels:
      None
    • Hadoop Flags:
      Reviewed

      Description

      RMAdminCLI.java

       int nLabels = map.get(nodeId).size();
            Preconditions.checkArgument(nLabels <= 1, "%d labels specified on host=%s"
                + ", please note that we do not support specifying multiple"
                + " labels on a single host for now.", nLabels, nodeIdStr);
      

      The %d should be replaced with %s, per

      https://google.github.io/guava/releases/19.0/api/docs/com/google/common/base/Preconditions.html

        Activity

        Hide
        hudson Hudson added a comment -

        FAILURE: Integrated in Jenkins build Hadoop-trunk-Commit #11096 (See https://builds.apache.org/job/Hadoop-trunk-Commit/11096/)
        YARN-6073. Misuse of format specifier in Preconditions.checkArgument (templedf: rev 6332a318bc1e2e9d73d7159eab26347bb3f1f9b3)

        • (edit) hadoop-yarn-project/hadoop-yarn/hadoop-yarn-client/src/main/java/org/apache/hadoop/yarn/client/cli/RMAdminCLI.java
        Show
        hudson Hudson added a comment - FAILURE: Integrated in Jenkins build Hadoop-trunk-Commit #11096 (See https://builds.apache.org/job/Hadoop-trunk-Commit/11096/ ) YARN-6073 . Misuse of format specifier in Preconditions.checkArgument (templedf: rev 6332a318bc1e2e9d73d7159eab26347bb3f1f9b3) (edit) hadoop-yarn-project/hadoop-yarn/hadoop-yarn-client/src/main/java/org/apache/hadoop/yarn/client/cli/RMAdminCLI.java
        Hide
        templedf Daniel Templeton added a comment -

        Thanks for the patch, Yuanbo Liu, and, Yongjun Zhang, for filing the issue. Committed to trunk and branch-2. Congrats on your first commit, Yuanbo Liu!

        Show
        templedf Daniel Templeton added a comment - Thanks for the patch, Yuanbo Liu , and, Yongjun Zhang , for filing the issue. Committed to trunk and branch-2. Congrats on your first commit, Yuanbo Liu !
        Hide
        yuanbo Yuanbo Liu added a comment -

        Daniel Templeton Thanks for your review.

        Show
        yuanbo Yuanbo Liu added a comment - Daniel Templeton Thanks for your review.
        Hide
        templedf Daniel Templeton added a comment -

        Patch looks good to me. +1

        Show
        templedf Daniel Templeton added a comment - Patch looks good to me. +1
        Hide
        yuanbo Yuanbo Liu added a comment -

        upload v1 patch for this JIRA.

        Show
        yuanbo Yuanbo Liu added a comment - upload v1 patch for this JIRA.
        Hide
        yzhangal Yongjun Zhang added a comment -

        Sure Yuanbo Liu, seems someone need to help to add your name to YARN contributer list before your name can be assigned to (I tried and could not).

        Show
        yzhangal Yongjun Zhang added a comment - Sure Yuanbo Liu , seems someone need to help to add your name to YARN contributer list before your name can be assigned to (I tried and could not).
        Hide
        yuanbo Yuanbo Liu added a comment -

        This JIRA can be my good start of first patch for YARN.
        Yongjun Zhang Would you mind assigning this JIRA for me, since I don't have the privilege to assign YARN JIRA to myself.

        Show
        yuanbo Yuanbo Liu added a comment - This JIRA can be my good start of first patch for YARN. Yongjun Zhang Would you mind assigning this JIRA for me, since I don't have the privilege to assign YARN JIRA to myself.

          People

          • Assignee:
            yuanbo Yuanbo Liu
            Reporter:
            yzhangal Yongjun Zhang
          • Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development