Skip to content

[SPARK-20365][YARN] Remove LocalSchem when add path to ClassPath. - #18129

Closed
lycplus wants to merge 5 commits into
apache:masterfrom
lycplus:SPARK-20365
Closed

[SPARK-20365][YARN] Remove LocalSchem when add path to ClassPath.#18129
lycplus wants to merge 5 commits into
apache:masterfrom
lycplus:SPARK-20365

Conversation

@lycplus

@lycpluslycplus commented May 27, 2017

Copy link
Copy Markdown
Contributor

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

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

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
Copy Markdown
Contributor

CC @vanzin to take a review.

@vanzinvanzin left a comment

Copy link
Copy Markdown
Contributor

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
Copy Markdown
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
Copy Markdown
Contributor

ok to test

@SparkQA

Copy link
Copy Markdown

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
Copy Markdown

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
Copy Markdown
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
Copy Markdown

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
Copy Markdown
Contributor

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 <lyc@zhihu.com>
Author: Li Yichao <liyichao.good@gmail.com>
Closes#18129 from liyichao/SPARK-20365.
(cherry picked from commit 640afa4)
Signed-off-by: Marcelo Vanzin <vanzin@cloudera.com>
@vanzin

Copy link
Copy Markdown
Contributor

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

@asfgitasfgit closed this in 640afa4Jun 1, 2017
@lycplus
lycplus deleted the SPARK-20365 branch June 11, 2017 14:09
Sign up for freeto 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

@lycplus@jerryshao@vanzin@SparkQA