bowenliang123 commented on code in PR #5767:
URL: https://github.com/apache/kyuubi/pull/5767#discussion_r1412222805


##########
kyuubi-server/src/main/scala/org/apache/kyuubi/engine/trino/TrinoProcessBuilder.scala:
##########
@@ -113,18 +108,16 @@ class TrinoProcessBuilder(
     if (commands == null) {
       super.toString
     } else {
-      Utils.redactCommandLineArgs(conf, commands).map {
-        case arg if arg.contains(ENGINE_TRINO_CONNECTION_PASSWORD.key) =>
-          
s"${ENGINE_TRINO_CONNECTION_PASSWORD.key}=$REDACTION_REPLACEMENT_TEXT"
-        case arg if 
arg.contains(ENGINE_TRINO_CONNECTION_KEYSTORE_PASSWORD.key) =>
-          
s"${ENGINE_TRINO_CONNECTION_KEYSTORE_PASSWORD.key}=$REDACTION_REPLACEMENT_TEXT"
-        case arg if 
arg.contains(ENGINE_TRINO_CONNECTION_TRUSTSTORE_PASSWORD.key) =>
-          
s"${ENGINE_TRINO_CONNECTION_TRUSTSTORE_PASSWORD.key}=$REDACTION_REPLACEMENT_TEXT"
-        case arg => arg
-      }.map {
-        case arg if arg.startsWith("-") => s"\\\n\t$arg"
-        case arg => arg
-      }.mkString(" ")
+      redactConfValues(
+        Utils.redactCommandLineArgs(conf, commands),
+        Set(
+          ENGINE_TRINO_CONNECTION_PASSWORD,
+          ENGINE_TRINO_CONNECTION_KEYSTORE_PASSWORD,
+          ENGINE_TRINO_CONNECTION_TRUSTSTORE_PASSWORD).map(_.key))

Review Comment:
   Fixed.



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

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


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

Reply via email to