-
Notifications
You must be signed in to change notification settings - Fork 29k
[SPARK-15072][SQL][REPL][EXAMPLES] Remove SparkSession.withHiveSupport #12851
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -89,7 +89,7 @@ object Main extends Logging { | |
|
|
||
| val builder = SparkSession.builder.config(conf) | ||
| if (SparkSession.hiveClassesArePresent) { | ||
| sparkSession = builder.enableHiveSupport().getOrCreate() | ||
| sparkSession = SparkSession.builder.enableHiveSupport().getOrCreate() | ||
|
||
| logInfo("Created Spark session with Hive support") | ||
| } else { | ||
| sparkSession = builder.getOrCreate() | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -55,7 +55,7 @@ private[hive] object SparkSQLEnv extends Logging { | |
| maybeKryoReferenceTracking.getOrElse("false")) | ||
|
|
||
| sparkContext = new SparkContext(sparkConf) | ||
| sqlContext = SparkSession.withHiveSupport(sparkContext).wrapped | ||
| sqlContext = SparkSession.builder.enableHiveSupport().getOrCreate().wrapped | ||
|
||
| val sessionState = sqlContext.sessionState.asInstanceOf[HiveSessionState] | ||
| sessionState.metadataHive.setOut(new PrintStream(System.out, true, "UTF-8")) | ||
| sessionState.metadataHive.setInfo(new PrintStream(System.err, true, "UTF-8")) | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -34,7 +34,7 @@ object Main { | |
| // scalastyle:off println | ||
| println("Running regression test for SPARK-8489.") | ||
| val sc = new SparkContext("local", "testing") | ||
| val sparkSession = SparkSession.withHiveSupport(sc) | ||
| val sparkSession = SparkSession.builder.enableHiveSupport().getOrCreate() | ||
|
||
| // This line should not throw scala.reflect.internal.MissingRequirementError. | ||
| // See SPARK-8470 for more detail. | ||
| val df = sparkSession.createDataFrame(Seq(MyCoolClass("1", "2", "3"))) | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same here