AngersZhuuuu commented on a change in pull request #25954: [SPARK-29247][SQL] 
Redact sensitive information in when construct HiveClientHive.state
URL: https://github.com/apache/spark/pull/25954#discussion_r329309897
 
 

 ##########
 File path: 
sql/hive/src/main/scala/org/apache/spark/sql/hive/client/HiveClientImpl.scala
 ##########
 @@ -181,7 +182,7 @@ private[hive] class HiveClientImpl(
       logDebug(
         s"""
            |Applying Hadoop/Hive/Spark and extra properties to Hive Conf:
-           |$k=${if (k.toLowerCase(Locale.ROOT).contains("password")) "xxx" 
else v}
+           |$k=${SQLConf.get.redactOptions(k.toLowerCase(Locale.ROOT) -> v)._2}
 
 Review comment:
   > Can't we just use Map here instead of adding the copies of `redact` for 
(K, V)?
   
   In that way we need to get conf map , put all of then to hiveConf then call 
`SQLConf.get.redactOptions`, and print out log.
   
   If we don't want to overloading a new method,  it's ok.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to