akshatb1 commented on a change in pull request #3252:
URL: https://github.com/apache/hadoop/pull/3252#discussion_r702905502
##########
File path:
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-router/src/main/java/org/apache/hadoop/yarn/server/router/clientrm/RouterYarnClientUtils.java
##########
@@ -126,50 +126,55 @@ private static ApplicationReport
mergeUAMWithUAM(ApplicationReport uam1,
}
private static void mergeAMWithUAM(ApplicationReport am,
- ApplicationReport uam){
+ ApplicationReport uam){
ApplicationResourceUsageReport amResourceReport =
- am.getApplicationResourceUsageReport();
+ am.getApplicationResourceUsageReport();
ApplicationResourceUsageReport uamResourceReport =
- uam.getApplicationResourceUsageReport();
+ uam.getApplicationResourceUsageReport();
- amResourceReport.setNumUsedContainers(
- amResourceReport.getNumUsedContainers() +
- uamResourceReport.getNumUsedContainers());
+ if (amResourceReport == null) {
+ am.setApplicationResourceUsageReport(uamResourceReport);
+ } else if (uamResourceReport != null) {
- amResourceReport.setNumReservedContainers(
- amResourceReport.getNumReservedContainers() +
- uamResourceReport.getNumReservedContainers());
+ amResourceReport.setNumUsedContainers(
+ amResourceReport.getNumUsedContainers() +
Review comment:
Applied Hadoop code style to fix indentations.
--
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]