Skip to content

Commit

Permalink
[SPARK-8111] [SPARKR] SparkR shell should display Spark logo and vers…
Browse files Browse the repository at this point in the history
…ion banner on startup.

spark version is taken from the environment variable SPARK_VERSION

Author: Alok  Singh <[email protected]>
Author: Alok  Singh <[email protected]>

Closes apache#6944 from aloknsingh/aloknsingh_spark_jiras and squashes the following commits:

ed607bd [Alok  Singh] [SPARK-8111][SparkR] As per suggestion, 1) using the version from sparkContext rather than the Sys.env. 2) change "Welcome to SparkR!" to "Welcome to" followed by Spark logo and version
acd5b85 [Alok  Singh] fix the jira SPARK-8111 to add the spark version and logo. Currently spark version is taken from the environment variable SPARK_VERSION
  • Loading branch information
Alok Singh authored and shivaram committed Jun 23, 2015
1 parent f2022fa commit f2fb028
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion R/pkg/inst/profile/shell.R
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,21 @@
sc <- SparkR::sparkR.init()
assign("sc", sc, envir=.GlobalEnv)
sqlContext <- SparkR::sparkRSQL.init(sc)
sparkVer <- SparkR:::callJMethod(sc, "version")
assign("sqlContext", sqlContext, envir=.GlobalEnv)
cat("\n Welcome to SparkR!")
cat("\n Welcome to")
cat("\n")
cat(" ____ __", "\n")
cat(" / __/__ ___ _____/ /__", "\n")
cat(" _\\ \\/ _ \\/ _ `/ __/ '_/", "\n")
cat(" /___/ .__/\\_,_/_/ /_/\\_\\")
if (nchar(sparkVer) == 0) {
cat("\n")
} else {
cat(" version ", sparkVer, "\n")
}
cat(" /_/", "\n")
cat("\n")

cat("\n Spark context is available as sc, SQL context is available as sqlContext\n")
}

0 comments on commit f2fb028

Please sign in to comment.