[SPARK-18842][TESTS][LAUNCHER] De-duplicate paths in classpaths in commands for local-cluster mode to work around the path length limitation on Windows#16266
Conversation
srowen
left a comment
There was a problem hiding this comment.
Nice work, great to get these back online
|
It seems I underestimated the instances using Thank you for approving. I will try to double-check. |
| "SPARK_DIST_CLASSPATH" -> | ||
| (fullClasspath in Test).value.files.map(_.getAbsolutePath).mkString(":").stripSuffix(":"), | ||
| (fullClasspath in Test).value.files.map(_.getAbsolutePath) | ||
| .mkString(File.pathSeparator).stripSuffix(File.pathSeparator), |
There was a problem hiding this comment.
This is a required change because in addToClassPath, it is split with File.pathSeparator. If this is :, then it is not split and ends up with long duplicated paths on Windows.
|
Build started: [TESTS] |
|
Test build #70085 has finished for PR 16266 at commit
|
|
Let me try to fix the tests accordingly. |
|
Test build #70111 has finished for PR 16266 at commit
|
|
retest this please |
|
Build started: [TESTS] |
|
Test build #70121 has finished for PR 16266 at commit
|
|
@srowen, I think it is ready for a second look. |
|
(note to myself) the last one in The reason seems the test uses |
|
Merged to master |
…mmands for local-cluster mode to work around the path length limitation on Windows ## What changes were proposed in this pull request? Currently, some tests are being failed and hanging on Windows due to this problem. For the reason in SPARK-18718, some tests using `local-cluster` mode were disabled on Windows due to the length limitation by paths given to classpaths. The limitation seems roughly 32K (see the [blog in MS](https://blogs.msdn.microsoft.com/oldnewthing/20031210-00/?p=41553/) and [another reference](https://support.thoughtworks.com/hc/en-us/articles/213248526-Getting-around-maximum-command-line-length-is-32767-characters-on-Windows)) but in `local-cluster` mode, executors were being launched as processes with the command such as [here](https://gist.github.com/HyukjinKwon/5bc81061c250d4af5a180869b59d42ea) in (only) tests. This length is roughly 40K due to the classpaths given to `java` command. However, it seems duplicates are almost half of them. So, if we deduplicate the paths, it seems reduced to roughly 20K with the command, [here](https://gist.github.com/HyukjinKwon/dad0c8db897e5e094684a2dc6a417790). Maybe, we should consider as some more paths are added in the future but it seems better than disabling all the tests for now with minimised changes. Therefore, this PR proposes to deduplicate the paths in classpaths in case of launching executors as processes in `local-cluster` mode. ## How was this patch tested? Existing tests in `ShuffleSuite` and `BroadcastJoinSuite` manually via AppVeyor Author: hyukjinkwon <gurwls223@gmail.com> Closes apache#16266 from HyukjinKwon/disable-local-cluster-tests.
…mmands for local-cluster mode to work around the path length limitation on Windows ## What changes were proposed in this pull request? Currently, some tests are being failed and hanging on Windows due to this problem. For the reason in SPARK-18718, some tests using `local-cluster` mode were disabled on Windows due to the length limitation by paths given to classpaths. The limitation seems roughly 32K (see the [blog in MS](https://blogs.msdn.microsoft.com/oldnewthing/20031210-00/?p=41553/) and [another reference](https://support.thoughtworks.com/hc/en-us/articles/213248526-Getting-around-maximum-command-line-length-is-32767-characters-on-Windows)) but in `local-cluster` mode, executors were being launched as processes with the command such as [here](https://gist.github.com/HyukjinKwon/5bc81061c250d4af5a180869b59d42ea) in (only) tests. This length is roughly 40K due to the classpaths given to `java` command. However, it seems duplicates are almost half of them. So, if we deduplicate the paths, it seems reduced to roughly 20K with the command, [here](https://gist.github.com/HyukjinKwon/dad0c8db897e5e094684a2dc6a417790). Maybe, we should consider as some more paths are added in the future but it seems better than disabling all the tests for now with minimised changes. Therefore, this PR proposes to deduplicate the paths in classpaths in case of launching executors as processes in `local-cluster` mode. ## How was this patch tested? Existing tests in `ShuffleSuite` and `BroadcastJoinSuite` manually via AppVeyor Author: hyukjinkwon <gurwls223@gmail.com> Closes apache#16266 from HyukjinKwon/disable-local-cluster-tests.
What changes were proposed in this pull request?
Currently, some tests are being failed and hanging on Windows due to this problem. For the reason in SPARK-18718, some tests using
local-clustermode were disabled on Windows due to the length limitation by paths given to classpaths.The limitation seems roughly 32K (see the blog in MS and another reference) but in
local-clustermode, executors were being launched as processes with the command such as here in (only) tests.This length is roughly 40K due to the classpaths given to
javacommand. However, it seems duplicates are almost half of them. So, if we deduplicate the paths, it seems reduced to roughly 20K with the command, here.Maybe, we should consider as some more paths are added in the future but it seems better than disabling all the tests for now with minimised changes.
Therefore, this PR proposes to deduplicate the paths in classpaths in case of launching executors as processes in
local-clustermode.How was this patch tested?
Existing tests in
ShuffleSuiteandBroadcastJoinSuitemanually via AppVeyor