Skip to content

Commit 1710400

Browse files
authored
[Minor Update] Add port number in log file for maintenance convenience (#2579)
1 parent 4ed10a8 commit 1710400

File tree

1 file changed

+3
-2
lines changed
  • exec/java-exec/src/main/java/org/apache/drill/exec/server

1 file changed

+3
-2
lines changed

exec/java-exec/src/main/java/org/apache/drill/exec/server/Drillbit.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -233,8 +233,9 @@ public void run() throws Exception {
233233
manager.getContext().getRemoteFunctionRegistry().init(context.getConfig(), storeProvider, coord);
234234
webServer.start();
235235
//Discovering HTTP port (in case of port hunting)
236+
int httpPort = -1;
236237
if (webServer.isRunning()) {
237-
int httpPort = getWebServerPort();
238+
httpPort = getWebServerPort();
238239
md = md.toBuilder().setHttpPort(httpPort).build();
239240
}
240241
registrationHandle = coord.register(md);
@@ -244,7 +245,7 @@ public void run() throws Exception {
244245
shutdownHook = new ShutdownThread(this, new StackTrace());
245246
Runtime.getRuntime().addShutdownHook(shutdownHook);
246247
gracefulShutdownThread.start();
247-
logger.info("Startup completed ({} ms).", w.elapsed(TimeUnit.MILLISECONDS));
248+
logger.info("Startup completed in {} ms and running on port: {}", w.elapsed(TimeUnit.MILLISECONDS), httpPort);
248249
}
249250

250251
/**

0 commit comments

Comments
 (0)