Skip to content

[SPARK-31484][Core][Flollowup] Use taskAttemptId in checkpoint filename #28289

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
wants to merge 1 commit into from

Conversation

viirya
Copy link
Member

@viirya viirya commented Apr 22, 2020

What changes were proposed in this pull request?

As suggested by #28255 (comment), this patch proposes to use taskAttemptId in checkpoint filename, instead of stageAttemptNumber + attemptNumber.

Why are the changes needed?

To simplify checkpoint simplified and unique.

Does this PR introduce any user-facing change?

No

How was this patch tested?

Existing tests.

@viirya
Copy link
Member Author

viirya commented Apr 22, 2020

Copy link
Member

@xuanyuanking xuanyuanking left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@SparkQA
Copy link

SparkQA commented Apr 22, 2020

Test build #121606 has finished for PR 28289 at commit 59e99f6.

  • This patch fails due to an unknown error code, -9.
  • This patch merges cleanly.
  • This patch adds no public classes.

@viirya
Copy link
Member Author

viirya commented Apr 22, 2020

retest this please

@@ -199,8 +199,7 @@ private[spark] object ReliableCheckpointRDD extends Logging {

val finalOutputName = ReliableCheckpointRDD.checkpointFileName(ctx.partitionId())
val finalOutputPath = new Path(outputDir, finalOutputName)
val tempOutputPath = new Path(outputDir,
s".$finalOutputName-attempt-${ctx.stageAttemptNumber()}-${ctx.attemptNumber()}")
val tempOutputPath = new Path(outputDir, s".$finalOutputName-attempt-${ctx.taskAttemptId()}")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ya. It looks simpler.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

BTW, do we need -attempt-?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

private[spark] class TaskDescription(
    val taskId: Long,
    val attemptNumber: Int,
...

I believe taskAttempId is some kind of historic name in TaskContext.

@SparkQA
Copy link

SparkQA commented Apr 22, 2020

Test build #121612 has finished for PR 28289 at commit 59e99f6.

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

@HyukjinKwon
Copy link
Member

Merged to master.

@viirya
Copy link
Member Author

viirya commented Apr 22, 2020

Thanks!

@viirya viirya deleted the SPARK-31484-followup branch December 27, 2023 18:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants