Skip to content
Closed
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -1275,7 +1275,8 @@ private object Client extends Logging {
if (sparkConf.get(SPARK_ARCHIVE).isEmpty) {
sparkConf.get(SPARK_JARS).foreach { jars =>
jars.filter(isLocalUri).foreach { jar =>
addClasspathEntry(getClusterPath(sparkConf, jar), env)
val uri = new URI(jar)
addClasspathEntry(getClusterPath(sparkConf, uri.getPath), env)
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,15 +116,16 @@ class ClientSuite extends SparkFunSuite with Matchers with BeforeAndAfterAll
val cp = env("CLASSPATH").split(":|;|<CPS>")
s"$SPARK,$USER,$ADDED".split(",").foreach({ entry =>
val uri = new URI(entry)
if (LOCAL_SCHEME.equals(uri.getScheme())) {
cp should contain (uri.getPath())
if (LOCAL_SCHEME.equals(uri.getScheme)) {
cp should contain (uri.getPath)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe it is not so necessary to change the previous style.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is Intellij that advises the above changes. I will revert them.

} else {
cp should not contain (uri.getPath())
cp should not contain uri.getPath
}
})
cp should not contain "local"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you please add parentheses here ("local").

cp should contain(PWD)
cp should contain (s"$PWD${Path.SEPARATOR}${LOCALIZED_CONF_DIR}")
cp should not contain (APP_JAR)
cp should contain (s"$PWD${Path.SEPARATOR}$LOCALIZED_CONF_DIR")
cp should not contain APP_JAR
}

test("Jar path propagation through SparkConf") {
Expand Down