mirror of https://github.com/apache/druid.git
Check for non-daemon threads when CliPeon exits
This commit is contained in:
parent
c9d6994040
commit
194f632b00
|
@ -76,6 +76,7 @@ import org.eclipse.jetty.server.Server;
|
|||
import java.io.File;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
/**
|
||||
*/
|
||||
|
@ -223,6 +224,15 @@ public class CliPeon extends GuiceRunnable
|
|||
)
|
||||
);
|
||||
injector.getInstance(ExecutorLifecycle.class).join();
|
||||
|
||||
// Sanity check to help debug unexpected non-daemon threads
|
||||
final Set<Thread> threadSet = Thread.getAllStackTraces().keySet();
|
||||
for (Thread thread : threadSet) {
|
||||
if (!thread.isDaemon() && thread != Thread.currentThread()) {
|
||||
log.info("Thread [%s] is non daemon.", thread);
|
||||
}
|
||||
}
|
||||
|
||||
// Explicitly call lifecycle stop, dont rely on shutdown hook.
|
||||
lifecycle.stop();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue