You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Apache Spark (JIRA)" <ji...@apache.org> on 2014/12/10 18:49:12 UTC

[jira] [Commented] (SPARK-1037) the name of findTaskFromList & findTask in TaskSetManager.scala is confusing

    [ https://issues.apache.org/jira/browse/SPARK-1037?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14241442#comment-14241442 ] 

Apache Spark commented on SPARK-1037:
-------------------------------------

User 'ilganeli' has created a pull request for this issue:
https://github.com/apache/spark/pull/3665

> the name of findTaskFromList & findTask in TaskSetManager.scala is confusing
> ----------------------------------------------------------------------------
>
>                 Key: SPARK-1037
>                 URL: https://issues.apache.org/jira/browse/SPARK-1037
>             Project: Spark
>          Issue Type: Improvement
>          Components: Spark Core
>    Affects Versions: 0.9.1, 1.0.0
>            Reporter: Nan Zhu
>            Priority: Minor
>              Labels: starter
>
> the name of these two functions is confusing 
> though in the comments the author said that the method does "dequeue" tasks from the list but from the name, it is not explicitly indicating that the method will mutate the parameter
> in 
> private def findTaskFromList(list: ArrayBuffer[Int]): Option[Int] = {
>     while (!list.isEmpty) {
>       val index = list.last
>       list.trimEnd(1)
>       if (copiesRunning(index) == 0 && !successful(index)) {
>         return Some(index)
>       }
>     }
>     None
>   }



--
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