Github user sryza commented on the pull request:
https://github.com/apache/spark/pull/3816#issuecomment-68387362
@mateiz @CodingCat thanks for the additional clarification.
The NO_PREF tasks are coming from Hive's CombineHiveInputFormat, which
doesn't include a locality preference when many files are packed into the same
split.
Looking at the code a little more, it appears that the locality returned by
`dequeueTask` after scheduling a NO_PREF task shouldn't matter at all. NO_PREF
tasks should only be scheduled when `resourceOffer` is called with
maxLocality=NO_PREF (right?). Other than for logging, this is the only place
the returned `taskLocality` is used:
if (maxLocality != TaskLocality.NO_PREF) {
currentLocalityIndex = getLocalityIndex(taskLocality)
lastLaunchTime = curTime
}
So when scheduling a NO_PREF task, `taskLocality` isn't used at all.
---
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.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]