-
Notifications
You must be signed in to change notification settings - Fork 29k
[SPARK-17339][SPARKR][CORE] Fix some R tests and use Path.toUri in SparkContext for Windows paths in SparkR #14960
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
Closed
Closed
Changes from 2 commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
0711682
Avoid direct use of URI for file paths in Windows
HyukjinKwon f42c182
Handle Windows specific path issues
HyukjinKwon f5bde71
Revert manual Windows path handling
HyukjinKwon cd8fe11
Fetch upstream
HyukjinKwon 9392421
Use new Path(...).toUri
HyukjinKwon 790d5b2
Fix R tests more
HyukjinKwon 41aaaf1
Replace FileSystem.get to FileSystem.getLocal
HyukjinKwon File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
BTW, this logic is taken after Hadoop codes. Please let me know if there are equivalent functions.
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.
Is this change needed? I think
resolveURIalready treat Windows-style path.https://github.com/apache/spark/blob/master/core/src/test/scala/org/apache/spark/util/UtilsSuite.scala#L398
Or, did you find another case which this method cannot treat properly?
Uh oh!
There was an error while loading. Please reload this page.
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.
Hm.. yeap, Firstly, I didn't add this logic and run the test with this diff (HyukjinKwon/spark@master...HyukjinKwon:a136206dad6011d6ad112f33417790ad3c6a9912)
it produced the output here
https://gist.github.com/HyukjinKwon/f3f9a36dde88028ca09fd417b6ce5c68
(several test failures were removed here anyway).
So, I corrected this (without knowing we are testing that case). with the diff here (HyukjinKwon/spark@master...HyukjinKwon:b648e4f2d5aae072748a97550cfcf832c57d9315)
it produced the output here, https://gist.github.com/HyukjinKwon/0c42b2c208e06c59525d91087252d9b0
(all test failures except for two cases were removed here).
This seems it reduces roughly 10ish test failures. So I thought this is a legitimate change.
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 will double check and will look into this deeper. I didn't notice we have that test anyway. Thanks for pointing this out.
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.
Here is the original test failures FYI - https://gist.github.com/shivaram/7693df7bd54dc81e2e7d1ce296c41134
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.
The other option is to of course just use the Hadoop
Pathclass and do something likenew Path(path).toURI-- I think they handleC:/correctly. I don't know if this affects other functionality though (like SPARK-11227) and we should check with @sarutakUh oh!
There was an error while loading. Please reload this page.
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.
Yeap, meanwhile, I will try to use that and run tests. Thanks for your quick feedback.
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.
The way @shivaram mentioned works well and doesn't affect SPARK-11227.
@HyukjinKwon You can fix this problem with the way but if you will fix
resolveURI, adding new test cases toUtilsSuiteis desireble.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.
Let me please just use
new Path(...).toUridirectly to deal with this if it seems okay.I just tried to fix
resolveURIto usenew Path(path).toUriinstead ofnew URI(path)but I found it breaks existing tests forresolveURI. It seems parsing special characters differently, for example ,#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.
O.K, let's fix the other problem of
resolveURIin another PR.