You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by GitBox <gi...@apache.org> on 2022/04/27 09:28:30 UTC

[GitHub] [incubator-doris-manager] JNSimba commented on a diff in pull request #56: Change manager server getServerAddr to configure STUDIO_IP

JNSimba commented on code in PR #56:
URL: https://github.com/apache/incubator-doris-manager/pull/56#discussion_r859582071


##########
manager/dm-server/src/main/java/org/apache/doris/stack/control/manager/ResourceNodeAndAgentManager.java:
##########
@@ -465,12 +462,7 @@ private boolean checkEventBeCancelled(long eventId) {
      * get server address
      */
     private String getServerAddr() {
-        String host = null;
-        try {
-            host = InetAddress.getLocalHost().getHostAddress();
-        } catch (UnknownHostException e) {
-            throw new ServerException("get server ip fail");
-        }
+        String host = System.getenv(EnvironmentDefine.STUDIO_IP_ENV);

Review Comment:
   It is recommended that STUDIO_IP is optional, keep the previous logic, and replace when STUDIO_IP is not empty



-- 
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: commits-unsubscribe@doris.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org