Uh oh!
There was an error while loading. Please reload this page.
[SPARK-32121][SHUFFLE] Support Windows OS in ExecutorDiskUtils - #28940
[SPARK-32121][SHUFFLE] Support Windows OS in ExecutorDiskUtils#28940pan3793 wants to merge 10 commits into
Conversation
Uh oh!
There was an error while loading. Please reload this page.
HyukjinKwon
commented
Jun 29, 2020
ok to test |
Uh oh!
There was an error while loading. Please reload this page.
HyukjinKwon
commented
Jun 29, 2020
Looks fine. |
SparkQA
commented
Jun 29, 2020
Test build #124618 has finished for PR 28940 at commit
|
SparkQA
commented
Jun 29, 2020
Test build #124627 has finished for PR 28940 at commit
|
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
SparkQA
commented
Jun 29, 2020
Test build #124643 has finished for PR 28940 at commit
|
HyukjinKwon
commented
Jun 30, 2020
There was a problem hiding this comment.
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.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
What about the following? As What about creating the file with the constructor: publicFile(Stringpathname) {
if (pathname == null) {
thrownewNullPointerException();
}
this.path = fs.normalize(pathname);
this.prefixLength = fs.prefixLength(this.path);
}Then read the path via @Ngone51@HyukjinKwon what's your opinion? |
HyukjinKwon
commented
Jun 30, 2020
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.
I meant this value only. The others are used only once.
There was a problem hiding this comment.
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.
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.
HyukjinKwon
commented
Jul 1, 2020
retest this please |
Uh oh!
There was an error while loading. Please reload this page.
SparkQA
commented
Jul 1, 2020
Test build #124722 has finished for PR 28940 at commit
|
SparkQA
commented
Jul 1, 2020
Test build #124744 has finished for PR 28940 at commit
|
HyukjinKwon
commented
Jul 1, 2020
retest this please |
attilapiros
commented
Jul 1, 2020
Regarding the changes below I will create a PR and open a new Jira ticket (so it will be taken care of).
|
HyukjinKwon
commented
Jul 1, 2020
Sure, @attilapiros. Thanks you for following up and investigating deep. I will merge this one as soon as the tests pass. |
SparkQA
commented
Jul 1, 2020
Test build #124765 has finished for PR 28940 at commit
|
HyukjinKwon
commented
Jul 1, 2020
retest this please |
SparkQA
commented
Jul 1, 2020
Test build #124783 has finished for PR 28940 at commit
|
HyukjinKwon
commented
Jul 1, 2020
retest this please |
SparkQA
commented
Jul 1, 2020
Test build #124790 has finished for PR 28940 at commit
|
dongjoon-hyun
commented
Jul 1, 2020
Retest this please. |
SparkQA
commented
Jul 1, 2020
Test build #124827 has finished for PR 28940 at commit
|
HyukjinKwon
commented
Jul 2, 2020
retest this please |
SparkQA
commented
Jul 2, 2020
Test build #124838 has finished for PR 28940 at commit
|
HyukjinKwon
commented
Jul 2, 2020
retest this please |
SparkQA
commented
Jul 2, 2020
Test build #124840 has finished for PR 28940 at commit
|
HyukjinKwon
commented
Jul 2, 2020
retest this please |
SparkQA
commented
Jul 2, 2020
Test build #124850 has finished for PR 28940 at commit
|
HyukjinKwon
commented
Jul 2, 2020
retest this please |
SparkQA
commented
Jul 2, 2020
Test build #124859 has finished for PR 28940 at commit
|
HyukjinKwon
commented
Jul 2, 2020
retest this please |
SparkQA
commented
Jul 2, 2020
Test build #124873 has finished for PR 28940 at commit
|
HyukjinKwon
commented
Jul 2, 2020
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 <379377944@qq.com> Co-authored-by: chengpan <cheng.pan@idiaoyan.com> Signed-off-by: HyukjinKwon <gurwls223@apache.org> (cherry picked from commit 7fda184) Signed-off-by: HyukjinKwon <gurwls223@apache.org>
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.