Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ public static CompletableFuture<Void> startComponent(LifecycleComponent componen
component.setExceptionHandler((t, e) -> {
log.error("Triggered exceptionHandler of Component: {} because of Exception in Thread: {}",
component.getName(), t, e);
System.err.println(e.getMessage());
// start the shutdown hook when an uncaught exception happen in the lifecycle component.
shutdownHookThread.start();
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -339,6 +339,7 @@ static int doMain(String[] args) {
server = buildAutoRecoveryServer(new BookieConfiguration(conf));
} catch (Exception e) {
LOG.error("Failed to build AutoRecovery Server", e);
System.err.println(e.getMessage());
return ExitCode.SERVER_EXCEPTION;
}

Expand All @@ -349,8 +350,10 @@ static int doMain(String[] args) {
Thread.currentThread().interrupt();
// the server is interrupted
LOG.info("AutoRecovery server is interrupted. Exiting ...");
System.err.println(ie.getMessage());
} catch (ExecutionException ee) {
LOG.error("Error in bookie shutdown", ee.getCause());
System.err.println(ee.getMessage());
return ExitCode.SERVER_EXCEPTION;
}
return ExitCode.OK;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,7 @@ static int doMain(String[] args) {
server = buildBookieServer(new BookieConfiguration(conf));
} catch (Exception e) {
log.error("Failed to build bookie server", e);
System.err.println(e.getMessage());
return ExitCode.SERVER_EXCEPTION;
}

Expand All @@ -232,8 +233,10 @@ static int doMain(String[] args) {
Thread.currentThread().interrupt();
// the server is interrupted
log.info("Bookie server is interrupted. Exiting ...");
System.err.println(ie.getMessage());
} catch (ExecutionException ee) {
log.error("Error in bookie shutdown", ee.getCause());
System.err.println(ee.getMessage());
return ExitCode.SERVER_EXCEPTION;
}
return ExitCode.OK;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,7 @@ static int doMain(String[] args) {
grpcUseHostname);
} catch (Exception e) {
log.error("Invalid storage configuration", e);
System.err.println(e.getMessage());
return ExitCode.INVALID_CONF.code();
}

Expand All @@ -181,8 +182,10 @@ static int doMain(String[] args) {
// the server is interrupted.
Thread.currentThread().interrupt();
log.info("Storage server is interrupted. Exiting ...");
System.err.println(e.getMessage());
} catch (ExecutionException e) {
log.info("Storage server is exiting ...");
System.err.println(e.getMessage());
}
return ExitCode.OK.code();
}
Expand Down