Github user yhuai commented on a diff in the pull request:
https://github.com/apache/spark/pull/13711#discussion_r67393518
--- Diff:
sql/core/src/main/scala/org/apache/spark/sql/internal/SharedState.scala ---
@@ -43,23 +43,17 @@ private[sql] class SharedState(val sparkContext:
SparkContext) extends Logging {
*/
val listener: SQLListener = createListenerAndUI(sparkContext)
- /**
- * The base hadoop configuration which is shared among all spark
sessions. It is based on the
- * default hadoop configuration of Spark, with custom configurations
inside `hive-site.xml`.
- */
- val hadoopConf: Configuration = {
- val conf = new Configuration(sparkContext.hadoopConfiguration)
+ {
val configFile =
Utils.getContextOrSparkClassLoader.getResource("hive-site.xml")
if (configFile != null) {
- conf.addResource(configFile)
+ sparkContext.hadoopConfiguration.addResource(configFile)
--- End diff --
@rxin @cloud-fan This change will add `hive-site.xml` to
`sparkContext.hadoopConfiguration`. This behavior is different from 1.6. If
there is any hadoop confs set in this file, these confs will override
corresponding hadoop confs set in core-site.xml.
We can also load hive-site.xml to the new hadoop conf created in
`SessionState.newHadoopConf`. But, my concern for this approach is that
reloading all resources (triggered by addResource) is pretty expensive.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]