-
Notifications
You must be signed in to change notification settings - Fork 29k
[SPARK-1511] use Files.move instead of renameTo in TestUtils.scala #427
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
in different disks or partitions.
|
Can one of the admins verify this patch? |
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.
Tiny comment: it would be nicer to assert that the file exists, or else throw IOException at least and not Exception. The existing instance of Exception above could also be changed.
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.
Thanks for your review. I am considering using assert with message.
The message will contain the absolute path of file. The absolute path
will give more information. what do you think?
assert(out.exists(),"Destination file not moved: " + out.getAbsolutePath())
|
Jenkins, test this please. |
|
Merged build triggered. |
|
Merged build started. |
|
Ah, thanks good catch. Can merge this pending tests. |
|
Merged build finished. All automated tests passed. |
|
All automated tests passed. |
|
Thanks - I've merged this! |
JIRA issue:[SPARK-1511](https://issues.apache.org/jira/browse/SPARK-1511) TestUtils.createCompiledClass method use renameTo() to move files which fails when the src and dest files are in different disks or partitions. This pr uses Files.move() instead. The move method will try to use renameTo() and then fall back to copy() and delete(). I think this should handle this issue. I didn't found a test suite for this file, so I add file existence detection after file moving. Author: Ye Xianjin <[email protected]> Closes #427 from advancedxy/SPARK-1511 and squashes the following commits: a2b97c7 [Ye Xianjin] Based on @srowen's comment, assert file existence. 6f95550 [Ye Xianjin] use Files.move instead of renameTo to handle the src and dest files are in different disks or partitions. (cherry picked from commit 10b1c59) Signed-off-by: Patrick Wendell <[email protected]>
Deprecate rather than remove old combineValuesByKey function
JIRA issue:[SPARK-1511](https://issues.apache.org/jira/browse/SPARK-1511) TestUtils.createCompiledClass method use renameTo() to move files which fails when the src and dest files are in different disks or partitions. This pr uses Files.move() instead. The move method will try to use renameTo() and then fall back to copy() and delete(). I think this should handle this issue. I didn't found a test suite for this file, so I add file existence detection after file moving. Author: Ye Xianjin <[email protected]> Closes apache#427 from advancedxy/SPARK-1511 and squashes the following commits: a2b97c7 [Ye Xianjin] Based on @srowen's comment, assert file existence. 6f95550 [Ye Xianjin] use Files.move instead of renameTo to handle the src and dest files are in different disks or partitions.
Deprecate rather than remove old combineValuesByKey function (cherry picked from commit d601a76) Signed-off-by: Reynold Xin <[email protected]>
Allows dynamically scaling executors up and down without external shuffle service. Tracks shuffle locations to know if executors can be safely scaled down.
…k-streaming-kafka-10 module (apache#427)
JIRA issue:SPARK-1511
TestUtils.createCompiledClass method use renameTo() to move files which fails when the src and dest files are in different disks or partitions. This pr uses Files.move() instead. The move method will try to use renameTo() and then fall back to copy() and delete(). I think this should handle this issue.
I didn't found a test suite for this file, so I add file existence detection after file moving.