You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Chris A. Mattmann (JIRA)" <ji...@apache.org> on 2016/03/08 06:43:40 UTC

[jira] [Commented] (SPARK-3200) Class defined with reference to external variables crashes in REPL.

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

Chris A. Mattmann commented on SPARK-3200:
------------------------------------------

how did this get resolved other than simply saying in 1.6 it worked? I'm confused.

> Class defined with reference to external variables crashes in REPL.
> -------------------------------------------------------------------
>
>                 Key: SPARK-3200
>                 URL: https://issues.apache.org/jira/browse/SPARK-3200
>             Project: Spark
>          Issue Type: Bug
>          Components: Spark Shell
>    Affects Versions: 1.1.0
>            Reporter: Prashant Sharma
>            Assignee: Prashant Sharma
>
> Reproducer:
> {noformat}
> val a = sc.textFile("README.md").count
> case class A(i: Int) { val j = a} 
> sc.parallelize(1 to 10).map(A(_)).collect()
> {noformat}
> This will happen only in distributed mode, when one refers something that refers sc and not otherwise. 
> There are many ways to work around this, like directly assign a constant value instead of referring the variable. 



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