spark-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wulei-bj-cn <>
Subject [GitHub] spark pull request: [SPARK-10149] [CORE] [WIP] Locality Level is a...
Date Tue, 01 Sep 2015 09:28:34 GMT
Github user wulei-bj-cn commented on the pull request:
    Basically, yes. Indeed this locality level being "ANY" is directly caused from org.apache.spark.scheduler.TaskSetManager:
    // Check for node-local tasks
    if (TaskLocality.isAllowed(locality, TaskLocality.NODE_LOCAL)) {
    for (index <- speculatableTasks if canRunOnHost(index)) {
    val locations = tasks(index)
    if (locations.contains(host))
    { speculatableTasks -= index return Some((index, TaskLocality.NODE_LOCAL)) }
    As pointed out earlier, since variable "locations" contains java.lang.String values like
"hostname1", "hostname2", etc and variable "host" is containing java.lang.String values like
"", "", etc. So they will NEVER match, and that's why the task scheduler
figures: "Ah ha, there is no task with preferred locality as NODE_LOCAL, and I'll just have
to give it an ANY". 
    Therefore, as far as I figured, we either change the "host" variable to contain values
like hostnames or change the "locations" variable to contain IP addresses. The overall target
is just to make them match when they're compared to each other. Am I correct ? 
    I'd really hope you could help guide me in the right direction if I'm wrong :) Thanks
so much !

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 or file a JIRA ticket
with INFRA.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message