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

Reynold Xin closed SPARK-572.
-----------------------------
    Resolution: Won't Fix

Closing this as won't fix since it is very hard to enforce and we do "abuse" it 
to run stateful computation.

> Forbid update of static mutable variables
> -----------------------------------------
>
>                 Key: SPARK-572
>                 URL: https://issues.apache.org/jira/browse/SPARK-572
>             Project: Spark
>          Issue Type: Improvement
>            Reporter: tjhunter
>
> Consider the following piece of code:
> <pre>
> object Foo {
>  var xx = -1
>  def main() {
>    xx = 1
>    val sc = new SparkContext(...)
>    sc.broadcast(xx)
>    sc.parallelize(0 to 10).map(i=>{ ... xx ...})
>  }
> }
> </pre>
> Can you guess the value of xx? It is 1 when you use the local scheduler and 
> -1 when you use the mesos scheduler. Given the complications, it should 
> probably just be forbidden for now...



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

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

Reply via email to