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

Replace GpuDiscoverer.getInstance() to a readable object for easy access control

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.3.0, 3.2.1, 3.1.3
    • Component/s: None
    • Labels:
      None
    • Hadoop Flags:
      Reviewed

      Description

      The clients of GpuDiscoverer are very hard to test as they call GpuDiscoverer.getInstance() internally.
      For example, writing tests for org.apache.hadoop.yarn.server.nodemanager.containermanager.resourceplugin.gpu.GpuResourcePlugin#getNMResourceInfo is quite hard as the GpuDeviceInformation returned by GpuDiscoverer is not interchangeable as GpuDiscoverer is not mockable since we cannot inject it in tests.

        Attachments

        1. YARN-9121.001.patch
          15 kB
          Szilard Nemeth
        2. YARN-9121.002.patch
          15 kB
          Szilard Nemeth
        3. YARN-9121.003.patch
          15 kB
          Szilard Nemeth
        4. YARN-9121.branch-3.1.003.patch
          16 kB
          Szilard Nemeth
        5. YARN-9121.branch-3.1.004.patch
          15 kB
          Szilard Nemeth
        6. YARN-9121.branch-3.2.001.patch
          16 kB
          Szilard Nemeth
        7. YARN-9121.branch-3.2.003.patch
          16 kB
          Szilard Nemeth
        8. YARN-9121-branch-3.1.001.patch
          16 kB
          Szilard Nemeth

          Issue Links

            Activity

              People

              • Assignee:
                snemeth Szilard Nemeth
                Reporter:
                snemeth Szilard Nemeth
              • Votes:
                0 Vote for this issue
                Watchers:
                6 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: