[NO ISSUE][HYR][MISC] Halt on unhandled exception
Change-Id: I4ffe0ebd855bcbd5031e716b820474b6c63979b4
Reviewed-on: https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/17742
Reviewed-by: Murtadha Al Hubail <mhubail@apache.org>
Integration-Tests: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
Tested-by: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
diff --git a/hyracks-fullstack/hyracks/hyracks-api/src/main/java/org/apache/hyracks/api/lifecycle/LifeCycleComponentManager.java b/hyracks-fullstack/hyracks/hyracks-api/src/main/java/org/apache/hyracks/api/lifecycle/LifeCycleComponentManager.java
index a9b7a97..54bac09 100644
--- a/hyracks-fullstack/hyracks/hyracks-api/src/main/java/org/apache/hyracks/api/lifecycle/LifeCycleComponentManager.java
+++ b/hyracks-fullstack/hyracks/hyracks-api/src/main/java/org/apache/hyracks/api/lifecycle/LifeCycleComponentManager.java
@@ -18,7 +18,7 @@
*/
package org.apache.hyracks.api.lifecycle;
-import static org.apache.hyracks.util.ExitUtil.EC_UNHANDLED_EXCEPTION;
+import static org.apache.hyracks.util.ExitUtil.EC_HALT_UNHANDLED_EXCEPTION;
import java.io.File;
import java.io.FileOutputStream;
@@ -57,9 +57,9 @@
@Override
public void uncaughtException(Thread t, Throwable e) {
try {
- LOGGER.log(Level.ERROR, "Uncaught Exception from thread " + t.getName() + ". Calling shutdown hook", e);
+ LOGGER.fatal("Uncaught Exception from thread {}; halting", t.getName(), e);
} finally {
- ExitUtil.exit(EC_UNHANDLED_EXCEPTION);
+ ExitUtil.halt(EC_HALT_UNHANDLED_EXCEPTION);
}
}
diff --git a/hyracks-fullstack/hyracks/hyracks-util/src/main/java/org/apache/hyracks/util/ExitUtil.java b/hyracks-fullstack/hyracks/hyracks-util/src/main/java/org/apache/hyracks/util/ExitUtil.java
index 8f8e8f6..7eb9fd4 100644
--- a/hyracks-fullstack/hyracks/hyracks-util/src/main/java/org/apache/hyracks/util/ExitUtil.java
+++ b/hyracks-fullstack/hyracks/hyracks-util/src/main/java/org/apache/hyracks/util/ExitUtil.java
@@ -46,7 +46,7 @@
public static final int EC_FAILED_TO_ABORT_METADATA_TXN = 7;
public static final int EC_INCONSISTENT_METADATA = 8;
public static final int EC_UNCAUGHT_THROWABLE = 9;
- public static final int EC_UNHANDLED_EXCEPTION = 11;
+ public static final int EC_HALT_UNHANDLED_EXCEPTION = 11;
public static final int EC_FAILED_TO_DELETE_CORRUPTED_RESOURCES = 12;
public static final int EC_ERROR_CREATING_RESOURCES = 13;
public static final int EC_TXN_LOG_FLUSHER_FAILURE = 14;