Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

spark-shell with colored repl

Running spark-shell with scala. Scala has the -Dscala.color argument for a colored REPL. I want the same for spark. Tried spark-shell -Dscala.color but this wasn't the way to get. How can I get the colored REPL for spark?

like image 966
DeanLa Avatar asked Mar 12 '17 13:03

DeanLa


2 Answers

You can use spark.driver.extraJavaOptions to pass option to the scala REPL

spark-shell --conf spark.driver.extraJavaOptions="-Dscala.color"
like image 117
Harald Gliebe Avatar answered Sep 23 '22 08:09

Harald Gliebe


The following is working for me, but on Spark 2 only.

 ./spark-shell --driver-java-options='-Dscala.color' 

I also tried it on Spark 1.6.0 but the colors were not activated.

like image 33
Joseph M. Dion Avatar answered Sep 23 '22 08:09

Joseph M. Dion