goiri commented on code in PR #5841:
URL: https://github.com/apache/hadoop/pull/5841#discussion_r1265950558
##########
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:
I would leave this as is.
##########
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/test/java/org/apache/hadoop/yarn/server/nodemanager/amrmproxy/TestFederationInterceptor.java:
##########
@@ -268,7 +267,7 @@ private void releaseContainersAndAssert(List<Container>
containers)
// aggregated and returned back to us, and we can check if total request
size
// and returned size are the same
List<ContainerId> containersForReleasedContainerIds =
- new ArrayList<ContainerId>();
+ new ArrayList<>();
Review Comment:
Indentation looks funny.
##########
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:
Single line?
--
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]