-
Notifications
You must be signed in to change notification settings - Fork 28.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[SPARK-18535][UI][YARN] Redact sensitive information from Spark logs and UI #15971
Changes from 1 commit
5dd3630
b0ad319
78e4398
eed33db
84a7ef3
549881b
61a961c
49015ac
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2562,9 +2562,9 @@ private[spark] object Utils extends Logging { | |
val redactionPattern = conf.get(SECRET_REDACTION_PATTERN).r | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is very expensive. How about a version that takes a list of tuples and redacts them? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What part do you think is expensive? Going through all the configuration properties and matching them with the regex? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Compiling the regex once for every item in the list being redacted, instead of doing it once for the whole list. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ah, good point. Let me fix this. |
||
kvs.map { kv => | ||
redactionPattern.findFirstIn(kv._1) | ||
.map{ ignore => (kv._1, REDACTION_REPLACEMENT_TEXT) } | ||
.map { ignore => (kv._1, REDACTION_REPLACEMENT_TEXT) } | ||
.getOrElse(kv) | ||
} | ||
} | ||
} | ||
|
||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: this needs to be indented one more level...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, I'll go through Spark style guide so I don't cause as much trouble next time.
Thanks for reviewing.