Skip to content

Commit

Permalink
[SPARK-5831][Streaming]When checkpoint file size is bigger than 10, t…
Browse files Browse the repository at this point in the history
…hen delete the old ones

Author: Xutingjun <[email protected]>

Closes apache#4621 from XuTingjun/checkpointFile and squashes the following commits:

b5f2816 [Xutingjun] fix bug
  • Loading branch information
XuTingjun authored and zzcclp committed Mar 11, 2015
1 parent ddb62d3 commit 6a4f909
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ class CheckpointWriter(

// Delete old checkpoint files
val allCheckpointFiles = Checkpoint.getCheckpointFiles(checkpointDir, fs)
if (allCheckpointFiles.size > 4) {
if (allCheckpointFiles.size > 10) {
allCheckpointFiles.take(allCheckpointFiles.size - 10).foreach(file => {
logInfo("Deleting " + file)
fs.delete(file, true)
Expand Down

0 comments on commit 6a4f909

Please sign in to comment.