Repository: spark
Updated Branches:
  refs/heads/master 0244170b6 -> a3a85d73d


[SPARK-9496][SQL]do not print the password in config

https://issues.apache.org/jira/browse/SPARK-9496

We better do not print the password in log.

Author: WangTaoTheTonic <wangtao...@huawei.com>

Closes #7815 from WangTaoTheTonic/master and squashes the following commits:

c7a5145 [WangTaoTheTonic] do not print the password in config


Project: http://git-wip-us.apache.org/repos/asf/spark/repo
Commit: http://git-wip-us.apache.org/repos/asf/spark/commit/a3a85d73
Tree: http://git-wip-us.apache.org/repos/asf/spark/tree/a3a85d73
Diff: http://git-wip-us.apache.org/repos/asf/spark/diff/a3a85d73

Branch: refs/heads/master
Commit: a3a85d73da053c8e2830759fbc68b734081fa4f3
Parents: 0244170
Author: WangTaoTheTonic <wangtao...@huawei.com>
Authored: Thu Jul 30 23:50:06 2015 -0700
Committer: Reynold Xin <r...@databricks.com>
Committed: Thu Jul 30 23:50:06 2015 -0700

----------------------------------------------------------------------
 .../scala/org/apache/spark/sql/hive/client/ClientWrapper.scala | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/spark/blob/a3a85d73/sql/hive/src/main/scala/org/apache/spark/sql/hive/client/ClientWrapper.scala
----------------------------------------------------------------------
diff --git 
a/sql/hive/src/main/scala/org/apache/spark/sql/hive/client/ClientWrapper.scala 
b/sql/hive/src/main/scala/org/apache/spark/sql/hive/client/ClientWrapper.scala
index 8adda54..6e0912d 100644
--- 
a/sql/hive/src/main/scala/org/apache/spark/sql/hive/client/ClientWrapper.scala
+++ 
b/sql/hive/src/main/scala/org/apache/spark/sql/hive/client/ClientWrapper.scala
@@ -91,7 +91,11 @@ private[hive] class ClientWrapper(
         // this action explicit.
         initialConf.setClassLoader(initClassLoader)
         config.foreach { case (k, v) =>
-          logDebug(s"Hive Config: $k=$v")
+          if (k.toLowerCase.contains("password")) {
+            logDebug(s"Hive Config: $k=xxx")
+          } else {
+            logDebug(s"Hive Config: $k=$v")
+          }
           initialConf.set(k, v)
         }
         val newState = new SessionState(initialConf)


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

Reply via email to