You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kyuubi.apache.org by GitBox <gi...@apache.org> on 2021/12/28 12:17:59 UTC

[GitHub] [incubator-kyuubi] ulysses-you commented on a change in pull request #1640: [KYUUBI #1634][FEATURE] Redact secret information from SparkSQLEngine UI

ulysses-you commented on a change in pull request #1640:
URL: https://github.com/apache/incubator-kyuubi/pull/1640#discussion_r775880218



##########
File path: externals/kyuubi-spark-sql-engine/src/main/scala/org/apache/kyuubi/engine/spark/operation/ExecuteStatement.scala
##########
@@ -69,13 +70,18 @@ class ExecuteStatement(
     OperationLog.removeCurrentOperationLog()
   }
 
+  override val redactedStatement: String =
+    redact(spark.sessionState.conf.stringRedactionPattern, statement)
+
   private def executeStatement(): Unit = withLocalProperties {
     try {
       setState(OperationState.RUNNING)
       info(diagnostics)
       Thread.currentThread().setContextClassLoader(spark.sharedState.jarClassLoader)
       // TODO: Make it configurable
       spark.sparkContext.addSparkListener(operationListener)
+      spark.sparkContext.setJobDescription(
+        redact(spark.sessionState.conf.stringRedactionPattern, statement))

Review comment:
       Can we make redacted statment at:
   
   https://github.com/apache/incubator-kyuubi/blob/cb8721fef130771db330c0dd51844ebb13bca7b3/externals/kyuubi-spark-sql-engine/src/main/scala/org/apache/kyuubi/engine/spark/operation/SparkOperation.scala#L98-L100
   
   And we can also define the `redactedStatement` at `SparkOperation`.
   




-- 
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: commits-unsubscribe@kyuubi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org