You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dolphinscheduler.apache.org by GitBox <gi...@apache.org> on 2021/06/10 01:52:47 UTC

[GitHub] [dolphinscheduler] CalvinKirs commented on a change in pull request #5561: yarn application state check add a Retrial mechanism

CalvinKirs commented on a change in pull request #5561:
URL: https://github.com/apache/dolphinscheduler/pull/5561#discussion_r648793977



##########
File path: dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/worker/task/AbstractCommandExecutor.java
##########
@@ -428,9 +431,27 @@ public boolean isSuccessOfYarnState(List<String> appIds) {
             result = false;
         }
         return result;
-
     }
-
+    
+    /**
+     *
+     * @param appId
+     * @return appId ExecutionStatus
+     * @throws Exception
+     */
+    private ExecutionStatus retryExecutionStatus(String appId,ExecutionStatus applicationStatus) throws Exception {
+        for (int i = 0; i < 10; i++) {
+            applicationStatus = HadoopUtils.getInstance().getApplicationStatus(appId);
+            if (applicationStatus.equals(ExecutionStatus.FAILURE)
+                    || applicationStatus.equals(ExecutionStatus.KILL)) {

Review comment:
       Why do  need to retry in failure and kill state?




-- 
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org