Uh oh!
There was an error while loading. Please reload this page.
[SPARK-24795][Core][FOLLOWUP] Kill all running tasks when a task in a barrier stage fail - #21943
[SPARK-24795][Core][FOLLOWUP] Kill all running tasks when a task in a barrier stage fail#21943jiangxb1987 wants to merge 5 commits into
Conversation
holdensmagicalunicorn
commented
Aug 1, 2018
@jiangxb1987, thanks! I am a bot who has found some folks who might be able to help with the review:@gatorsmile, @mateiz and @kayousterhout |
| interruptThread: Boolean, | ||
| reason: String): Unit = synchronized { | ||
| logInfo(s"Killing all running tasks in stage $stageId: $reason") | ||
| taskSetsByStageIdAndAttempt.get(stageId).foreach { attempts => |
There was a problem hiding this comment.
This is some dup code and we dropped the useful comments from cancelTasks. It would be great if we move the common code here with comment and let cancelTasks call this method.
mengxr
commented
Aug 1, 2018
@jiangxb1987 Could you add a test to the new method? |
SparkQA
commented
Aug 1, 2018
Test build #93882 has finished for PR 21943 at commit
|
SparkQA
commented
Aug 1, 2018
Test build #93893 has finished for PR 21943 at commit
|
jiangxb1987
commented
Aug 2, 2018
@mengxr Updated and added test cases, PTAL! |
| def submitTasks(taskSet: TaskSet): Unit | ||
| // Cancel a stage. | ||
| // Kill all the tasks in a stage and fail the stage and all the jobs that depend on the stage. |
There was a problem hiding this comment.
is it guaranteed to work for any backend like YARN, Mesos, K8s?
There was a problem hiding this comment.
Updated comment to note that if the backend doesn't support kill a task then the method shall throw UnsupportedOperationException.
mengxr
commented
Aug 2, 2018
LGTM |
SparkQA
commented
Aug 2, 2018
Test build #93951 has finished for PR 21943 at commit
|
SparkQA
commented
Aug 2, 2018
Test build #93945 has finished for PR 21943 at commit
|
jiangxb1987
commented
Aug 2, 2018
retest this please |
cloud-fan
commented
Aug 2, 2018
LGTM |
SparkQA
commented
Aug 2, 2018
Test build #93969 has finished for PR 21943 at commit
|
cloud-fan
commented
Aug 2, 2018
retest this please |
SparkQA
commented
Aug 2, 2018
Test build #93968 has finished for PR 21943 at commit
|
cloud-fan
commented
Aug 2, 2018
thanks, merging to master! |
SparkQA
commented
Aug 2, 2018
Test build #93996 has finished for PR 21943 at commit
|
What changes were proposed in this pull request?
Kill all running tasks when a task in a barrier stage fail in the middle.
TaskScheduler.cancelTasks()will also fail the job, so we implemented a new methodkillAllTaskAttempts()to just kill all running tasks of a stage without cancel the stage/job.How was this patch tested?
Add new test cases in
TaskSchedulerImplSuite.