Skip to content

Conversation

@advancedxy
Copy link
Contributor

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.

@AmplabJenkins
Copy link

Can one of the admins verify this patch?

Copy link
Member

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.

Copy link
Contributor Author

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())

@pwendell
Copy link
Contributor

Jenkins, test this please.

@AmplabJenkins
Copy link

Merged build triggered.

@AmplabJenkins
Copy link

Merged build started.

@pwendell
Copy link
Contributor

Ah, thanks good catch. Can merge this pending tests.

@AmplabJenkins
Copy link

Merged build finished. All automated tests passed.

@AmplabJenkins
Copy link

All automated tests passed.
Refer to this link for build results: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/14176/

@pwendell
Copy link
Contributor

Thanks - I've merged this!

asfgit pushed a commit that referenced this pull request Apr 16, 2014
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]>
@asfgit asfgit closed this in 10b1c59 Apr 16, 2014
@advancedxy advancedxy deleted the SPARK-1511 branch April 17, 2014 13:29
pwendell pushed a commit to pwendell/spark that referenced this pull request May 12, 2014
Deprecate rather than remove old combineValuesByKey function
pdeyhim pushed a commit to pdeyhim/spark-1 that referenced this pull request Jun 25, 2014
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.
andrewor14 pushed a commit to andrewor14/spark that referenced this pull request Jan 8, 2015
Deprecate rather than remove old combineValuesByKey function

(cherry picked from commit d601a76)
Signed-off-by: Reynold Xin <[email protected]>
j-esse pushed a commit to j-esse/spark that referenced this pull request Jan 24, 2019
Allows dynamically scaling executors up and down without external shuffle service. Tracks shuffle locations to know if executors can be safely scaled down.
arjunshroff pushed a commit to arjunshroff/spark that referenced this pull request Nov 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants