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!
|Field||Original Value||New Value|
|Assignee||Anubhav Dhoot [ adhoot ]|
|Status||Open [ 1 ]||Patch Available [ 10002 ]|
|Summary||MR1 FairScheduler zero weight can cause sort failures||FairScheduler: zero weight can cause sort failures|
|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|
|20m 26s||1||Anubhav Dhoot||18/Jul/14 00:30|
|4d 23h 34m||1||Karthik Kambatla (Inactive)||23/Jul/14 00:04|