From cb14726bdd8b89c04b7daa08835d72baa64a3209 Mon Sep 17 00:00:00 2001 From: zhuxt2015 <594754793@qq.com> Date: Wed, 29 Jun 2022 09:57:05 +0800 Subject: [PATCH] [Bug] [Task] SQL task no exception stack trace in task log (#10656) --- .../apache/dolphinscheduler/plugin/task/datax/DataxTask.java | 1 + .../org/apache/dolphinscheduler/plugin/task/sql/SqlTask.java | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/dolphinscheduler-task-plugin/dolphinscheduler-task-datax/src/main/java/org/apache/dolphinscheduler/plugin/task/datax/DataxTask.java b/dolphinscheduler-task-plugin/dolphinscheduler-task-datax/src/main/java/org/apache/dolphinscheduler/plugin/task/datax/DataxTask.java index 5627edad18..db771ca04e 100644 --- a/dolphinscheduler-task-plugin/dolphinscheduler-task-datax/src/main/java/org/apache/dolphinscheduler/plugin/task/datax/DataxTask.java +++ b/dolphinscheduler-task-plugin/dolphinscheduler-task-datax/src/main/java/org/apache/dolphinscheduler/plugin/task/datax/DataxTask.java @@ -167,6 +167,7 @@ public class DataxTask extends AbstractTaskExecutor { setAppIds(commandExecuteResult.getAppIds()); setProcessId(commandExecuteResult.getProcessId()); } catch (Exception e) { + logger.error("datax task error", e); setExitStatusCode(EXIT_CODE_FAILURE); throw e; } diff --git a/dolphinscheduler-task-plugin/dolphinscheduler-task-sql/src/main/java/org/apache/dolphinscheduler/plugin/task/sql/SqlTask.java b/dolphinscheduler-task-plugin/dolphinscheduler-task-sql/src/main/java/org/apache/dolphinscheduler/plugin/task/sql/SqlTask.java index b3943ce0a1..c090cf9a30 100644 --- a/dolphinscheduler-task-plugin/dolphinscheduler-task-sql/src/main/java/org/apache/dolphinscheduler/plugin/task/sql/SqlTask.java +++ b/dolphinscheduler-task-plugin/dolphinscheduler-task-sql/src/main/java/org/apache/dolphinscheduler/plugin/task/sql/SqlTask.java @@ -161,7 +161,7 @@ public class SqlTask extends AbstractTaskExecutor { } catch (Exception e) { setExitStatusCode(TaskConstants.EXIT_CODE_FAILURE); - logger.error("sql task error: {}", e.toString()); + logger.error("sql task error", e); throw e; } }