You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@drill.apache.org by lu...@apache.org on 2022/07/09 10:01:13 UTC
[drill] branch master updated: [Minor Update] Add port number in log file for maintenance convenience (#2579)
This is an automated email from the ASF dual-hosted git repository.
luoc pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/drill.git
The following commit(s) were added to refs/heads/master by this push:
new 1710400a4e [Minor Update] Add port number in log file for maintenance convenience (#2579)
1710400a4e is described below
commit 1710400a4ea5d17ceec2c5294a8caaaeb14e063d
Author: kingswanwho <ch...@gmail.com>
AuthorDate: Sat Jul 9 18:01:07 2022 +0800
[Minor Update] Add port number in log file for maintenance convenience (#2579)
---
.../src/main/java/org/apache/drill/exec/server/Drillbit.java | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/server/Drillbit.java b/exec/java-exec/src/main/java/org/apache/drill/exec/server/Drillbit.java
index 3bf20e04e7..a66862d013 100644
--- a/exec/java-exec/src/main/java/org/apache/drill/exec/server/Drillbit.java
+++ b/exec/java-exec/src/main/java/org/apache/drill/exec/server/Drillbit.java
@@ -233,8 +233,9 @@ public class Drillbit implements AutoCloseable {
manager.getContext().getRemoteFunctionRegistry().init(context.getConfig(), storeProvider, coord);
webServer.start();
//Discovering HTTP port (in case of port hunting)
+ int httpPort = -1;
if (webServer.isRunning()) {
- int httpPort = getWebServerPort();
+ httpPort = getWebServerPort();
md = md.toBuilder().setHttpPort(httpPort).build();
}
registrationHandle = coord.register(md);
@@ -244,7 +245,7 @@ public class Drillbit implements AutoCloseable {
shutdownHook = new ShutdownThread(this, new StackTrace());
Runtime.getRuntime().addShutdownHook(shutdownHook);
gracefulShutdownThread.start();
- logger.info("Startup completed ({} ms).", w.elapsed(TimeUnit.MILLISECONDS));
+ logger.info("Startup completed in {} ms and running on port: {}", w.elapsed(TimeUnit.MILLISECONDS), httpPort);
}
/**