You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dolphinscheduler.apache.org by "Radeity (via GitHub)" <gi...@apache.org> on 2023/03/28 09:44:31 UTC
[GitHub] [dolphinscheduler] Radeity commented on a diff in pull request #13752: [Improvement-13751] Support real-time pod log collection
Radeity commented on code in PR #13752:
URL: https://github.com/apache/dolphinscheduler/pull/13752#discussion_r1150319660
##########
dolphinscheduler-task-plugin/dolphinscheduler-task-api/src/main/java/org/apache/dolphinscheduler/plugin/task/api/AbstractCommandExecutor.java:
##########
@@ -249,6 +261,22 @@ public TaskResponse run(String execCommand, TaskCallBack taskCallBack) throws Ex
}
}
+ if (podLogOutputFuture != null) {
+ try {
+ // Wait kubernetes pod log collection finished
+ String msg = (String) podLogOutputFuture.get();
+ if (StringUtils.isEmpty(msg)) {
+ // delete pod after successful execution
+ ProcessUtils.cancelApplication(taskRequest);
Review Comment:
The pod is deleted in `cancelApplication` only when task runs successfully and we collect whole logs.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@dolphinscheduler.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org