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


##########
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/amrmproxy/AMRMProxyApplicationContextImpl.java:
##########
@@ -53,7 +53,7 @@ public class AMRMProxyApplicationContextImpl implements
    * @param nmContext NM context
    * @param conf configuration
    * @param applicationAttemptId attempt id
-   * @param user user name of the application
+   * @param user username of the application

Review Comment:
   Thank you very much for reviewing the code! I will fix it.



##########
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/amrmproxy/FederationInterceptor.java:
##########
@@ -1052,49 +1049,44 @@ protected void reAttachUAMAndMergeRegisterResponse(
       final Token<AMRMTokenIdentifier> amrmToken = entry.getValue();
 
       completionService
-          .submit(new Callable<RegisterApplicationMasterResponse>() {
-            @Override
-            public RegisterApplicationMasterResponse call() throws Exception {
-              RegisterApplicationMasterResponse response = null;
-              try {
-                // Create a config loaded with federation on and subclusterId
-                // for each UAM
-                YarnConfiguration config = new YarnConfiguration(getConf());
-                FederationProxyProviderUtil.updateConfForFederation(config,
-                    subClusterId.getId());
-
-                ApplicationSubmissionContext originalSubmissionContext =
-                    federationFacade.getApplicationSubmissionContext(appId);
-
-                uamPool.reAttachUAM(subClusterId.getId(), config, appId,
-                    amRegistrationResponse.getQueue(),
-                    getApplicationContext().getUser(), 
homeSubClusterId.getId(),
-                    amrmToken, subClusterId.toString(), 
originalSubmissionContext);
-
-                secondaryRelayers.put(subClusterId.getId(),
-                    uamPool.getAMRMClientRelayer(subClusterId.getId()));
-
-                response = uamPool.registerApplicationMaster(
-                    subClusterId.getId(), amRegistrationRequest);
-
-                // Set sub-cluster to be timed out initially
-                lastSCResponseTime.put(subClusterId,
-                    clock.getTime() - subClusterTimeOut);
-
-                if (response != null
-                    && response.getContainersFromPreviousAttempts() != null) {
-                  cacheAllocatedContainers(
-                      response.getContainersFromPreviousAttempts(),
-                      subClusterId);
-                }
-                LOG.info("UAM {} reattached for {}", subClusterId, appId);
-              } catch (Throwable e) {
-                LOG.error(
-                    "Reattaching UAM " + subClusterId + " failed for " + appId,
-                    e);
+          .submit(() -> {
+            RegisterApplicationMasterResponse response = null;
+            try {
+              // Create a config loaded with federation on and subclusterId
+              // for each UAM
+              YarnConfiguration config = new YarnConfiguration(getConf());
+              FederationProxyProviderUtil.updateConfForFederation(config,
+                  subClusterId.getId());
+
+              ApplicationSubmissionContext originalSubmissionContext =
+                  federationFacade.getApplicationSubmissionContext(appId);
+
+              uamPool.reAttachUAM(subClusterId.getId(), config, appId,
+                  amRegistrationResponse.getQueue(),
+                  getApplicationContext().getUser(), homeSubClusterId.getId(),
+                  amrmToken, subClusterId.toString(), 
originalSubmissionContext);
+
+              secondaryRelayers.put(subClusterId.getId(),
+                  uamPool.getAMRMClientRelayer(subClusterId.getId()));
+
+              response = uamPool.registerApplicationMaster(
+                  subClusterId.getId(), amRegistrationRequest);
+
+              // Set sub-cluster to be timed out initially
+              lastSCResponseTime.put(subClusterId,

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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to