Skip to content

Conversation

@jerryshao
Copy link
Contributor

What changes were proposed in this pull request?

Currently in Spark there're two issues when we add jars with invalid path:

  • If the jar path is a empty string {--jar ",dummy.jar"}, then Spark will resolve it to the current directory path and add to classpath / file server, which is unwanted. This is happened in our programatic way to submit Spark application. From my understanding Spark should defensively filter out such empty path.
  • If the jar path is a invalid path (file doesn't exist), addJar doesn't check it and will still add to file server, the exception will be delayed until job running. Actually this local path could be checked beforehand, no need to wait until task running. We have similar check in addFile, but lacks similar similar mechanism in addJar.

How was this patch tested?

Add unit test and local manual verification.

Change-Id: I97c3fa0b0c2c1e9584d7d3abd30e352266f116be
@SparkQA
Copy link

SparkQA commented Feb 23, 2017

Test build #73339 has finished for PR 17038 at commit db5c287.

  • This patch fails Spark unit tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@jerryshao
Copy link
Contributor Author

Jenkins, retest this please.

@SparkQA
Copy link

SparkQA commented Feb 23, 2017

Test build #73347 has finished for PR 17038 at commit db5c287.

  • This patch fails Spark unit tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@vanzin
Copy link
Contributor

vanzin commented Feb 23, 2017

LGTM.

retest this please

@jerryshao
Copy link
Contributor Author

Jenkins, retest this please.

@SparkQA
Copy link

SparkQA commented Feb 24, 2017

Test build #73387 has finished for PR 17038 at commit db5c287.

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

@vanzin
Copy link
Contributor

vanzin commented Feb 24, 2017

Merging to master (2.1 if no conflicts).

asfgit pushed a commit that referenced this pull request Feb 24, 2017
## What changes were proposed in this pull request?

Currently in Spark there're two issues when we add jars with invalid path:

* If the jar path is a empty string {--jar ",dummy.jar"}, then Spark will resolve it to the current directory path and add to classpath / file server, which is unwanted. This is happened in our programatic way to submit Spark application. From my understanding Spark should defensively filter out such empty path.
* If the jar path is a invalid path (file doesn't exist), `addJar` doesn't check it and will still add to file server, the exception will be delayed until job running. Actually this local path could be checked beforehand, no need to wait until task running. We have similar check in `addFile`, but lacks similar similar mechanism in `addJar`.

## How was this patch tested?

Add unit test and local manual verification.

Author: jerryshao <[email protected]>

Closes #17038 from jerryshao/SPARK-19707.

(cherry picked from commit b0a8c16)
Signed-off-by: Marcelo Vanzin <[email protected]>
@asfgit asfgit closed this in b0a8c16 Feb 24, 2017
Yunni pushed a commit to Yunni/spark that referenced this pull request Feb 27, 2017
## What changes were proposed in this pull request?

Currently in Spark there're two issues when we add jars with invalid path:

* If the jar path is a empty string {--jar ",dummy.jar"}, then Spark will resolve it to the current directory path and add to classpath / file server, which is unwanted. This is happened in our programatic way to submit Spark application. From my understanding Spark should defensively filter out such empty path.
* If the jar path is a invalid path (file doesn't exist), `addJar` doesn't check it and will still add to file server, the exception will be delayed until job running. Actually this local path could be checked beforehand, no need to wait until task running. We have similar check in `addFile`, but lacks similar similar mechanism in `addJar`.

## How was this patch tested?

Add unit test and local manual verification.

Author: jerryshao <[email protected]>

Closes apache#17038 from jerryshao/SPARK-19707.
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