apache/spark — pull request #1131 by li-zhihui (2014-06-19 08:32:06+00:00)
Title: [SPARK-2193] Improve tasks preferrd locality by sorting tasks partial or...

Now, the last executor(s) maybe not get it’s preferred task(s), although these tasks have build in pendingTasksForHosts map. Because executers pick up tasks sequential, their preferred task(s) maybe picked up by other executors.
This appearance can be eliminated by sorting tasks partial ordering. Executor pick up task by host’s order of task’s preferredLocation, that mean, executor firstly pick up all tasks which task.preferredLocations.1 = executor.hostName, then secondly…