Hadoop Map/Reduce
  1. Hadoop Map/Reduce
  2. MAPREDUCE-5979

FairScheduler: zero weight can cause sort failures

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major 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!

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

        Activity

        Anubhav Dhoot created issue -
        Anubhav Dhoot made changes -
        Field Original Value New Value
        Assignee Anubhav Dhoot [ adhoot ]
        Hide
        Anubhav Dhoot added a comment -

        Uploading a patch which prevents divide by zero weight and unit test that verifies that.

        Show
        Anubhav Dhoot added a comment - Uploading a patch which prevents divide by zero weight and unit test that verifies that.
        Anubhav Dhoot made changes -
        Status Open [ 1 ] Patch Available [ 10002 ]
        Anubhav Dhoot made changes -
        Attachment MAPREDUCE-5979.001.patch [ 12656394 ]
        Hide
        Hadoop QA added a comment -

        -1 overall. Here are the results of testing the latest attachment
        http://issues.apache.org/jira/secure/attachment/12656394/MAPREDUCE-5979.001.patch
        against trunk revision .

        -1 patch. The patch command could not apply the patch.

        Console output: https://builds.apache.org/job/PreCommit-MAPREDUCE-Build/4753//console

        This message is automatically generated.

        Show
        Hadoop QA added a comment - -1 overall . Here are the results of testing the latest attachment http://issues.apache.org/jira/secure/attachment/12656394/MAPREDUCE-5979.001.patch against trunk revision . -1 patch . The patch command could not apply the patch. Console output: https://builds.apache.org/job/PreCommit-MAPREDUCE-Build/4753//console This message is automatically generated.
        Hide
        Anubhav Dhoot added a comment -

        Instead of using a min weight for zero weight, a simpler approach where we use infinite ratio for any number of running tasks (including zero) when weight is zero.

        Show
        Anubhav Dhoot added a comment - Instead of using a min weight for zero weight, a simpler approach where we use infinite ratio for any number of running tasks (including zero) when weight is zero.
        Anubhav Dhoot made changes -
        Attachment MAPREDUCE-5979.002.patch [ 12657016 ]
        Hide
        Hadoop QA added a comment -

        -1 overall. Here are the results of testing the latest attachment
        http://issues.apache.org/jira/secure/attachment/12657016/MAPREDUCE-5979.002.patch
        against trunk revision .

        -1 patch. The patch command could not apply the patch.

        Console output: https://builds.apache.org/job/PreCommit-MAPREDUCE-Build/4758//console

        This message is automatically generated.

        Show
        Hadoop QA added a comment - -1 overall . Here are the results of testing the latest attachment http://issues.apache.org/jira/secure/attachment/12657016/MAPREDUCE-5979.002.patch against trunk revision . -1 patch . The patch command could not apply the patch. Console output: https://builds.apache.org/job/PreCommit-MAPREDUCE-Build/4758//console This message is automatically generated.
        Hide
        Karthik Kambatla (Inactive) added a comment -

        +1

        Show
        Karthik Kambatla (Inactive) added a comment - +1
        Karthik Kambatla (Inactive) made changes -
        Summary MR1 FairScheduler zero weight can cause sort failures FairScheduler: zero weight can cause sort failures
        Hide
        Karthik Kambatla (Inactive) added a comment -

        Thanks Anubhav. Just committed this to branch-1.

        Show
        Karthik Kambatla (Inactive) added a comment - Thanks Anubhav. Just committed this to branch-1.
        Karthik Kambatla (Inactive) made changes -
        Status Patch Available [ 10002 ] Resolved [ 5 ]
        Hadoop Flags Reviewed [ 10343 ]
        Fix Version/s 1.3.0 [ 12324153 ]
        Resolution Fixed [ 1 ]
        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Open Open Patch Available Patch Available
        20m 26s 1 Anubhav Dhoot 18/Jul/14 00:30
        Patch Available Patch Available Resolved Resolved
        4d 23h 34m 1 Karthik Kambatla (Inactive) 23/Jul/14 00:04

          People

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

            Dates

            • Created:
              Updated:
              Resolved:

              Development