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

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 3.3.0, 3.2.1, 3.1.3
    • None
    • None
    • 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-branch-3.1.001.patch
          16 kB
          Szilard Nemeth
        2. YARN-9121.branch-3.2.003.patch
          16 kB
          Szilard Nemeth
        3. YARN-9121.branch-3.2.001.patch
          16 kB
          Szilard Nemeth
        4. YARN-9121.branch-3.1.004.patch
          15 kB
          Szilard Nemeth
        5. YARN-9121.branch-3.1.003.patch
          16 kB
          Szilard Nemeth
        6. YARN-9121.003.patch
          15 kB
          Szilard Nemeth
        7. YARN-9121.002.patch
          15 kB
          Szilard Nemeth
        8. YARN-9121.001.patch
          15 kB
          Szilard Nemeth

        Issue Links

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved: