goiri commented on code in PR #4673:
URL: https://github.com/apache/hadoop/pull/4673#discussion_r935922526


##########
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/webapp/dao/AppInfo.java:
##########
@@ -182,6 +188,16 @@ public AppInfo(ResourceManager rm, RMApp app, Boolean 
hasAccess,
       this.finalStatus = app.getFinalApplicationStatus();
       this.clusterId = ResourceManager.getClusterTimeStamp();
       if (hasAccess) {
+        if(rm != null && rm.getConfig() != null) {

Review Comment:
   Space after if



##########
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/webapp/dao/AppInfo.java:
##########
@@ -82,6 +87,7 @@ public class AppInfo {
   protected String trackingUrl;
   protected String diagnostics;
   protected long clusterId;
+  private String rmClusterId;

Review Comment:
   Kind of weird that everything else is protected.



##########
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/webapp/dao/AppInfo.java:
##########
@@ -182,6 +188,16 @@ public AppInfo(ResourceManager rm, RMApp app, Boolean 
hasAccess,
       this.finalStatus = app.getFinalApplicationStatus();
       this.clusterId = ResourceManager.getClusterTimeStamp();
       if (hasAccess) {
+        if(rm != null && rm.getConfig() != null) {
+          try {
+            subClusterId = new SubClusterIdInfo(

Review Comment:
   One line.
   Too many parentheses.
   We should extract a little.



##########
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/webapp/dao/AppInfo.java:
##########
@@ -182,6 +188,16 @@ public AppInfo(ResourceManager rm, RMApp app, Boolean 
hasAccess,
       this.finalStatus = app.getFinalApplicationStatus();
       this.clusterId = ResourceManager.getClusterTimeStamp();
       if (hasAccess) {
+        if(rm != null && rm.getConfig() != null) {
+          try {
+            subClusterId = new SubClusterIdInfo(
+                (YarnConfiguration.getClusterId(rm.getConfig())));
+            rmClusterId =

Review Comment:
   One line



##########
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/test/java/org/apache/hadoop/yarn/server/resourcemanager/webapp/TestRMWebServicesApps.java:
##########
@@ -1825,6 +1826,8 @@ public void verifyAppInfo(JSONObject info, RMApp app, 
boolean hasResourceReqs)
     }
     assertEquals("incorrect number of elements", expectedNumberOfElements,
         info.length());
+    assertEquals("rmClusterId is incorrect", "subCluster1",

Review Comment:
   One 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: common-issues-unsubscr...@hadoop.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: common-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: common-issues-h...@hadoop.apache.org

Reply via email to