You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spark.apache.org by sr...@apache.org on 2016/02/09 10:05:24 UTC

spark git commit: [SPARK-13086][SHELL] Use the Scala REPL settings, to enable things like `-i file`.

Repository: spark
Updated Branches:
  refs/heads/master d9ba4d27f -> e30121afa


[SPARK-13086][SHELL] Use the Scala REPL settings, to enable things like `-i file`.

Now:

```
$ bin/spark-shell -i test.scala
NOTE: SPARK_PREPEND_CLASSES is set, placing locally compiled Spark classes ahead of assembly.
Setting default log level to "WARN".
To adjust logging level use sc.setLogLevel(newLevel).
16/01/29 17:37:38 WARN NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable
16/01/29 17:37:39 INFO Main: Created spark context..
Spark context available as sc (master = local[*], app id = local-1454085459000).
16/01/29 17:37:39 INFO Main: Created sql context..
SQL context available as sqlContext.
Loading test.scala...
hello

Welcome to
      ____              __
     / __/__  ___ _____/ /__
    _\ \/ _ \/ _ `/ __/  '_/
   /___/ .__/\_,_/_/ /_/\_\   version 2.0.0-SNAPSHOT
      /_/

Using Scala version 2.11.7 (Java HotSpot(TM) 64-Bit Server VM, Java 1.8.0_45)
Type in expressions to have them evaluated.
Type :help for more information.
```

Author: Iulian Dragos <ja...@gmail.com>

Closes #10984 from dragos/issue/repl-eval-file.


Project: http://git-wip-us.apache.org/repos/asf/spark/repo
Commit: http://git-wip-us.apache.org/repos/asf/spark/commit/e30121af
Tree: http://git-wip-us.apache.org/repos/asf/spark/tree/e30121af
Diff: http://git-wip-us.apache.org/repos/asf/spark/diff/e30121af

Branch: refs/heads/master
Commit: e30121afac35439be5d42c04da6f047f7d973dd6
Parents: d9ba4d2
Author: Iulian Dragos <ja...@gmail.com>
Authored: Tue Feb 9 09:05:22 2016 +0000
Committer: Sean Owen <so...@cloudera.com>
Committed: Tue Feb 9 09:05:22 2016 +0000

----------------------------------------------------------------------
 repl/scala-2.11/src/main/scala/org/apache/spark/repl/Main.scala | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/spark/blob/e30121af/repl/scala-2.11/src/main/scala/org/apache/spark/repl/Main.scala
----------------------------------------------------------------------
diff --git a/repl/scala-2.11/src/main/scala/org/apache/spark/repl/Main.scala b/repl/scala-2.11/src/main/scala/org/apache/spark/repl/Main.scala
index 07ba28b..1ae4182 100644
--- a/repl/scala-2.11/src/main/scala/org/apache/spark/repl/Main.scala
+++ b/repl/scala-2.11/src/main/scala/org/apache/spark/repl/Main.scala
@@ -19,7 +19,7 @@ package org.apache.spark.repl
 
 import java.io.File
 
-import scala.tools.nsc.Settings
+import scala.tools.nsc.GenericRunnerSettings
 
 import org.apache.spark.util.Utils
 import org.apache.spark._
@@ -56,7 +56,7 @@ object Main extends Logging {
       "-classpath", getAddedJars.mkString(File.pathSeparator)
     ) ++ args.toList
 
-    val settings = new Settings(scalaOptionError)
+    val settings = new GenericRunnerSettings(scalaOptionError)
     settings.processArguments(interpArguments, true)
 
     if (!hasErrors) {


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@spark.apache.org
For additional commands, e-mail: commits-help@spark.apache.org