diff --git a/fe/fe-core/src/main/java/org/apache/doris/scheduler/disruptor/TaskHandler.java b/fe/fe-core/src/main/java/org/apache/doris/scheduler/disruptor/TaskHandler.java index 3056502e86e2821..b9c7196e23b0d40 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/scheduler/disruptor/TaskHandler.java +++ b/fe/fe-core/src/main/java/org/apache/doris/scheduler/disruptor/TaskHandler.java @@ -125,7 +125,7 @@ public void onTimerJobTaskHandle(TaskEvent taskEvent) { jobTask.setIsSuccessful(result.isSuccess()); if (!result.isSuccess()) { log.warn("Job execute failed, jobId: {}, msg : {}", jobId, result.getExecutorSql()); - jobTask.setErrorMsg(result.getExecutorSql()); + jobTask.setErrorMsg(result.getErrorMsg()); timerJobManager.pauseJob(jobId); } jobTask.setExecuteSql(result.getExecutorSql()); diff --git a/fe/fe-core/src/main/java/org/apache/doris/scheduler/executor/SqlJobExecutor.java b/fe/fe-core/src/main/java/org/apache/doris/scheduler/executor/SqlJobExecutor.java index 5441532142bc7eb..3df2a6fd9a2de92 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/scheduler/executor/SqlJobExecutor.java +++ b/fe/fe-core/src/main/java/org/apache/doris/scheduler/executor/SqlJobExecutor.java @@ -36,7 +36,6 @@ /** * we use this executor to execute sql job - * */ @Slf4j public class SqlJobExecutor implements JobExecutor { @@ -71,7 +70,7 @@ public ExecutorResult execute(Job job) throws JobException { return new ExecutorResult<>(result, true, null, sql); } catch (Exception e) { - log.warn("execute sql job failed, sql: {}, error: {}", sql, e.getMessage()); + log.warn("execute sql job failed, job id :{}, sql: {}, error: {}", job.getJobId(), sql, e); return new ExecutorResult<>(null, false, e.getMessage(), sql); }