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

        Attachments

          Activity

            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: