You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by JoshRosen <gi...@git.apache.org> on 2016/07/15 22:10:07 UTC

[GitHub] spark pull request #8909: [SPARK-10810] [SPARK-10902] [SQL] Improve session ...

Github user JoshRosen commented on a diff in the pull request:

    https://github.com/apache/spark/pull/8909#discussion_r71047738
  
    --- Diff: sql/hive/src/main/scala/org/apache/spark/sql/hive/HiveContext.scala ---
    @@ -598,6 +631,14 @@ class HiveContext(sc: SparkContext) extends SQLContext(sc) with Logging {
             case _ => super.simpleString
           }
       }
    +
    +  protected[sql] override def addJar(path: String): Unit = {
    +    // Add jar to Hive and classloader
    +    executionHive.addJar(path)
    +    metadataHive.addJar(path)
    +    Thread.currentThread().setContextClassLoader(executionHive.clientLoader.classLoader)
    --- End diff --
    
    @davies @yhuai Do we need to restore the original classloader after calling `super.addJar()` or is it intentional that calling `HiveContext.addJar` will permanently mutate the calling thread's context classloader?


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

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