You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-issues@hadoop.apache.org by GitBox <gi...@apache.org> on 2022/08/04 03:24:54 UTC
[GitHub] [hadoop] slfan1989 commented on a diff in pull request #4695: YARN-11228. [Federation] Add getAppAttempts, getAppAttempt REST APIs for Router.
slfan1989 commented on code in PR #4695:
URL: https://github.com/apache/hadoop/pull/4695#discussion_r937313169
##########
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-router/src/main/java/org/apache/hadoop/yarn/server/router/webapp/FederationInterceptorREST.java:
##########
@@ -1365,7 +1365,30 @@ public Response updateApplicationTimeout(AppTimeoutInfo appTimeout,
@Override
public AppAttemptsInfo getAppAttempts(HttpServletRequest hsr, String appId) {
- throw new NotImplementedException("Code is not implemented");
+ if (appId == null || appId.isEmpty()) {
+ throw new IllegalArgumentException("Parameter error, the appId is empty or null.");
+ }
+
+ try {
+ ApplicationId applicationId = ApplicationId.fromString(appId);
+ SubClusterInfo subClusterInfo = getHomeSubClusterInfoByAppId(applicationId);
Review Comment:
Thanks for your suggestion, I will modify the code.
--
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: common-issues-unsubscribe@hadoop.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-issues-help@hadoop.apache.org