zhuxt2015 commented on code in PR #11119:
URL: https://github.com/apache/dolphinscheduler/pull/11119#discussion_r930890694
##########
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/utils/HadoopUtils.java:
##########
@@ -446,39 +447,40 @@ public ExecutionStatus getApplicationStatus(String
applicationId) throws BaseExc
if (StringUtils.isEmpty(applicationId)) {
return null;
}
+ String result = getResult(applicationId, "app", false);
+ if (result == null) {
+ //may be in job history
+ result = getResult(applicationId, "job", true);
+ }
+ return getExecutionStatus(result);
+ }
- String result;
- String applicationUrl = getApplicationUrl(applicationId);
- logger.debug("generate yarn application url, applicationUrl={}",
applicationUrl);
- String responseContent =
Boolean.TRUE.equals(PropertyUtils.getBoolean(Constants.HADOOP_SECURITY_AUTHENTICATION_STARTUP_STATE,
false)) ? KerberosHttpClient.get(applicationUrl) :
HttpUtils.get(applicationUrl);
+ private String getResult(String applicationId, String filedName, boolean
isHistory) throws BaseException {
Review Comment:
Please fix checkstyle issue
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]