Skip to content

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

Closed
viirya wants to merge 1 commit into
apache:masterfrom
viirya:SPARK-31484-followup
Closed

[SPARK-31484][Core][Flollowup] Use taskAttemptId in checkpoint filename#28289
viirya wants to merge 1 commit into
apache:masterfrom
viirya:SPARK-31484-followup

Conversation

@viirya

@viirya viirya commented Apr 22, 2020

Copy link
Copy Markdown
Member

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

viirya commented Apr 22, 2020

Copy link
Copy Markdown
Member Author

@xuanyuanking xuanyuanking left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM

@SparkQA

SparkQA commented Apr 22, 2020

Copy link
Copy Markdown

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

viirya commented Apr 22, 2020

Copy link
Copy Markdown
Member Author

retest this please

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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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

SparkQA commented Apr 22, 2020

Copy link
Copy Markdown

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
Copy Markdown
Member

Merged to master.

@viirya

viirya commented Apr 22, 2020

Copy link
Copy Markdown
Member Author

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