diff --git a/utils/java/src/main/java/com/logicalclocks/utils/MainClass.java b/utils/java/src/main/java/com/logicalclocks/utils/MainClass.java index f3104e3bc..e80f2cd87 100644 --- a/utils/java/src/main/java/com/logicalclocks/utils/MainClass.java +++ b/utils/java/src/main/java/com/logicalclocks/utils/MainClass.java @@ -121,6 +121,8 @@ public static void main(String[] args) throws Exception { SparkEngine.getInstance().streamToHudiTable(streamFeatureGroup, writeOptions); } success = true; + } catch (Exception e) { + e.printStackTrace(); } finally { LOGGER.info("Closing spark session..."); try { diff --git a/utils/python/hsfs_utils.py b/utils/python/hsfs_utils.py index 40799c9f4..5af468873 100644 --- a/utils/python/hsfs_utils.py +++ b/utils/python/hsfs_utils.py @@ -6,6 +6,7 @@ import json from datetime import datetime from typing import Any, Dict +import traceback import fsspec.implementations.arrow as pfs @@ -304,6 +305,9 @@ def parse_isoformat_date(da: str) -> datetime: run_feature_monitoring(job_conf) success = True + except Exception: + # Printing stack trace of exception so that logs are not lost. + print(traceback.format_exc()) finally: if spark is not None: try: