Uploaded image for project: 'Hadoop Map/Reduce'
  1. Hadoop Map/Reduce
  2. MAPREDUCE-5979

FairScheduler: zero weight can cause sort failures

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.2.1
    • Fix Version/s: 1.3.0
    • Component/s: scheduler
    • Labels:
      None
    • Hadoop Flags:
      Reviewed

      Description

      When the weight is set to zero (which is possible with a custom weight adjuster) we can get failures in comparing schedulables.
      This is because when calculating running tasks to weight ratio could result in a 0.0/0.0 which ends up as NaN. Comparisons with NaN are undefined such that (int)Math.signum(NaN - anyNumber) will be 0 causing different criteria to be used in comparison which may not be consistent. This will result in
      IllegalArgumentException: Comparison method violates its general contract!

        Attachments

        1. MAPREDUCE-5979.001.patch
          5 kB
          Anubhav Dhoot
        2. MAPREDUCE-5979.002.patch
          5 kB
          Anubhav Dhoot

          Activity

            People

            • Assignee:
              adhoot Anubhav Dhoot
              Reporter:
              adhoot Anubhav Dhoot
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: