Github user rdblue commented on the pull request:

    https://github.com/apache/spark/pull/13236#issuecomment-221033268
  
    I don't think a map preserves behavior. Hadoop `Configuration` instances 
have a set of final properties that can't be changed. This loses that 
information and then applies properties from the SparkConf and extraConfig, 
which could potentially overwrite final properties.
    
    There are also two more issues that come to mind:
    # The `Configuration` has a `ClassLoader` that will be used by 
[`getClass`](https://hadoop.apache.org/docs/r2.6.1/api/org/apache/hadoop/conf/Configuration.html#getClass(java.lang.String,
 java.lang.Class)) methods.
    # 
[`Configuration.addDefaultResource`](https://hadoop.apache.org/docs/r2.6.1/api/org/apache/hadoop/conf/Configuration.html#addDefaultResource(java.lang.String))
 can be called at any time and adds properties to all configurations.
    
    The main reason I added `hadoopConf` was to ensure properties that I set in 
my Spark defaults were applied to this HiveConf, and this PR preserves that 
behavior. But, best practice in Hadoop is to use the copy constructor to 
preserve final props and class loading. I think that those two issues should be 
fixed.
    
    I don't see a good way around the `addDefaultResource` problem other than 
to have Hive to use the same version of Hadoop that Spark uses (that seems 
reasonable to me, but we can discuss that separately).


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to