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

YARN API ResourceUtils's getRequestedResourcesFromConfig doesn't recognize yarn.io/gpu as a valid resource

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.3.0, 3.2.2, 2.10.1, 3.4.0, 3.1.5
    • Component/s: api
    • Labels:
      None

      Description

      The original issue was the jobclient test did not send the requested resource type, when specified in the command line eg:

      hadoop jar hadoop-mapreduce-client-jobclient-tests.jar sleep -Dmapreduce.reduce.resource.yarn.io/gpu=1  -m 10 -r 1 -mt 90000
      

      After some investigation, it turned out it only affects resource types with name containing '.' characters. And the root cause is regexp from the getRequestedResourcesFromConfig method.

      "^" + Pattern.quote(prefix) + "[^.]+$"
      

      This regexp explicitly forbids any dots in the resource type name, which is inconsistent with the default resource type for gpu and fpga, which are yarn.io/gpu and yarn.io/fpga respectively.

        Attachments

        1. YARN-9444.branch-2.10.003.patch
          4 kB
          Eric Payne
        2. YARN-9444.003.patch
          4 kB
          Gergely Pollak
        3. YARN-9444.002.patch
          4 kB
          Gergely Pollak
        4. YARN-9444.001.patch
          3 kB
          Gergely Pollak

          Activity

            People

            • Assignee:
              shuzirra Gergely Pollak
              Reporter:
              shuzirra Gergely Pollak
            • Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: