Skip to content

Conversation

@abzymeatsjtu
Copy link
Contributor

ensure spark application cancelled when cancel application is triggered

close #16994

Comment on lines +217 to +228

RunState currentState = RunState.Cancelling;

while (!RunState.isCancelled(currentState)) {
currentState = RunState.valueOf(pollJobRunStatus());

try {
Thread.sleep(10 * 1000L);
} catch (InterruptedException e) {
break;
}
}
Copy link
Member

@ruanwenjun ruanwenjun Sep 11, 2025

Choose a reason for hiding this comment

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

We don't need to do this change, since the kill operation is async, and only handle finish, then the worker will return the task state to master. The change might block a thread.

@sonarqubecloud
Copy link

Please retry analysis of this Pull-Request directly on SonarQube Cloud

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Improvement][AliyunServerlessSparkTask] Some Improvement on Aliyun Serverless Spark Task Plugin

3 participants