-
Notifications
You must be signed in to change notification settings - Fork 29k
[SPARK-6908] [SQL] Use isolated Hive client #5876
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 all commits
8843a25
4d8bf02
ab07f7e
a6f5df1
a3bee70
1c50813
1d8ae44
81711c4
5fe5894
da91ba7
e7b3941
7e8f010
11e9c72
f5de7de
4b5cd41
5f3945e
81bb366
5a259f5
e56fd4a
258d000
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 |
|---|---|---|
|
|
@@ -17,6 +17,8 @@ | |
|
|
||
| package org.apache.spark.sql.hive.thriftserver | ||
|
|
||
| import java.io.PrintStream | ||
|
|
||
| import scala.collection.JavaConversions._ | ||
|
|
||
| import org.apache.spark.scheduler.StatsReportListener | ||
|
|
@@ -39,7 +41,6 @@ private[hive] object SparkSQLEnv extends Logging { | |
|
|
||
| sparkConf | ||
| .setAppName(s"SparkSQL::${Utils.localHostName()}") | ||
| .set("spark.sql.hive.version", HiveShim.version) | ||
| .set( | ||
| "spark.serializer", | ||
| maybeSerializer.getOrElse("org.apache.spark.serializer.KryoSerializer")) | ||
|
|
@@ -51,6 +52,12 @@ private[hive] object SparkSQLEnv extends Logging { | |
| sparkContext.addSparkListener(new StatsReportListener()) | ||
| hiveContext = new HiveContext(sparkContext) | ||
|
|
||
| hiveContext.metadataHive.setOut(new PrintStream(System.out, true, "UTF-8")) | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. nit: is UTF-8 the right thing here? It's not the default encoding on all platforms. Maybe omit that argument (which probably means using the platform default, even though the javadocs don't explicitly mention that)?
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
| hiveContext.metadataHive.setInfo(new PrintStream(System.err, true, "UTF-8")) | ||
| hiveContext.metadataHive.setError(new PrintStream(System.err, true, "UTF-8")) | ||
|
|
||
| hiveContext.setConf("spark.sql.hive.version", HiveShim.version) | ||
|
|
||
| if (log.isDebugEnabled) { | ||
| hiveContext.hiveconf.getAllProperties.toSeq.sorted.foreach { case (k, v) => | ||
| logDebug(s"HiveConf var: $k=$v") | ||
|
|
||
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.
So, if I understand this correctly, you're creating just a "dummy" local metastore that won't actually be used; this is just to keep the Hive libraries happy, right?