You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by markpavey <gi...@git.apache.org> on 2018/11/21 10:12:06 UTC

[GitHub] spark pull request #23102: [SPARK-26137][CORE] Use Java system property "fil...

GitHub user markpavey opened a pull request:

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

    [SPARK-26137][CORE] Use Java system property "file.separator" inste…

    … of hard coded "/" in DependencyUtils
    
    ## What changes were proposed in this pull request?
    
    (Please fill in changes proposed in this fix)
    
    ## How was this patch tested?
    
    (Please explain how this patch was tested. E.g. unit tests, integration tests, manual tests)
    (If this patch involves UI changes, please attach a screenshot; otherwise, remove this)
    
    Please review http://spark.apache.org/contributing.html before opening a pull request.


You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/thefilter/spark JIRA_SPARK-26137_DependencyUtilsFileSeparatorFix

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/spark/pull/23102.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #23102
    
----
commit 09cb210ce2092338f954467926b6cacd09d60eec
Author: Mark Pavey <ma...@...>
Date:   2018-11-21T10:07:16Z

    [SPARK-26137][CORE] Use Java system property "file.separator" instead of hard coded "/" in DependencyUtils

----


---

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


[GitHub] spark issue #23102: [SPARK-26137][CORE] Use Java system property "file.separ...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/23102
  
    Merged build finished. Test PASSed.


---

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


[GitHub] spark issue #23102: [SPARK-26137][CORE] Use Java system property "file.separ...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/23102
  
    **[Test build #99319 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/99319/testReport)** for PR 23102 at commit [`46a6dd4`](https://github.com/apache/spark/commit/46a6dd4efb6c345be7a450c68485ff90ca1f9fb4).
     * This patch passes all tests.
     * This patch merges cleanly.
     * This patch adds no public classes.


---

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


[GitHub] spark issue #23102: [SPARK-26137][CORE] Use Java system property "file.separ...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/23102
  
    **[Test build #99333 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/99333/testReport)** for PR 23102 at commit [`e1e97aa`](https://github.com/apache/spark/commit/e1e97aabb45cf611221ee7baa8d0351b32fbb770).
     * This patch passes all tests.
     * This patch merges cleanly.
     * This patch adds no public classes.


---

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


[GitHub] spark issue #23102: [SPARK-26137][CORE] Use Java system property "file.separ...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/23102
  
    Test PASSed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/testing-k8s-prb-make-spark-distribution-unified/5363/
    Test PASSed.


---

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


[GitHub] spark issue #23102: [SPARK-26137][CORE] Use Java system property "file.separ...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/23102
  
    Test PASSed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/testing-k8s-prb-make-spark-distribution-unified/5247/
    Test PASSed.


---

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


[GitHub] spark issue #23102: [SPARK-26137][CORE] Use Java system property "file.separ...

Posted by dongjoon-hyun <gi...@git.apache.org>.
Github user dongjoon-hyun commented on the issue:

    https://github.com/apache/spark/pull/23102
  
    Hi, @markpavey .
    According to the JIRA description, you tested your PR on the Windows. As @kiszk advised, could you add more specific description about what you tested on Windows manually? That would be helpful for the others.



---

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


[GitHub] spark issue #23102: [SPARK-26137][CORE] Use Java system property "file.separ...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/23102
  
    Test PASSed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/99190/
    Test PASSed.


---

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


[GitHub] spark issue #23102: [SPARK-26137][CORE] Use Java system property "file.separ...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/23102
  
    Merged build finished. Test FAILed.


---

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


[GitHub] spark issue #23102: [SPARK-26137][CORE] Use Java system property "file.separ...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/23102
  
    Can one of the admins verify this patch?


---

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


[GitHub] spark issue #23102: [SPARK-26137][CORE] Use Java system property "file.separ...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/23102
  
    **[Test build #99333 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/99333/testReport)** for PR 23102 at commit [`e1e97aa`](https://github.com/apache/spark/commit/e1e97aabb45cf611221ee7baa8d0351b32fbb770).


---

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


[GitHub] spark pull request #23102: [SPARK-26137][CORE] Use Java system property "fil...

Posted by kiszk <gi...@git.apache.org>.
Github user kiszk commented on a diff in the pull request:

    https://github.com/apache/spark/pull/23102#discussion_r235975268
  
    --- Diff: core/src/main/scala/org/apache/spark/deploy/DependencyUtils.scala ---
    @@ -61,11 +62,12 @@ private[deploy] object DependencyUtils extends Logging {
           hadoopConf: Configuration,
           secMgr: SecurityManager): String = {
         val targetDir = Utils.createTempDir()
    +    val fileSeparator = Pattern.quote(System.getProperty("file.separator"))
         Option(jars)
           .map {
             resolveGlobPaths(_, hadoopConf)
               .split(",")
    -          .filterNot(_.contains(userJar.split("/").last))
    +          .filterNot(_.contains(userJar.split(fileSeparator).last))
    --- End diff --
    
    Beyond the original purpose of this PR, is it better to move `userJar.split(fileSeparator).last` before line 66? This is because `userJar` is not changed in `map { ... }`.


---

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


[GitHub] spark issue #23102: [SPARK-26137][CORE] Use Java system property "file.separ...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/23102
  
    **[Test build #99190 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/99190/testReport)** for PR 23102 at commit [`49ce5a8`](https://github.com/apache/spark/commit/49ce5a8329db43293b6ef4b22b2601594e7f4092).


---

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


[GitHub] spark issue #23102: [SPARK-26137][CORE] Use Java system property "file.separ...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/23102
  
    Merged build finished. Test PASSed.


---

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


[GitHub] spark issue #23102: [SPARK-26137][CORE] Use Java system property "file.separ...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/23102
  
    **[Test build #99280 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/99280/testReport)** for PR 23102 at commit [`bfabd4f`](https://github.com/apache/spark/commit/bfabd4fb37c9140fa7b0603205b274222333f084).
     * This patch **fails Scala style tests**.
     * This patch merges cleanly.
     * This patch adds no public classes.


---

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


[GitHub] spark issue #23102: [SPARK-26137][CORE] Use Java system property "file.separ...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/23102
  
    Merged build finished. Test PASSed.


---

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


[GitHub] spark pull request #23102: [SPARK-26137][CORE] Use Java system property "fil...

Posted by markpavey <gi...@git.apache.org>.
Github user markpavey commented on a diff in the pull request:

    https://github.com/apache/spark/pull/23102#discussion_r236705942
  
    --- Diff: core/src/main/scala/org/apache/spark/deploy/DependencyUtils.scala ---
    @@ -19,6 +19,7 @@ package org.apache.spark.deploy
     
     import java.io.File
     import java.net.URI
    +import java.util.regex.Pattern
    --- End diff --
    
    Done


---

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


[GitHub] spark issue #23102: [SPARK-26137][CORE] Use Java system property "file.separ...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/23102
  
    Merged build finished. Test PASSed.


---

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


[GitHub] spark issue #23102: [SPARK-26137][CORE] Use Java system property "file.separ...

Posted by kiszk <gi...@git.apache.org>.
Github user kiszk commented on the issue:

    https://github.com/apache/spark/pull/23102
  
    Would it be possible to update the PR description based on the template?


---

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


[GitHub] spark pull request #23102: [SPARK-26137][CORE] Use Java system property "fil...

Posted by srowen <gi...@git.apache.org>.
Github user srowen commented on a diff in the pull request:

    https://github.com/apache/spark/pull/23102#discussion_r236703765
  
    --- Diff: core/src/main/scala/org/apache/spark/deploy/DependencyUtils.scala ---
    @@ -19,6 +19,7 @@ package org.apache.spark.deploy
     
     import java.io.File
     import java.net.URI
    +import java.util.regex.Pattern
    --- End diff --
    
    (Remove this import)


---

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


[GitHub] spark issue #23102: [SPARK-26137][CORE] Use Java system property "file.separ...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/23102
  
    Test FAILed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/99189/
    Test FAILed.


---

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


[GitHub] spark issue #23102: [SPARK-26137][CORE] Use Java system property "file.separ...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/23102
  
    Test PASSed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/99281/
    Test PASSed.


---

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


[GitHub] spark issue #23102: [SPARK-26137][CORE] Use Java system property "file.separ...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/23102
  
    Merged build finished. Test PASSed.


---

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


[GitHub] spark pull request #23102: [SPARK-26137][CORE] Use Java system property "fil...

Posted by srowen <gi...@git.apache.org>.
Github user srowen commented on a diff in the pull request:

    https://github.com/apache/spark/pull/23102#discussion_r235546231
  
    --- Diff: core/src/main/scala/org/apache/spark/deploy/DependencyUtils.scala ---
    @@ -65,7 +65,7 @@ private[deploy] object DependencyUtils extends Logging {
           .map {
             resolveGlobPaths(_, hadoopConf)
               .split(",")
    -          .filterNot(_.contains(userJar.split("/").last))
    +          .filterNot(_.contains(userJar.split(System.getProperty("file.separator")).last))
    --- End diff --
    
    `File.separator` is better


---

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


[GitHub] spark issue #23102: [SPARK-26137][CORE] Use Java system property "file.separ...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/23102
  
    Merged build finished. Test FAILed.


---

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


[GitHub] spark issue #23102: [SPARK-26137][CORE] Use Java system property "file.separ...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/23102
  
    Merged build finished. Test PASSed.


---

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


[GitHub] spark issue #23102: [SPARK-26137][CORE] Use Java system property "file.separ...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/23102
  
    Can one of the admins verify this patch?


---

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


[GitHub] spark issue #23102: [SPARK-26137][CORE] Use Java system property "file.separ...

Posted by kiszk <gi...@git.apache.org>.
Github user kiszk commented on the issue:

    https://github.com/apache/spark/pull/23102
  
    @MaxGekk This PR may change a separator for `userJar` that has `\` on Windows. `resolveGlobPaths` is not applied to `userJar`.


---

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


[GitHub] spark issue #23102: [SPARK-26137][CORE] Use Java system property "file.separ...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/23102
  
    **[Test build #99189 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/99189/testReport)** for PR 23102 at commit [`922df1b`](https://github.com/apache/spark/commit/922df1bb07f6b2a88a8c29f076fb3097f8b4599a).
     * This patch **fails Scala style tests**.
     * This patch merges cleanly.
     * This patch adds no public classes.


---

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


[GitHub] spark issue #23102: [SPARK-26137][CORE] Use Java system property "file.separ...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/23102
  
    Merged build finished. Test FAILed.


---

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


[GitHub] spark issue #23102: [SPARK-26137][CORE] Use Java system property "file.separ...

Posted by kiszk <gi...@git.apache.org>.
Github user kiszk commented on the issue:

    https://github.com/apache/spark/pull/23102
  
    Thank you for submitting a PR to fix hard coded character. Is this only one that we have to fix regarding this hard coded character?


---

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


[GitHub] spark pull request #23102: [SPARK-26137][CORE] Use Java system property "fil...

Posted by HyukjinKwon <gi...@git.apache.org>.
Github user HyukjinKwon commented on a diff in the pull request:

    https://github.com/apache/spark/pull/23102#discussion_r235570156
  
    --- Diff: core/src/main/scala/org/apache/spark/deploy/DependencyUtils.scala ---
    @@ -65,7 +65,7 @@ private[deploy] object DependencyUtils extends Logging {
           .map {
             resolveGlobPaths(_, hadoopConf)
               .split(",")
    -          .filterNot(_.contains(userJar.split("/").last))
    +          .filterNot(_.contains(userJar.split(System.getProperty("file.separator")).last))
    --- End diff --
    
    +1


---

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


[GitHub] spark issue #23102: [SPARK-26137][CORE] Use Java system property "file.separ...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/23102
  
    **[Test build #99281 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/99281/testReport)** for PR 23102 at commit [`4ab68f0`](https://github.com/apache/spark/commit/4ab68f08dbf1a0489adcd3a6657251a836fea8bc).
     * This patch passes all tests.
     * This patch merges cleanly.
     * This patch adds no public classes.


---

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


[GitHub] spark pull request #23102: [SPARK-26137][CORE] Use Java system property "fil...

Posted by markpavey <gi...@git.apache.org>.
Github user markpavey commented on a diff in the pull request:

    https://github.com/apache/spark/pull/23102#discussion_r236343483
  
    --- Diff: core/src/main/scala/org/apache/spark/deploy/DependencyUtils.scala ---
    @@ -61,11 +61,13 @@ private[deploy] object DependencyUtils extends Logging {
           hadoopConf: Configuration,
           secMgr: SecurityManager): String = {
         val targetDir = Utils.createTempDir()
    +    val fileSeparator = Pattern.quote(File.separator)
    --- End diff --
    
    The Java String.split method treats its parameter as a regular expression. The File.separator is a single backslash '\' it throws a PatternSyntaxException. Wrapping it in Pattern.quote ensures it is interpreted as a literal value.


---

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


[GitHub] spark issue #23102: [SPARK-26137][CORE] Use Java system property "file.separ...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/23102
  
    Test FAILed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/99280/
    Test FAILed.


---

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


[GitHub] spark issue #23102: [SPARK-26137][CORE] Use Java system property "file.separ...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/23102
  
    Merged build finished. Test PASSed.


---

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


[GitHub] spark issue #23102: [SPARK-26137][CORE] Use Java system property "file.separ...

Posted by dongjoon-hyun <gi...@git.apache.org>.
Github user dongjoon-hyun commented on the issue:

    https://github.com/apache/spark/pull/23102
  
    ok to test


---

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


[GitHub] spark pull request #23102: [SPARK-26137][CORE] Use Java system property "fil...

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

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


---

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


[GitHub] spark issue #23102: [SPARK-26137][CORE] Use Java system property "file.separ...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/23102
  
    **[Test build #99140 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/99140/testReport)** for PR 23102 at commit [`09cb210`](https://github.com/apache/spark/commit/09cb210ce2092338f954467926b6cacd09d60eec).


---

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


[GitHub] spark issue #23102: [SPARK-26137][CORE] Use Java system property "file.separ...

Posted by MaxGekk <gi...@git.apache.org>.
Github user MaxGekk commented on the issue:

    https://github.com/apache/spark/pull/23102
  
    Just for double checking, are the changes really needed? `resolveGlobPaths` calls `resolveGlobPath` -> `toUri` -> `normalizePath` in which Windows specific `\\` is replaced by `/`: https://github.com/apache/hadoop-common/blob/42a61a4fbc88303913c4681f0d40ffcc737e70b5/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/Path.java#L242-L250
    
    We need a test (or a reproducible example) for this at least.


---

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


[GitHub] spark pull request #23102: [SPARK-26137][CORE] Use Java system property "fil...

Posted by markpavey <gi...@git.apache.org>.
Github user markpavey commented on a diff in the pull request:

    https://github.com/apache/spark/pull/23102#discussion_r236343933
  
    --- Diff: core/src/main/scala/org/apache/spark/deploy/DependencyUtils.scala ---
    @@ -19,11 +19,11 @@ package org.apache.spark.deploy
     
     import java.io.File
     import java.net.URI
    +import java.util.regex.Pattern
     
     import org.apache.commons.lang3.StringUtils
     import org.apache.hadoop.conf.Configuration
     import org.apache.hadoop.fs.{FileSystem, Path}
    -
    --- End diff --
    
    Oops, I have pushed a commit to correct this.


---

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


[GitHub] spark pull request #23102: [SPARK-26137][CORE] Use Java system property "fil...

Posted by srowen <gi...@git.apache.org>.
Github user srowen commented on a diff in the pull request:

    https://github.com/apache/spark/pull/23102#discussion_r236343465
  
    --- Diff: core/src/main/scala/org/apache/spark/deploy/DependencyUtils.scala ---
    @@ -61,11 +61,13 @@ private[deploy] object DependencyUtils extends Logging {
           hadoopConf: Configuration,
           secMgr: SecurityManager): String = {
         val targetDir = Utils.createTempDir()
    +    val fileSeparator = Pattern.quote(File.separator)
    --- End diff --
    
    My bad. `separator` is a string and will be interpreted as a regex. Split on `File.separatorChar` instead and it will split as expected. No Pattern needed.


---

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


[GitHub] spark issue #23102: [SPARK-26137][CORE] Use Java system property "file.separ...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/23102
  
    **[Test build #99281 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/99281/testReport)** for PR 23102 at commit [`4ab68f0`](https://github.com/apache/spark/commit/4ab68f08dbf1a0489adcd3a6657251a836fea8bc).


---

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


[GitHub] spark issue #23102: [SPARK-26137][CORE] Use Java system property "file.separ...

Posted by HyukjinKwon <gi...@git.apache.org>.
Github user HyukjinKwon commented on the issue:

    https://github.com/apache/spark/pull/23102
  
    @markpavey, can you write a test? I can run the test on Windows via AppVeyor.


---

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


[GitHub] spark issue #23102: [SPARK-26137][CORE] Use Java system property "file.separ...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/23102
  
    Test PASSed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/testing-k8s-prb-make-spark-distribution-unified/5364/
    Test PASSed.


---

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


[GitHub] spark pull request #23102: [SPARK-26137][CORE] Use Java system property "fil...

Posted by srowen <gi...@git.apache.org>.
Github user srowen commented on a diff in the pull request:

    https://github.com/apache/spark/pull/23102#discussion_r236347084
  
    --- Diff: core/src/main/scala/org/apache/spark/deploy/DependencyUtils.scala ---
    @@ -61,11 +61,13 @@ private[deploy] object DependencyUtils extends Logging {
           hadoopConf: Configuration,
           secMgr: SecurityManager): String = {
         val targetDir = Utils.createTempDir()
    +    val fileSeparator = Pattern.quote(File.separator)
    --- End diff --
    
    This should be OK in Scala: 
    ```
    scala> "foo\\bar".split('\\')
    res2: Array[String] = Array(foo, bar)
    ```


---

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


[GitHub] spark issue #23102: [SPARK-26137][CORE] Use Java system property "file.separ...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/23102
  
    Test PASSed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/testing-k8s-prb-make-spark-distribution-unified/5288/
    Test PASSed.


---

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


[GitHub] spark issue #23102: [SPARK-26137][CORE] Use Java system property "file.separ...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/23102
  
    **[Test build #99189 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/99189/testReport)** for PR 23102 at commit [`922df1b`](https://github.com/apache/spark/commit/922df1bb07f6b2a88a8c29f076fb3097f8b4599a).


---

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


[GitHub] spark issue #23102: [SPARK-26137][CORE] Use Java system property "file.separ...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/23102
  
    Merged build finished. Test PASSed.


---

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


[GitHub] spark issue #23102: [SPARK-26137][CORE] Use Java system property "file.separ...

Posted by srowen <gi...@git.apache.org>.
Github user srowen commented on the issue:

    https://github.com/apache/spark/pull/23102
  
    Merged to master/2.4/2.3


---

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


[GitHub] spark issue #23102: [SPARK-26137][CORE] Use Java system property "file.separ...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/23102
  
    Merged build finished. Test PASSed.


---

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


[GitHub] spark issue #23102: [SPARK-26137][CORE] Use Java system property "file.separ...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/23102
  
    Merged build finished. Test PASSed.


---

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


[GitHub] spark pull request #23102: [SPARK-26137][CORE] Use Java system property "fil...

Posted by HyukjinKwon <gi...@git.apache.org>.
Github user HyukjinKwon commented on a diff in the pull request:

    https://github.com/apache/spark/pull/23102#discussion_r236341337
  
    --- Diff: core/src/main/scala/org/apache/spark/deploy/DependencyUtils.scala ---
    @@ -61,11 +61,13 @@ private[deploy] object DependencyUtils extends Logging {
           hadoopConf: Configuration,
           secMgr: SecurityManager): String = {
         val targetDir = Utils.createTempDir()
    +    val fileSeparator = Pattern.quote(File.separator)
    --- End diff --
    
    Mind elaborating why this should be quoted


---

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


[GitHub] spark pull request #23102: [SPARK-26137][CORE] Use Java system property "fil...

Posted by markpavey <gi...@git.apache.org>.
Github user markpavey commented on a diff in the pull request:

    https://github.com/apache/spark/pull/23102#discussion_r236585831
  
    --- Diff: core/src/main/scala/org/apache/spark/deploy/DependencyUtils.scala ---
    @@ -61,11 +61,13 @@ private[deploy] object DependencyUtils extends Logging {
           hadoopConf: Configuration,
           secMgr: SecurityManager): String = {
         val targetDir = Utils.createTempDir()
    +    val fileSeparator = Pattern.quote(File.separator)
    --- End diff --
    
    Changed to use File.separatorChar.


---

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


[GitHub] spark issue #23102: [SPARK-26137][CORE] Use Java system property "file.separ...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/23102
  
    Can one of the admins verify this patch?


---

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


[GitHub] spark issue #23102: [SPARK-26137][CORE] Use Java system property "file.separ...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/23102
  
    Test PASSed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/99319/
    Test PASSed.


---

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


[GitHub] spark issue #23102: [SPARK-26137][CORE] Use Java system property "file.separ...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/23102
  
    Test PASSed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/99140/
    Test PASSed.


---

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


[GitHub] spark issue #23102: [SPARK-26137][CORE] Use Java system property "file.separ...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/23102
  
    **[Test build #99190 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/99190/testReport)** for PR 23102 at commit [`49ce5a8`](https://github.com/apache/spark/commit/49ce5a8329db43293b6ef4b22b2601594e7f4092).
     * This patch passes all tests.
     * This patch merges cleanly.
     * This patch adds no public classes.


---

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


[GitHub] spark issue #23102: [SPARK-26137][CORE] Use Java system property "file.separ...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/23102
  
    **[Test build #99319 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/99319/testReport)** for PR 23102 at commit [`46a6dd4`](https://github.com/apache/spark/commit/46a6dd4efb6c345be7a450c68485ff90ca1f9fb4).


---

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


[GitHub] spark issue #23102: [SPARK-26137][CORE] Use Java system property "file.separ...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/23102
  
    Test PASSed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/99333/
    Test PASSed.


---

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


[GitHub] spark issue #23102: [SPARK-26137][CORE] Use Java system property "file.separ...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/23102
  
    Merged build finished. Test PASSed.


---

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


[GitHub] spark issue #23102: [SPARK-26137][CORE] Use Java system property "file.separ...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/23102
  
    Test PASSed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/testing-k8s-prb-make-spark-distribution-unified/5401/
    Test PASSed.


---

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


[GitHub] spark issue #23102: [SPARK-26137][CORE] Use Java system property "file.separ...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/23102
  
    Test FAILed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/testing-k8s-prb-make-spark-distribution-unified/5287/
    Test FAILed.


---

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


[GitHub] spark pull request #23102: [SPARK-26137][CORE] Use Java system property "fil...

Posted by HyukjinKwon <gi...@git.apache.org>.
Github user HyukjinKwon commented on a diff in the pull request:

    https://github.com/apache/spark/pull/23102#discussion_r236341207
  
    --- Diff: core/src/main/scala/org/apache/spark/deploy/DependencyUtils.scala ---
    @@ -19,11 +19,11 @@ package org.apache.spark.deploy
     
     import java.io.File
     import java.net.URI
    +import java.util.regex.Pattern
     
     import org.apache.commons.lang3.StringUtils
     import org.apache.hadoop.conf.Configuration
     import org.apache.hadoop.fs.{FileSystem, Path}
    -
    --- End diff --
    
    Previous import style was correct. It complied project's style


---

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


[GitHub] spark pull request #23102: [SPARK-26137][CORE] Use Java system property "fil...

Posted by markpavey <gi...@git.apache.org>.
Github user markpavey commented on a diff in the pull request:

    https://github.com/apache/spark/pull/23102#discussion_r236340228
  
    --- Diff: core/src/main/scala/org/apache/spark/deploy/DependencyUtils.scala ---
    @@ -65,7 +65,7 @@ private[deploy] object DependencyUtils extends Logging {
           .map {
             resolveGlobPaths(_, hadoopConf)
               .split(",")
    -          .filterNot(_.contains(userJar.split("/").last))
    +          .filterNot(_.contains(userJar.split(System.getProperty("file.separator")).last))
    --- End diff --
    
    I have updated to use File.separator instead of System.getProperty("file.separator").


---

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


[GitHub] spark issue #23102: [SPARK-26137][CORE] Use Java system property "file.separ...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/23102
  
    Test PASSed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/testing-k8s-prb-make-spark-distribution-unified/5411/
    Test PASSed.


---

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


[GitHub] spark issue #23102: [SPARK-26137][CORE] Use Java system property "file.separ...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/23102
  
    **[Test build #99280 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/99280/testReport)** for PR 23102 at commit [`bfabd4f`](https://github.com/apache/spark/commit/bfabd4fb37c9140fa7b0603205b274222333f084).


---

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


[GitHub] spark pull request #23102: [SPARK-26137][CORE] Use Java system property "fil...

Posted by srowen <gi...@git.apache.org>.
Github user srowen commented on a diff in the pull request:

    https://github.com/apache/spark/pull/23102#discussion_r235821628
  
    --- Diff: core/src/main/scala/org/apache/spark/deploy/DependencyUtils.scala ---
    @@ -61,11 +62,12 @@ private[deploy] object DependencyUtils extends Logging {
           hadoopConf: Configuration,
           secMgr: SecurityManager): String = {
         val targetDir = Utils.createTempDir()
    +    val fileSeparator = Pattern.quote(System.getProperty("file.separator"))
         Option(jars)
           .map {
             resolveGlobPaths(_, hadoopConf)
               .split(",")
    -          .filterNot(_.contains(userJar.split("/").last))
    +          .filterNot(_.contains(userJar.split(fileSeparator).last))
    --- End diff --
    
    Just split on `File.separator`, not a regex.


---

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


[GitHub] spark issue #23102: [SPARK-26137][CORE] Use Java system property "file.separ...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/23102
  
    **[Test build #99140 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/99140/testReport)** for PR 23102 at commit [`09cb210`](https://github.com/apache/spark/commit/09cb210ce2092338f954467926b6cacd09d60eec).
     * This patch passes all tests.
     * This patch merges cleanly.
     * This patch adds no public classes.


---

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