-
Notifications
You must be signed in to change notification settings - Fork 28.9k
[SPARK-32121][SHUFFLE] Support Windows OS in ExecutorDiskUtils #28940
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
...huffle/src/test/java/org/apache/spark/network/shuffle/ExternalShuffleBlockResolverSuite.java
Outdated
Show resolved
Hide resolved
|
ok to test |
common/network-shuffle/src/main/java/org/apache/spark/network/shuffle/ExecutorDiskUtils.java
Outdated
Show resolved
Hide resolved
|
Looks fine. |
|
Test build #124618 has finished for PR 28940 at commit
|
|
Test build #124627 has finished for PR 28940 at commit
|
...huffle/src/test/java/org/apache/spark/network/shuffle/ExternalShuffleBlockResolverSuite.java
Outdated
Show resolved
Hide resolved
...huffle/src/test/java/org/apache/spark/network/shuffle/ExternalShuffleBlockResolverSuite.java
Outdated
Show resolved
Hide resolved
...huffle/src/test/java/org/apache/spark/network/shuffle/ExternalShuffleBlockResolverSuite.java
Outdated
Show resolved
Hide resolved
common/network-shuffle/src/main/java/org/apache/spark/network/shuffle/ExecutorDiskUtils.java
Outdated
Show resolved
Hide resolved
|
Test build #124643 has finished for PR 28940 at commit
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Kinda unrelated to your change but i am keep wondering how often could the createNormalizedInternedPathname give back a different String than the FileSystem#normalize if that is the case then the String#intern does not save us from storing multiple copies of the result string within the File class as a path.
...huffle/src/test/java/org/apache/spark/network/shuffle/ExternalShuffleBlockResolverSuite.java
Outdated
Show resolved
Hide resolved
common/network-shuffle/src/main/java/org/apache/spark/network/shuffle/ExecutorDiskUtils.java
Outdated
Show resolved
Hide resolved
|
What about the following? As spark/common/network-shuffle/src/main/java/org/apache/spark/network/shuffle/ExecutorDiskUtils.java Lines 48 to 49 in 50a742d
What about creating the file with the constructor: public File(String pathname) {
if (pathname == null) {
throw new NullPointerException();
}
this.path = fs.normalize(pathname);
this.prefixLength = fs.prefixLength(this.path);
}Then read the path via @Ngone51 @HyukjinKwon what's your opinion? |
|
I was assuming we can't reuse
If it's clear that it's going to be more performant and simple, let's do it. Otherwise, let's just let get this in for now, and investigate that separately. |
|
We have to measure it for sure. Regarding simplicity of the solution I described it is basically sth like: And I checked the prefixLength calculation they are O(1):
Of course we can do it in separate PR too. |
| assertPathsMatch("/", "", "", File.separator); | ||
| assertPathsMatch("/", "/", "/", File.separator); | ||
| String sep = File.separator; | ||
| String expectedPathname1 = sep + "foo" + sep + "bar" + sep + "baz"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I meant this value only. The others are used only once.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I prefer to write in single style if there is no strict rule that "value used only once must be inlined"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Extracting a variable which only used once just increases the indirection.
Especially here where the role of the value is trivial. If it would be something complex then I might understand to use a describing name but here not.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, reverted.
|
Test build #124656 has finished for PR 28940 at commit
|
|
retest this please |
common/network-shuffle/src/main/java/org/apache/spark/network/shuffle/ExecutorDiskUtils.java
Outdated
Show resolved
Hide resolved
|
Test build #124722 has finished for PR 28940 at commit
|
|
Test build #124744 has finished for PR 28940 at commit
|
|
retest this please |
|
Regarding the changes below I will create a PR and open a new Jira ticket (so it will be taken care of).
|
|
Sure, @attilapiros. Thanks you for following up and investigating deep. I will merge this one as soon as the tests pass. |
|
Test build #124765 has finished for PR 28940 at commit
|
|
retest this please |
|
Test build #124783 has finished for PR 28940 at commit
|
|
retest this please |
|
Test build #124790 has finished for PR 28940 at commit
|
|
Retest this please. |
|
Test build #124827 has finished for PR 28940 at commit
|
|
retest this please |
|
Test build #124838 has finished for PR 28940 at commit
|
|
retest this please |
|
Test build #124840 has finished for PR 28940 at commit
|
|
retest this please |
|
Test build #124850 has finished for PR 28940 at commit
|
|
retest this please |
|
Test build #124859 has finished for PR 28940 at commit
|
|
retest this please |
|
Test build #124873 has finished for PR 28940 at commit
|
|
Merged to master and branch-3.0. |
### What changes were proposed in this pull request? Correct file seprate use in `ExecutorDiskUtils.createNormalizedInternedPathname` on Windows ### Why are the changes needed? `ExternalShuffleBlockResolverSuite` failed on Windows, see detail at: https://issues.apache.org/jira/browse/SPARK-32121 ### Does this PR introduce _any_ user-facing change? No ### How was this patch tested? The existed test suite. Closes #28940 from pan3793/SPARK-32121. Lead-authored-by: pancheng <[email protected]> Co-authored-by: chengpan <[email protected]> Signed-off-by: HyukjinKwon <[email protected]> (cherry picked from commit 7fda184) Signed-off-by: HyukjinKwon <[email protected]>
What changes were proposed in this pull request?
Correct file seprate use in
ExecutorDiskUtils.createNormalizedInternedPathnameon WindowsWhy are the changes needed?
ExternalShuffleBlockResolverSuitefailed on Windows, see detail at:https://issues.apache.org/jira/browse/SPARK-32121
Does this PR introduce any user-facing change?
No
How was this patch tested?
The existed test suite.