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/09/01 01:59:13 UTC

[GitHub] [hadoop] slfan1989 commented on a diff in pull request #4836: YARN-11289. [Federation] Improve NM FederationInterceptor removeAppFromRegistry.

slfan1989 commented on code in PR #4836:
URL: https://github.com/apache/hadoop/pull/4836#discussion_r960155077


##########
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/amrmproxy/FederationInterceptor.java:
##########
@@ -770,7 +771,7 @@ public FinishApplicationMasterResponse finishApplicationMaster(
 
     if (failedToUnRegister) {
       homeResponse.setIsUnregistered(false);
-    } else {
+    } else if (request.getFinalApplicationStatus().equals(FinalApplicationStatus.SUCCEEDED)) {

Review Comment:
   Thank you very much for helping to review the code, I will modify the code.



##########
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/amrmproxy/FederationInterceptor.java:
##########
@@ -817,6 +818,11 @@ public void shutdown() {
     this.homeHeartbeartHandler.shutdown();
     this.homeRMRelayer.shutdown();
 
+    // Shutdown needs to clean up app
+    if (this.registryClient != null) {
+      this.registryClient.removeAppFromRegistry(this.attemptId.getApplicationId());

Review Comment:
   I will fix it.



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