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

DominantResourceCalculator#ratio calculation problem when right resource contains zero value

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Patch Available
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 3.0.0-alpha4
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None
    • Target Version/s:

      Description

      Currently DominantResourceCalculator#ratio may return wrong result when right resource contains zero value. For example, there are three resource types such as <memory-mb, vcores, vssd>, leftResource=<5, 5, 0> and rightResource=<10, 10, 0>, we expect the result of DominantResourceCalculator#ratio(leftResource, rightResource) is 0.5 but currently is NaN.
      There should be a verification before divide calculation to ensure that dividend is not zero.

        Attachments

        1. YARN-7461.004.patch
          4 kB
          Tao Yang
        2. YARN-7461.003.patch
          3 kB
          Tao Yang
        3. YARN-7461.002.patch
          2 kB
          Tao Yang
        4. YARN-7461.001.patch
          2 kB
          Tao Yang

          Activity

            People

            • Assignee:
              Tao Yang Tao Yang
              Reporter:
              Tao Yang Tao Yang
            • Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated: