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

MR1 FairScheduler use of custom weight adjuster is not thread safe for comparisons

    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
    • Target Version/s:
    • Hadoop Flags:
      Reviewed

      Description

      When comparing JobSchedulables one of the factors is the weight. If someone uses a custom weight adjuster, that may be called multiple times during a sort causing different values to return. That causes a failure in sorting because the weight may change during the sort.

      This reproes as

      java.io.IOException: java.lang.IllegalArgumentException: Comparison method violates its general contract!
      at java.util.TimSort.mergeHi(TimSort.java:868)
      at java.util.TimSort.mergeAt(TimSort.java:485)
      at java.util.TimSort.mergeCollapse(TimSort.java:410)
      at java.util.TimSort.sort(TimSort.java:214)
      at java.util.TimSort.sort(TimSort.java:173)
      at java.util.Arrays.sort(Arrays.java:659)
      at java.util.Collections.sort(Collections.java:217)
      at org.apache.hadoop.mapred.PoolSchedulable.assignTask(PoolSchedulable.java:163)
      at org.apache.hadoop.mapred.FairScheduler.assignTasks(FairScheduler.java:499)
      at org.apache.hadoop.mapred.JobTracker.heartbeat(JobTracker.java:2961)
      
      1. mr-5966-3.patch
        8 kB
        Karthik Kambatla
      2. MAPREDUCE-5966.002.patch
        9 kB
        Anubhav Dhoot
      3. MAPREDUCE-5966.001.patch
        8 kB
        Anubhav Dhoot

        Activity

        No work has yet been logged on this issue.

          People

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

            Dates

            • Created:
              Updated:
              Resolved:

              Development