This is an automated email from the ASF dual-hosted git repository.

chengpan pushed a commit to branch branch-0.3
in repository https://gitbox.apache.org/repos/asf/incubator-celeborn.git


The following commit(s) were added to refs/heads/branch-0.3 by this push:
     new 89779e3b1 [CELEBORN-1014] Output log with bound address and port
89779e3b1 is described below

commit 89779e3b1b97420a5a5830f39bdb214eaa6e6da1
Author: sychen <[email protected]>
AuthorDate: Thu Sep 28 19:07:12 2023 +0800

    [CELEBORN-1014] Output log with bound address and port
    
    ### What changes were proposed in this pull request?
    
    ### Why are the changes needed?
    Make it easy for administrators to find the address of the http service 
bindings.
    
    ### Does this PR introduce _any_ user-facing change?
    
    ### How was this patch tested?
    
    ```
    23/09/28 17:10:50,465 INFO [main] HttpServer: master: HttpServer started on 
port 9983.
    ```
    
    PR
    ```
    23/09/28 17:28:29,797 INFO [main] HttpServer: master: HttpServer started on 
clb-3 with port 9983.
    ```
    
    Closes #1947 from cxzl25/CELEBORN-1014.
    
    Lead-authored-by: sychen <[email protected]>
    Co-authored-by: Cheng Pan <[email protected]>
    Signed-off-by: Cheng Pan <[email protected]>
    (cherry picked from commit 7e944c1a50400931f67f4b42e44239591fe64700)
    Signed-off-by: Cheng Pan <[email protected]>
---
 .../org/apache/celeborn/common/network/server/TransportServer.java   | 2 +-
 .../scala/org/apache/celeborn/server/common/http/HttpServer.scala    | 5 +++--
 2 files changed, 4 insertions(+), 3 deletions(-)

diff --git 
a/common/src/main/java/org/apache/celeborn/common/network/server/TransportServer.java
 
b/common/src/main/java/org/apache/celeborn/common/network/server/TransportServer.java
index d4214ddb7..73bb38bac 100644
--- 
a/common/src/main/java/org/apache/celeborn/common/network/server/TransportServer.java
+++ 
b/common/src/main/java/org/apache/celeborn/common/network/server/TransportServer.java
@@ -116,7 +116,7 @@ public class TransportServer implements Closeable {
     channelFuture.syncUninterruptibly();
 
     port = ((InetSocketAddress) 
channelFuture.channel().localAddress()).getPort();
-    logger.debug("Shuffle server started on port: {}", port);
+    logger.debug("Shuffle server started on {}:{}", address.getHostString(), 
port);
   }
 
   protected void initializeChannel(ServerBootstrap bootstrap) {
diff --git 
a/service/src/main/scala/org/apache/celeborn/server/common/http/HttpServer.scala
 
b/service/src/main/scala/org/apache/celeborn/server/common/http/HttpServer.scala
index f84151333..a45ff109a 100644
--- 
a/service/src/main/scala/org/apache/celeborn/server/common/http/HttpServer.scala
+++ 
b/service/src/main/scala/org/apache/celeborn/server/common/http/HttpServer.scala
@@ -50,9 +50,10 @@ class HttpServer(
       .channel(classOf[NioServerSocketChannel])
       .childHandler(channelInitializer)
 
-    bindFuture = bootstrap.bind(new InetSocketAddress(host, port)).sync
+    val address = new InetSocketAddress(host, port)
+    bindFuture = bootstrap.bind(address).sync
     bindFuture.syncUninterruptibly()
-    logInfo(s"$role: HttpServer started on port $port.")
+    logInfo(s"$role: HttpServer started on ${address.getHostString}:$port.")
     isStarted = true
   }
 

Reply via email to