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

Patrick Wendell commented on SPARK-6335:
----------------------------------------

Yes - I agree with [~srowen] here. I don't think we need to go out of our way 
to support :reset with respect to our bootstrapping of the spark-shell state. 
I'd rather just ask users to terminate and restart the shell (only slightly 
more difficult, and much easier to support). Perhaps if we see a reset, we 
should just exit the shell to fail-fast.

> REPL :reset command also removes refs to SparkContext and SQLContext
> --------------------------------------------------------------------
>
>                 Key: SPARK-6335
>                 URL: https://issues.apache.org/jira/browse/SPARK-6335
>             Project: Spark
>          Issue Type: Improvement
>          Components: Spark Shell
>    Affects Versions: 1.3.0
>         Environment: Ubuntu 14.04 64-bit; spark-1.3.0-bin-hadoop2.4
>            Reporter: Marko Bonaci
>            Priority: Trivial
>
> I wasn't sure whether to mark it as a bug or an improvement, so I went for 
> more moderate option, since this is rather trivial, rarely used thing.
> Here's the repl printout:
> {code:java}
> 15/03/14 14:39:38 INFO SparkILoop: Created spark context..
> Spark context available as sc.
> 15/03/14 14:39:38 INFO SparkILoop: Created sql context (with Hive support)..
> SQL context available as sqlContext.
> scala> val x = 8
> x: Int = 8
> scala> :reset
> Resetting repl state.
> Forgetting this session history:
> val x = 8
> Forgetting all expression results and named terms: $intp, sc, sqlContext, x
> scala> sc.parallelize(1 to 8)
> <console>:8: error: not found: value sc
>               sc.parallelize(1 to 8)
>               ^
> scala> :quit
> Stopping spark context.
> <console>:8: error: not found: value sc
>               sc.stop()
>               ^
> {code}



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

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to