You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Guoqiang Li (JIRA)" <ji...@apache.org> on 2016/02/18 16:09:18 UTC

[jira] [Issue Comment Deleted] (SPARK-13371) TaskSetManager.dequeueSpeculativeTask compares Option[String] and String directly.

     [ https://issues.apache.org/jira/browse/SPARK-13371?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Guoqiang Li updated SPARK-13371:
--------------------------------
    Comment: was deleted

(was: [~srowen] Of course not.)

> TaskSetManager.dequeueSpeculativeTask compares Option[String] and String directly.
> ----------------------------------------------------------------------------------
>
>                 Key: SPARK-13371
>                 URL: https://issues.apache.org/jira/browse/SPARK-13371
>             Project: Spark
>          Issue Type: Bug
>          Components: Scheduler
>    Affects Versions: 1.5.2, 1.6.0
>            Reporter: Guoqiang Li
>
> {noformat}
> TaskSetManager.dequeueSpeculativeTask compares Option[String] and String directly.
> {noformat}
> Ths code: https://github.com/apache/spark/blob/87abcf7df921a5937fdb2bae8bfb30bfabc4970a/core/src/main/scala/org/apache/spark/scheduler/TaskSetManager.scala#L344
> {code}
>  if (TaskLocality.isAllowed(locality, TaskLocality.RACK_LOCAL)) {
>     for (rack <- sched.getRackForHost(host)) {
>       for (index <- speculatableTasks if canRunOnHost(index)) {
>         val racks = tasks(index).preferredLocations.map(_.host).map(sched.getRackForHost)
>         // racks: Seq[Option[String]] and rack: String
>         if (racks.contains(rack)) {
>           speculatableTasks -= index
>           return Some((index, TaskLocality.RACK_LOCAL))
>         }
>       }
>     }
>   }
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org