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

    https://github.com/apache/spark/pull/9589#discussion_r53517914
  
    --- Diff: 
sql/hive/src/main/scala/org/apache/spark/sql/hive/client/HiveClientImpl.scala 
---
    @@ -104,29 +104,39 @@ private[hive] class HiveClientImpl(
         }
     
         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")
    +      // originState will be created if not exists, will never be null
    +      val originalState = SessionState.get()
    +      if (originalState.isInstanceOf[CliSessionState]) {
    --- End diff --
    
    What happens if you don't special case this?  Why is this dependent on the 
type of the session state and not just on the fact that a session has already 
been started?


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

Reply via email to