-
Notifications
You must be signed in to change notification settings - Fork 28.3k
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-26137][CORE] Use Java system property "file.separator" inste… #23102
Changes from 1 commit
49ce5a8
24c05e3
bfabd4f
4ab68f0
e1e97aa
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,6 +19,7 @@ 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 | ||
|
@@ -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)) | ||
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. Just split on 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. Beyond the original purpose of this PR, is it better to move |
||
.mkString(",") | ||
} | ||
.filterNot(_ == "") | ||
|
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.
(Remove this import)
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.
Done