Skip to content

Conversation

@liyichao
Copy link
Contributor

@liyichao liyichao commented May 27, 2017

What changes were proposed in this pull request?

In Spark on YARN, when configuring "spark.yarn.jars" with local jars (jars started with "local" scheme), we will get inaccurate classpath for AM and containers. This is because we don't remove "local" scheme when concatenating classpath. It is OK to run because classpath is separated with ":" and java treat "local" as a separate jar. But we could improve it to remove the scheme.

How was this patch tested?

Updated ClientSuite to check "local" is not in the classpath.

cc @jerryshao

@liyichao liyichao changed the title Remove LocalSchem when add path to ClassPath. [SPARK-20365][YARN][WIP] Remove LocalSchem when add path to ClassPath. May 27, 2017
@liyichao liyichao changed the title [SPARK-20365][YARN][WIP] Remove LocalSchem when add path to ClassPath. [SPARK-20365][YARN] Remove LocalSchem when add path to ClassPath. May 27, 2017
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.

@jerryshao
Copy link
Contributor

CC @vanzin to take a review.

Copy link
Contributor

@vanzin vanzin left a comment

Choose a reason for hiding this comment

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

Style nit, otherwise looks good pending tests.

cp should contain (uri.getPath())
} else {
cp should not contain (uri.getPath())
cp should not 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.

Could you avoid these noisy changes and also keep the existing style of using parentheses in the code you're actually adding?

@vanzin
Copy link
Contributor

vanzin commented May 31, 2017

ok to test

@SparkQA
Copy link

SparkQA commented May 31, 2017

Test build #77596 has finished for PR 18129 at commit 79105f8.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@SparkQA
Copy link

SparkQA commented Jun 1, 2017

Test build #77623 has finished for PR 18129 at commit 683f0d9.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

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").

@SparkQA
Copy link

SparkQA commented Jun 1, 2017

Test build #77645 has finished for PR 18129 at commit 35e5859.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@vanzin
Copy link
Contributor

vanzin commented Jun 1, 2017

Merging to master / 2.2.

asfgit pushed a commit that referenced this pull request Jun 1, 2017
In Spark on YARN, when configuring "spark.yarn.jars" with local jars (jars started with "local" scheme), we will get inaccurate classpath for AM and containers. This is because we don't remove "local" scheme when concatenating classpath. It is OK to run because classpath is separated with ":" and java treat "local" as a separate jar. But we could improve it to remove the scheme.

Updated `ClientSuite` to check "local" is not in the classpath.

cc jerryshao

Author: Li Yichao <[email protected]>
Author: Li Yichao <[email protected]>

Closes #18129 from liyichao/SPARK-20365.

(cherry picked from commit 640afa4)
Signed-off-by: Marcelo Vanzin <[email protected]>
@vanzin
Copy link
Contributor

vanzin commented Jun 1, 2017

@liyichao please update the bug with your JIRA handle if you want it assigned to you.

@asfgit asfgit closed this in 640afa4 Jun 1, 2017
@liyichao liyichao deleted the SPARK-20365 branch June 11, 2017 14:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants