-
- Downloads
Merge pull request #327 from lucarosellini/master
Added ‘-i’ command line option to Spark REPL We had to create a new implementation of both scala.tools.nsc.CompilerCommand and scala.tools.nsc.Settings, because using scala.tools.nsc.GenericRunnerSettings would bring in other options (-howtorun, -save and -execute) which don’t make sense in Spark. Any new Spark specific command line option could now be added to org.apache.spark.repl.SparkRunnerSettings class. Since the behavior of loading a script from the command line should be the same as loading it using the “:load” command inside the shell, the script should be loaded when the SparkContext is available, that’s why we had to move the call to ‘loadfiles(settings)’ _after_ the call to postInitialization(). This still doesn’t work if ‘isAsync = true’.
No related branches found
No related tags found
Showing
- repl/src/main/scala/org/apache/spark/repl/SparkCommandLine.scala 37 additions, 0 deletions...c/main/scala/org/apache/spark/repl/SparkCommandLine.scala
- repl/src/main/scala/org/apache/spark/repl/SparkILoop.scala 4 additions, 3 deletionsrepl/src/main/scala/org/apache/spark/repl/SparkILoop.scala
- repl/src/main/scala/org/apache/spark/repl/SparkRunnerSettings.scala 32 additions, 0 deletions...ain/scala/org/apache/spark/repl/SparkRunnerSettings.scala
Please register or sign in to comment