You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@celeborn.apache.org by ch...@apache.org on 2023/09/28 11:20:07 UTC
[incubator-celeborn] 07/07: [CELEBORN-1014] Output log with bound address and port
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
commit f4ffcbeeee816a695850089a11fcaffd75efe095
Author: sychen <sy...@ctrip.com>
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 <sy...@ctrip.com>
Co-authored-by: Cheng Pan <pa...@gmail.com>
Signed-off-by: Cheng Pan <ch...@apache.org>
(cherry picked from commit 7e944c1a50400931f67f4b42e44239591fe64700)
Signed-off-by: Cheng Pan <ch...@apache.org>
---
.../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
}