zhuangchong commented on a change in pull request #5200:
URL: 
https://github.com/apache/incubator-dolphinscheduler/pull/5200#discussion_r611042608



##########
File path: 
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/utils/HadoopUtils.java
##########
@@ -612,7 +607,9 @@ public static String getAppAddress(String appAddress, 
String rmHa) {
             return null;
         }
 
-        String end = Constants.COLON + split2[1];
+        String activeResourceManagerPort = 
String.valueOf(PropertyUtils.getInt(Constants.HADOOP_RESOURCE_MANAGER_HTTPADDRESS_PORT,
 8088));
+        String rest = split2[1].substring(activeResourceManagerPort.length());
+        String end = Constants.COLON + activeResourceManagerPort + rest;

Review comment:
       In  the common.properties file there are two 
properties(yarn.application.status.address=http://ds1:8088/ws/v1/cluster/apps/%s;resource.manager.httpaddress.port=8088)
 that both represent the yarn resource manager http port. It is recommended to 
use only one property to represent.
   
   
   Solution 1: Keep the status quo. When customizing the port, you need to 
modify 'resource.manager.httpaddress.port=8088' and 
'yarn.application.status.address=http://ds1:8088/ws/v1/cluster/apps /%s' port 
value
   Solution 
2:'yarn.application.status.address=http://ds1:8088/ws/v1/cluster/apps/%s' is 
modified to 'yarn.application.status.address=http://ds1:%s 
/ws/v1/cluster/apps/%s', use 'resource.manager.httpaddress.port=8088' in the 
code to replace the port value
   
   
   




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

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


Reply via email to