Skip to content

Conversation

@zsxwing
Copy link
Member

@zsxwing zsxwing commented Aug 11, 2017

What changes were proposed in this pull request?

Directly writing a snapshot file may generate a partial file. This PR changes it to write to a temp file then rename to the target file.

How was this patch tested?

Jenkins.

@zsxwing
Copy link
Member Author

zsxwing commented Aug 11, 2017

@tdas

@SparkQA
Copy link

SparkQA commented Aug 12, 2017

Test build #80557 has finished for PR 18928 at commit c0b4655.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@tdas
Copy link
Contributor

tdas commented Aug 14, 2017

LGTM.

asfgit pushed a commit that referenced this pull request Aug 14, 2017
…pshot files

## What changes were proposed in this pull request?

Directly writing a snapshot file may generate a partial file. This PR changes it to write to a temp file then rename to the target file.

## How was this patch tested?

Jenkins.

Author: Shixiong Zhu <[email protected]>

Closes #18928 from zsxwing/SPARK-21696.

(cherry picked from commit 282f00b)
Signed-off-by: Tathagata Das <[email protected]>
@asfgit asfgit closed this in 282f00b Aug 14, 2017
@zsxwing zsxwing deleted the SPARK-21696 branch August 14, 2017 22:17
@YuvalItzchakov
Copy link

@zsxwing Can you elaborate on why writing to a file directly may generate a partial file? Is this about an exception terminating the write to the underlying file system while the maintenance task is writing?

@zsxwing
Copy link
Member Author

zsxwing commented Aug 27, 2017

@YuvalItzchakov there are many cases: power outage, the process is killed by oom killer, or the user calls System.exit...

@YuvalItzchakov
Copy link

Right. We've had some problems with reading snapshots after executors dying on OOM, I hope this does the trick :)

Thanks.

MatthewRBruce pushed a commit to Shopify/spark that referenced this pull request Jul 31, 2018
…pshot files

## What changes were proposed in this pull request?

Directly writing a snapshot file may generate a partial file. This PR changes it to write to a temp file then rename to the target file.

## How was this patch tested?

Jenkins.

Author: Shixiong Zhu <[email protected]>

Closes apache#18928 from zsxwing/SPARK-21696.

(cherry picked from commit 282f00b)
Signed-off-by: Tathagata Das <[email protected]>
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