diff options
author | WangTaoTheTonic <wangtao111@huawei.com> | 2015-07-30 23:50:06 -0700 |
---|---|---|
committer | Reynold Xin <rxin@databricks.com> | 2015-07-30 23:50:06 -0700 |
commit | a3a85d73da053c8e2830759fbc68b734081fa4f3 (patch) | |
tree | df500666699f3572c1ccce866dc6705831ea677b /sql/hive | |
parent | 0244170b66476abc4a39ed609a852f1a6fa455e7 (diff) | |
download | spark-a3a85d73da053c8e2830759fbc68b734081fa4f3.tar.gz spark-a3a85d73da053c8e2830759fbc68b734081fa4f3.tar.bz2 spark-a3a85d73da053c8e2830759fbc68b734081fa4f3.zip |
[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 <wangtao111@huawei.com>
Closes #7815 from WangTaoTheTonic/master and squashes the following commits:
c7a5145 [WangTaoTheTonic] do not print the password in config
Diffstat (limited to 'sql/hive')
-rw-r--r-- | sql/hive/src/main/scala/org/apache/spark/sql/hive/client/ClientWrapper.scala | 6 |
1 files changed, 5 insertions, 1 deletions
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 8adda54754..6e0912da58 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) |