Michael Blow has uploaded a new change for review.
https://asterix-gerrit.ics.uci.edu/2042
Change subject: [NO ISSUE] Log the threaddump of the NC at shutdown
......................................................................
[NO ISSUE] Log the threaddump of the NC at shutdown
To assist in debugging issues that may have triggered a shutdown, info
log the node's thread dump at the start of a shutdown request.
Change-Id: I55adc38ca9c66b1e75486f0e9715e1d475917ee6
---
M
hyracks-fullstack/hyracks/hyracks-control/hyracks-control-nc/src/main/java/org/apache/hyracks/control/nc/NCShutdownHook.java
1 file changed, 3 insertions(+), 0 deletions(-)
git pull ssh://asterix-gerrit.ics.uci.edu:29418/asterixdb
refs/changes/42/2042/1
diff --git
a/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-nc/src/main/java/org/apache/hyracks/control/nc/NCShutdownHook.java
b/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-nc/src/main/java/org/apache/hyracks/control/nc/NCShutdownHook.java
index 1cd45b2..0a02635 100644
---
a/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-nc/src/main/java/org/apache/hyracks/control/nc/NCShutdownHook.java
+++
b/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-nc/src/main/java/org/apache/hyracks/control/nc/NCShutdownHook.java
@@ -21,6 +21,8 @@
import java.util.logging.Level;
import java.util.logging.Logger;
+import org.apache.hyracks.util.ThreadDumpUtil;
+
/**
* Shutdown hook that invokes {@link NodeControllerService#stop() stop} method.
* This shutdown hook must have a failsafe mechanism to halt the process in
case the shutdown
@@ -67,6 +69,7 @@
}
shutdownHookThread = Thread.currentThread();
watchDog.start();
+ LOGGER.log(Level.INFO, () -> "Thread dump at shutdown: " +
ThreadDumpUtil.takeDumpString());
nodeControllerService.stop();
} catch (Throwable th) { // NOSONAR... This is fine since this is
shutdown hook
LOGGER.log(Level.WARNING, "Exception in executing shutdown hook",
th);
--
To view, visit https://asterix-gerrit.ics.uci.edu/2042
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I55adc38ca9c66b1e75486f0e9715e1d475917ee6
Gerrit-PatchSet: 1
Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-Owner: Michael Blow <[email protected]>