[GitHub] spark pull request #17047: [SPARK-19720][CORE] Redact sensitive information ...

2017-03-02 Thread asfgit
Github user asfgit closed the pull request at:

https://github.com/apache/spark/pull/17047


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

-
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org



[GitHub] spark pull request #17047: [SPARK-19720][CORE] Redact sensitive information ...

2017-02-28 Thread markgrover
Github user markgrover commented on a diff in the pull request:

https://github.com/apache/spark/pull/17047#discussion_r103587323
  
--- Diff: core/src/main/scala/org/apache/spark/util/Utils.scala ---
@@ -2574,13 +2575,31 @@ private[spark] object Utils extends Logging {
 
   def redact(conf: SparkConf, kvs: Seq[(String, String)]): Seq[(String, 
String)] = {
 val redactionPattern = conf.get(SECRET_REDACTION_PATTERN).r
+redact(redactionPattern, kvs)
+  }
+
+  private def redact(redactionPattern: Regex, kvs: Seq[(String, String)]): 
Seq[(String, String)] = {
 kvs.map { kv =>
   redactionPattern.findFirstIn(kv._1)
-.map { ignore => (kv._1, REDACTION_REPLACEMENT_TEXT) }
+.map {ignore => (kv._1, REDACTION_REPLACEMENT_TEXT) }
--- End diff --

Ah, right I misunderstood that - I took your comment as a bash + scala way 
to say eliminate space (partly because it's hard to understand spacing in 
github comments). My bad, let me fix that.


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

-
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org



[GitHub] spark pull request #17047: [SPARK-19720][CORE] Redact sensitive information ...

2017-02-28 Thread vanzin
Github user vanzin commented on a diff in the pull request:

https://github.com/apache/spark/pull/17047#discussion_r103586865
  
--- Diff: core/src/main/scala/org/apache/spark/util/Utils.scala ---
@@ -2574,13 +2575,31 @@ private[spark] object Utils extends Logging {
 
   def redact(conf: SparkConf, kvs: Seq[(String, String)]): Seq[(String, 
String)] = {
 val redactionPattern = conf.get(SECRET_REDACTION_PATTERN).r
+redact(redactionPattern, kvs)
+  }
+
+  private def redact(redactionPattern: Regex, kvs: Seq[(String, String)]): 
Seq[(String, String)] = {
 kvs.map { kv =>
   redactionPattern.findFirstIn(kv._1)
-.map { ignore => (kv._1, REDACTION_REPLACEMENT_TEXT) }
+.map {ignore => (kv._1, REDACTION_REPLACEMENT_TEXT) }
--- End diff --

nit: replace "ignore" with "_" (in case my previous comment wasn't clear). 
also missing a space after '{'.


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

-
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org



[GitHub] spark pull request #17047: [SPARK-19720][CORE] Redact sensitive information ...

2017-02-28 Thread markgrover
Github user markgrover commented on a diff in the pull request:

https://github.com/apache/spark/pull/17047#discussion_r103585591
  
--- Diff: 
core/src/main/scala/org/apache/spark/internal/config/package.scala ---
@@ -240,14 +240,16 @@ package object config {
 .longConf
 .createWithDefault(4 * 1024 * 1024)
 
+  private[spark] val SECRET_REDACTION_PROPERTY = "spark.redaction.regex"
--- End diff --

Thanks @vanzin Updated.


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

-
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org