diff options
author | Andrew Or <andrew@databricks.com> | 2016-05-03 13:47:58 -0700 |
---|---|---|
committer | Reynold Xin <rxin@databricks.com> | 2016-05-03 13:47:58 -0700 |
commit | 588cac414a9cf1e0f40a82cc6a78f77e26825f29 (patch) | |
tree | aeaa2ed8067942678341aaa599d63b173f4cfa42 /repl/scala-2.11/src | |
parent | 83ee92f60345f016a390d61a82f1d924f64ddf90 (diff) | |
download | spark-588cac414a9cf1e0f40a82cc6a78f77e26825f29.tar.gz spark-588cac414a9cf1e0f40a82cc6a78f77e26825f29.tar.bz2 spark-588cac414a9cf1e0f40a82cc6a78f77e26825f29.zip |
[SPARK-15073][SQL] Hide SparkSession constructor from the public
## What changes were proposed in this pull request?
Users should use the builder pattern instead.
## How was this patch tested?
Jenks.
Author: Andrew Or <andrew@databricks.com>
Closes #12873 from andrewor14/spark-session-constructor.
Diffstat (limited to 'repl/scala-2.11/src')
-rw-r--r-- | repl/scala-2.11/src/main/scala/org/apache/spark/repl/Main.scala | 4 |
1 files changed, 2 insertions, 2 deletions
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 8e381ff6ae..a171759809 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 @@ -94,10 +94,10 @@ object Main extends Logging { def createSparkSession(): SparkSession = { if (SparkSession.hiveClassesArePresent) { - sparkSession = SparkSession.withHiveSupport(sparkContext) + sparkSession = SparkSession.builder.enableHiveSupport().getOrCreate() logInfo("Created Spark session with Hive support") } else { - sparkSession = new SparkSession(sparkContext) + sparkSession = SparkSession.builder.getOrCreate() logInfo("Created Spark session") } sparkSession |