Github user lirui-intel commented on the pull request:
https://github.com/apache/spark/pull/1313#issuecomment-48859854
This looks good to me :)
Just a reminder that when TaskSchedulerImpl calls
TaskSetManager.resourceOffer, the maxLocality (changed to preferredLocality in
this PR) doesn't always begin with PROCESS_LOCAL, rather, it only iterates
through valid levels in the TaskSetManager. That being said, we still need
something this PR provides to delay tasks in the noPref list, because valid
levels are not re-computed when task finishes. So it may contains, say,
PROCESS_LOCAL even when such tasks have actually run out.
I agree that we may want to separate tasks without preference vs tasks
whose preferred location is not available. I think it's possible (maybe
unlikely though) that a TaskSetManager contains both kinds of these tasks, e.g.
with narrow dependency and some of parent RDD's partitions are cached.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---