mirror of https://github.com/apache/druid.git
use System.err and System.out to print exit messages on CliPeon (#6975)
* use System.err and System.out to print exit messages on CliPeon * more * not necessarily a stopping error...
This commit is contained in:
parent
f7df5fedcc
commit
5c0fbbda1b
|
@ -35,6 +35,7 @@ import com.google.inject.name.Names;
|
|||
import io.airlift.airline.Arguments;
|
||||
import io.airlift.airline.Command;
|
||||
import io.airlift.airline.Option;
|
||||
import io.netty.util.SuppressForbidden;
|
||||
import org.apache.druid.client.cache.CacheConfig;
|
||||
import org.apache.druid.client.coordinator.CoordinatorClient;
|
||||
import org.apache.druid.client.indexing.HttpIndexingServiceClient;
|
||||
|
@ -345,6 +346,7 @@ public class CliPeon extends GuiceRunnable
|
|||
);
|
||||
}
|
||||
|
||||
@SuppressForbidden(reason = "System#out, System#err")
|
||||
@Override
|
||||
public void run()
|
||||
{
|
||||
|
@ -375,14 +377,15 @@ public class CliPeon extends GuiceRunnable
|
|||
Runtime.getRuntime().removeShutdownHook(hook);
|
||||
}
|
||||
catch (IllegalStateException e) {
|
||||
log.warn("Cannot remove shutdown hook, already shutting down");
|
||||
System.err.println("Cannot remove shutdown hook, already shutting down!");
|
||||
}
|
||||
}
|
||||
catch (Throwable t) {
|
||||
log.error(t, "Error when starting up. Failing.");
|
||||
System.err.println("Error!");
|
||||
System.err.println(Throwables.getStackTraceAsString(t));
|
||||
System.exit(1);
|
||||
}
|
||||
log.info("Finished peon task");
|
||||
System.out.println("Finished peon task");
|
||||
}
|
||||
catch (Exception e) {
|
||||
throw Throwables.propagate(e);
|
||||
|
|
Loading…
Reference in New Issue