Github user adrian-wang commented on a diff in the pull request:

    https://github.com/apache/spark/pull/9589#discussion_r44751867
  
    --- Diff: 
sql/hive/src/main/scala/org/apache/spark/sql/hive/client/ClientWrapper.scala ---
    @@ -151,29 +152,34 @@ private[hive] class ClientWrapper(
         // Switch to the initClassLoader.
         Thread.currentThread().setContextClassLoader(initClassLoader)
         val ret = try {
    -      val initialConf = new HiveConf(classOf[SessionState])
    -      // HiveConf is a Hadoop Configuration, which has a field of 
classLoader and
    -      // the initial value will be the current thread's context class 
loader
    -      // (i.e. initClassLoader at here).
    -      // We call initialConf.setClassLoader(initClassLoader) at here to 
make
    -      // this action explicit.
    -      initialConf.setClassLoader(initClassLoader)
    -      config.foreach { case (k, v) =>
    -        if (k.toLowerCase.contains("password")) {
    -          logDebug(s"Hive Config: $k=xxx")
    -        } else {
    -          logDebug(s"Hive Config: $k=$v")
    +      val registeredState = SessionState.get
    +      if (registeredState != null && 
registeredState.isInstanceOf[CliSessionState]) {
    --- End diff --
    
    I thought of adding flags to these function, but that seems too complicate. 
@marmbrus do you have a better idea here?


---
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