Uh oh!
There was an error while loading. Please reload this page.
[SPARK-18099][YARN] Fail if same files added to distributed cache for --files and --archives - #15627
[SPARK-18099][YARN] Fail if same files added to distributed cache for --files and --archives#15627kishorvpatil wants to merge 5 commits into
Conversation
SparkQA
commented
Oct 25, 2016
Test build #67525 has finished for PR 15627 at commit
|
tgravescs
commented
Oct 26, 2016
@kishorvpatil please look at the test failure |
SparkQA
commented
Oct 26, 2016
Test build #67600 has finished for PR 15627 at commit
|
… under archives and files
tgravescs
commented
Oct 27, 2016
Jenkins, test this please |
tgravescs
commented
Oct 27, 2016
Jenkins, add to whitelist |
| cachedSecondaryJarLinks += localizedPath | ||
| } | ||
| } else { | ||
| require(localizedPath !=null) |
There was a problem hiding this comment.
Lets change the error to illegal argument exception.
Also lets comment this to indicate jars are ok due to spark 2.0 jar install, everything else shouldn't have multiple of same jar/file/archive.
SparkQA
commented
Oct 27, 2016
Test build #67648 has finished for PR 15627 at commit
|
SparkQA
commented
Oct 27, 2016
Test build #67649 has finished for PR 15627 at commit
|
| } else { | ||
| if (localizedPath != null) { | ||
| throw new IllegalArgumentException(s"Attempt to add ($file) multiple times. " + | ||
| "Please check the values of 'spark.yarn.dist.files' and/or " + |
There was a problem hiding this comment.
can you remove the part about check values of those specific configs because there are multiple ways for these to specified (configs or --files, --jars, etc). Perhaps just say please check the values you specified for uploading files,jars, and archives to make sure one isn't specified multiple times..
SparkQA
commented
Oct 28, 2016
Test build #67719 has finished for PR 15627 at commit
|
SparkQA
commented
Oct 28, 2016
Test build #67720 has finished for PR 15627 at commit
|
| val (_, localizedPath) = distribute(file, resType = resType) | ||
| if (addToClasspath && localizedPath != null) { | ||
| cachedSecondaryJarLinks += localizedPath | ||
| if (addToClasspath) { |
There was a problem hiding this comment.
can you add a comment here explaining what exactly thi sis doing to help explain and keep from breaking in future.
Also can you add another unit test to cover this case.
SparkQA
commented
Oct 31, 2016
Test build #67826 has finished for PR 15627 at commit
|
| val userLib1 = Utils.createTempDir() | ||
| val userLib2 = Utils.createTempDir() | ||
| val jar1 = TestUtils.createJarWithFiles(Map(), jarsDir) |
| test("distribute archive multiple times") { | ||
| val libs = Utils.createTempDir() | ||
| val jarsDir = new File(libs, "jars") | ||
| assert(jarsDir.mkdir()) |
There was a problem hiding this comment.
I don't see jarsDir being used anywhere either
| val output = new FileOutputStream(target) | ||
| Utils.copyStream(input, output, closeStreams = true) | ||
| target.toURI.toURL | ||
| } |
There was a problem hiding this comment.
If we can cleanup the variables names above I think it would help a lot, the test is confusing. I know you just copy and pasted but would be nice to clean up.
Also can we have 3 tests or 3 asserts,
- one for same file in --files
- one for same file in --archives
- one for same file in --files and --archives
SparkQA
commented
Nov 3, 2016
Test build #68083 has finished for PR 15627 at commit
|
tgravescs
commented
Nov 3, 2016
+1 |
… --files and --archives ## What changes were proposed in this pull request? During spark-submit, if yarn dist cache is instructed to add same file under --files and --archives, This code change ensures the spark yarn distributed cache behaviour is retained i.e. to warn and fail if same files is mentioned in both --files and --archives. ## How was this patch tested? Manually tested: 1. if same jar is mentioned in --jars and --files it will continue to submit the job. - basically functionality [SPARK-14423] #12203 is unchanged 1. if same file is mentioned in --files and --archives it will fail to submit the job. Please review https://cwiki.apache.org/confluence/display/SPARK/Contributing+to+Spark before opening a pull request. … under archives and files Author: Kishor Patil <kpatil@yahoo-inc.com> Closes#15627 from kishorvpatil/spark18099. (cherry picked from commit 098e4ca) Signed-off-by: Tom Graves <tgraves@yahoo-inc.com>
ueshin
commented
Nov 8, 2016
@kishorvpatil@tgravescs It seems this pr is breaking functionalities of |
| } | ||
| } else { | ||
| require(localizedPath !=null) | ||
| if (localizedPath != null) { |
There was a problem hiding this comment.
I guess here is localizedPath == null ?
tgravescs
commented
Nov 8, 2016
thanks for pointing this out |
tgravescs
commented
Nov 8, 2016
SPARK-18357 filed to fix |
kishorvpatil
commented
Nov 8, 2016
## What changes were proposed in this pull request? The #15627 broke functionality with yarn --files --archives does not accept any files. This patch ensures that --files and --archives accept unique files. ## How was this patch tested? A. I added unit tests. B. Also, manually tested --files with --archives to throw exception if duplicate files are specified and continue if unique files are specified. Author: Kishor Patil <kpatil@yahoo-inc.com> Closes#15810 from kishorvpatil/SPARK18357. (cherry picked from commit 245e5a2) Signed-off-by: Tom Graves <tgraves@yahoo-inc.com>
## What changes were proposed in this pull request? The apache#15627 broke functionality with yarn --files --archives does not accept any files. This patch ensures that --files and --archives accept unique files. ## How was this patch tested? A. I added unit tests. B. Also, manually tested --files with --archives to throw exception if duplicate files are specified and continue if unique files are specified. Author: Kishor Patil <kpatil@yahoo-inc.com> Closesapache#15810 from kishorvpatil/SPARK18357.
ueshin
commented
Nov 9, 2016
@kishorvpatil Thank you for fixing this! |
… --files and --archives ## What changes were proposed in this pull request? During spark-submit, if yarn dist cache is instructed to add same file under --files and --archives, This code change ensures the spark yarn distributed cache behaviour is retained i.e. to warn and fail if same files is mentioned in both --files and --archives. ## How was this patch tested? Manually tested: 1. if same jar is mentioned in --jars and --files it will continue to submit the job. - basically functionality [SPARK-14423] apache#12203 is unchanged 1. if same file is mentioned in --files and --archives it will fail to submit the job. Please review https://cwiki.apache.org/confluence/display/SPARK/Contributing+to+Spark before opening a pull request. … under archives and files Author: Kishor Patil <kpatil@yahoo-inc.com> Closesapache#15627 from kishorvpatil/spark18099.
## What changes were proposed in this pull request? The apache#15627 broke functionality with yarn --files --archives does not accept any files. This patch ensures that --files and --archives accept unique files. ## How was this patch tested? A. I added unit tests. B. Also, manually tested --files with --archives to throw exception if duplicate files are specified and continue if unique files are specified. Author: Kishor Patil <kpatil@yahoo-inc.com> Closesapache#15810 from kishorvpatil/SPARK18357.
What changes were proposed in this pull request?
During spark-submit, if yarn dist cache is instructed to add same file under --files and --archives, This code change ensures the spark yarn distributed cache behaviour is retained i.e. to warn and fail if same files is mentioned in both --files and --archives.
How was this patch tested?
Manually tested:
Please review https://cwiki.apache.org/confluence/display/SPARK/Contributing+to+Spark before opening a pull request.
… under archives and files