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

William Benton commented on SPARK-571:
--------------------------------------

I have a patch for this and will submit a PR later today; can someone please 
assign this to me?

> Forbid return statements when cleaning closures
> -----------------------------------------------
>
>                 Key: SPARK-571
>                 URL: https://issues.apache.org/jira/browse/SPARK-571
>             Project: Spark
>          Issue Type: Improvement
>            Reporter: tjhunter
>
> By mistake, I wrote some code like this:
> <pre>
> object Foo {
>  def main() {
>    val sc = new SparkContext(...)
>    sc.parallelize(0 to 10,10).map({  ... return 1 ... }).collect
>  }
> }
> </pre>
> This compiles fine and actually runs using the local scheduler. However, 
> using the mesos scheduler throws a NotSerializableException in the 
> CollectTask . I agree the result of the program above should be undefined or 
> it should be an error. Would it be possible to have more explicit messages?



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to