Github user markgrover commented on a diff in the pull request:

    https://github.com/apache/spark/pull/15971#discussion_r89240682
  
    --- Diff: core/src/main/scala/org/apache/spark/util/Utils.scala ---
    @@ -2555,6 +2555,15 @@ private[spark] object Utils extends Logging {
           sparkJars.map(_.split(",")).map(_.filter(_.nonEmpty)).toSeq.flatten
         }
       }
    +
    +  private[util] val REDACTION_REPLACEMENT_TEXT = "*********(redacted)"
    +  def redact(conf: SparkConf)(kv: (String, String)): (String, String) = {
    +    val redactionPattern = conf.get(SECRET_REDACTION_PATTERN).r
    --- End diff --
    
    What part do you think is expensive? Going through all the configuration 
properties and matching them with the regex?
    If so, I agree. However, that has to be done somewhere. All the callers of 
this function have a `SparkConf` that they want stuff redacted from. So, if 
this function accepts a list of tuples, they have to run the regex check to 
find that list first before sending it to `redact()`. So, overall, unless I am 
missing something, I don't think we can avoid the expense.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

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

Reply via email to