-
Notifications
You must be signed in to change notification settings - Fork 29k
[SPARK-31845][CORE][TESTS] Refactor DAGSchedulerSuite by introducing completeAndCheckAnswer and using completeNextStageWithFetchFailure #28866
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
Conversation
|
Test build #124251 has finished for PR 28866 at commit
|
|
Test build #124253 has finished for PR 28866 at commit
|
|
Test build #124255 has finished for PR 28866 at commit
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems like checkAnswer only has one line change for the developer. But overall, I think it's good to have it.
| private def checkAnswer( | ||
| taskSet: TaskSet, | ||
| results: Seq[(TaskEndReason, Any)], | ||
| expected: Map[Int, Any]): Unit = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: 4 indents
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK
| runEvent(JobCancelled(jobId, None)) | ||
| } | ||
|
|
||
| /** Make task set success and check result. */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It doesn't make the whole taskset success but only some tasks in the taskset success?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You said right, I will change the comments.
| /** Make task set success and check result. */ | ||
| private def checkAnswer( | ||
| taskSet: TaskSet, | ||
| results: Seq[(TaskEndReason, Any)], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the name of results is not appropriate here considering its usage and also confused with this.results below. Maybe, taskEndInfos?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's update results to taskEndInfos for complete too.
| } | ||
|
|
||
| /** Make task set success and check result. */ | ||
| private def checkAnswer( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe, completeAndCheckAnswer?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK
|
Test build #124347 has finished for PR 28866 at commit
|
|
retest this please |
|
Test build #124360 has finished for PR 28866 at commit
|
|
retest this please |
|
Test build #124373 has finished for PR 28866 at commit
|
|
LGTM, also cc @jiangxb1987 |
|
Retest this please. |
dongjoon-hyun
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
|
Test build #124556 has finished for PR 28866 at commit
|
|
@dongjoon-hyun @Ngone51 Thanks for your help! |
What changes were proposed in this pull request?
First
DAGSchedulerSuiteprovidescompleteNextStageWithFetchFailureto make all tasks in non first stage occurFetchFailed.But many test case uses complete directly as follows:
We need to reuse
completeNextStageWithFetchFailure.Second
DAGSchedulerSuitealso check the results show below:We can extract it as a generic method of
checkAnswer.Why are the changes needed?
Reuse
completeNextStageWithFetchFailureDoes this PR introduce any user-facing change?
'No'.
How was this patch tested?
Jenkins test