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

Misuse of format specifier in Preconditions.checkArgument

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Trivial
    • Resolution: Fixed
    • None
    • 2.9.0, 3.0.0-alpha2
    • None
    • None
    • 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

        1. YARN-6073.001.patch
          1.0 kB
          Yuanbo Liu

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: