From 82168f244f603db19f6140dac2c14ccac1461e1c Mon Sep 17 00:00:00 2001 From: zqburde Date: Thu, 8 Jun 2023 15:42:43 +0800 Subject: [PATCH] Fix bug. --- .../publish/job/CommonUpdateConvertJobStatus.java | 7 +++++-- .../orchestrator/common/entity/OrchestratorPublishJob.java | 6 ++---- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/dss-framework/framework-plugins/dss-framework-orchestrator-publish/src/main/java/com/webank/wedatasphere/dss/orchestrator/publish/job/CommonUpdateConvertJobStatus.java b/dss-framework/framework-plugins/dss-framework-orchestrator-publish/src/main/java/com/webank/wedatasphere/dss/orchestrator/publish/job/CommonUpdateConvertJobStatus.java index 8780e725b..f0ee73481 100644 --- a/dss-framework/framework-plugins/dss-framework-orchestrator-publish/src/main/java/com/webank/wedatasphere/dss/orchestrator/publish/job/CommonUpdateConvertJobStatus.java +++ b/dss-framework/framework-plugins/dss-framework-orchestrator-publish/src/main/java/com/webank/wedatasphere/dss/orchestrator/publish/job/CommonUpdateConvertJobStatus.java @@ -36,8 +36,11 @@ public void toSuccessStatus(OrchestratorPublishJob orchestratorPublishJob) { public void toFailedStatus(OrchestratorPublishJob orchestratorPublishJob, String errorMsg) { orchestratorPublishJob.setStatus(JobStatus.Failed.getStatus()); - orchestratorPublishJob.setErrorMsg(errorMsg); + if (errorMsg.length() > 2048) { + orchestratorPublishJob.setErrorMsg(errorMsg.substring(0, 2048)); + } else { + orchestratorPublishJob.setErrorMsg(errorMsg); + } updateConvertJobStatus(orchestratorPublishJob); } - } diff --git a/dss-orchestrator/dss-orchestrator-common/src/main/java/com/webank/wedatasphere/dss/orchestrator/common/entity/OrchestratorPublishJob.java b/dss-orchestrator/dss-orchestrator-common/src/main/java/com/webank/wedatasphere/dss/orchestrator/common/entity/OrchestratorPublishJob.java index d852b45b7..abae42b27 100644 --- a/dss-orchestrator/dss-orchestrator-common/src/main/java/com/webank/wedatasphere/dss/orchestrator/common/entity/OrchestratorPublishJob.java +++ b/dss-orchestrator/dss-orchestrator-common/src/main/java/com/webank/wedatasphere/dss/orchestrator/common/entity/OrchestratorPublishJob.java @@ -41,18 +41,16 @@ public String getJobId() { return jobId; } - public OrchestratorPublishJob setJobId(String jobId) { + public void setJobId(String jobId) { this.jobId = jobId; - return this; } public String getConversionJobJson() { return conversionJobJson; } - public OrchestratorPublishJob setConversionJobJson(String conversionJobJson) { + public void setConversionJobJson(String conversionJobJson) { this.conversionJobJson = conversionJobJson; - return this; } public Date getCreateTime() {