From 13d79a06a46ccb9486d84392c79718ae192b44ed Mon Sep 17 00:00:00 2001 From: SunpengWan <825559776@qq.com> Date: Wed, 11 Dec 2024 19:00:06 +0800 Subject: [PATCH 1/3] =?UTF-8?q?1=E3=80=81dssWorkspace=5F=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?enabledFlowKeywordsCheck=E5=AD=97=E6=AE=B5=5F2=E3=80=81?= =?UTF-8?q?=E6=9B=B4=E6=94=B9=E5=8F=91=E5=B8=83=E5=88=B0wtss=E5=B7=A5?= =?UTF-8?q?=E4=BD=9C=E6=B5=81=E9=95=BF=E5=BA=A6=5F3=E3=80=81=E5=8F=96?= =?UTF-8?q?=E6=B6=88=E7=BA=BF=E7=A8=8B=E7=AD=89=E5=BE=85=E6=97=B6=E9=97=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../conversion/AzkabanWorkflowToRelSynchronizer.java | 4 ++-- .../dss/framework/workspace/bean/DSSWorkspace.java | 9 +++++++++ .../dss/framework/workspace/dao/DSSWorkspaceMapper.java | 1 + .../io/export/impl/WorkFlowExportServiceImpl.java | 6 +++--- 4 files changed, 15 insertions(+), 5 deletions(-) diff --git a/dss-appconn/appconns/dss-schedulis-appconn/src/main/java/com/webank/wedatasphere/dss/appconn/schedulis/conversion/AzkabanWorkflowToRelSynchronizer.java b/dss-appconn/appconns/dss-schedulis-appconn/src/main/java/com/webank/wedatasphere/dss/appconn/schedulis/conversion/AzkabanWorkflowToRelSynchronizer.java index 31cbb70e0e..a4714db747 100644 --- a/dss-appconn/appconns/dss-schedulis-appconn/src/main/java/com/webank/wedatasphere/dss/appconn/schedulis/conversion/AzkabanWorkflowToRelSynchronizer.java +++ b/dss-appconn/appconns/dss-schedulis-appconn/src/main/java/com/webank/wedatasphere/dss/appconn/schedulis/conversion/AzkabanWorkflowToRelSynchronizer.java @@ -56,7 +56,7 @@ public class AzkabanWorkflowToRelSynchronizer implements WorkflowToRelSynchroniz private DSSToRelConversionOperation dssToRelConversionOperation; //匹配wtss返回的错误信息 private static final Pattern ERROR_PATTERN = Pattern.compile("(?<=Error uploading project properties)[\\s\\S]+.job"); - private static final int SCHEDULIS_MAX_SIZE = 250; + private static final int SCHEDULIS_MAX_SIZE = 1024; public void init() { String baseUrl = dssToRelConversionOperation.getConversionService().getAppInstance().getBaseUrl(); @@ -139,7 +139,7 @@ private String dealSchedulisErrorMsg(String errorMsg) { Matcher matcher = ERROR_PATTERN.matcher(errorMsg); if (matcher.find() && matcher.group().length() >= SCHEDULIS_MAX_SIZE) { errorMsg = "wokflow name " + matcher.group().split("/")[1] + " is to long, please abide the rules of schedulis: projectName + workflowName*3 + 12 <= 250 " + - "(工作流名称太长,需要满足规则 项目名长度 + 工作流长度*3 + 12 <= 250)"; } + "(工作流名称太长,需要满足规则 项目名长度 + 工作流长度*3 + 12 <= 1024)"; } return errorMsg; } } diff --git a/dss-framework/dss-framework-workspace-server/src/main/java/com/webank/wedatasphere/dss/framework/workspace/bean/DSSWorkspace.java b/dss-framework/dss-framework-workspace-server/src/main/java/com/webank/wedatasphere/dss/framework/workspace/bean/DSSWorkspace.java index 49d89dbe6d..9cd1cd312d 100644 --- a/dss-framework/dss-framework-workspace-server/src/main/java/com/webank/wedatasphere/dss/framework/workspace/bean/DSSWorkspace.java +++ b/dss-framework/dss-framework-workspace-server/src/main/java/com/webank/wedatasphere/dss/framework/workspace/bean/DSSWorkspace.java @@ -33,6 +33,7 @@ public class DSSWorkspace { private String lastUpdateUser; private String workspaceType; private int adminPermission; + private Boolean enabledFlowKeywordsCheck; public int getAdminPermission() { return adminPermission; @@ -137,4 +138,12 @@ public String getLastUpdateUser() { public void setLastUpdateUser(String lastUpdateUser) { this.lastUpdateUser = lastUpdateUser; } + + public Boolean getEnabledFlowKeywordsCheck() { + return enabledFlowKeywordsCheck; + } + + public void setEnabledFlowKeywordsCheck(Boolean enabledFlowKeywordsCheck) { + this.enabledFlowKeywordsCheck = enabledFlowKeywordsCheck; + } } diff --git a/dss-framework/dss-framework-workspace-server/src/main/java/com/webank/wedatasphere/dss/framework/workspace/dao/DSSWorkspaceMapper.java b/dss-framework/dss-framework-workspace-server/src/main/java/com/webank/wedatasphere/dss/framework/workspace/dao/DSSWorkspaceMapper.java index 656c74389c..1f16ce9d6e 100644 --- a/dss-framework/dss-framework-workspace-server/src/main/java/com/webank/wedatasphere/dss/framework/workspace/dao/DSSWorkspaceMapper.java +++ b/dss-framework/dss-framework-workspace-server/src/main/java/com/webank/wedatasphere/dss/framework/workspace/dao/DSSWorkspaceMapper.java @@ -36,6 +36,7 @@ public interface DSSWorkspaceMapper { @Result(property = "createTime", column = "create_time"), @Result(property = "lastUpdateTime", column = "last_update_time"), @Result(property = "lastUpdateUser", column = "last_update_user"), + @Result(property = "enabledFlowKeywordsCheck",column = "enabled_flow_keywords_check"), }) DSSWorkspace getWorkspace(@Param("workspaceId") int workspaceId); diff --git a/dss-orchestrator/orchestrators/dss-workflow/dss-workflow-server/src/main/java/com/webank/wedatasphere/dss/workflow/io/export/impl/WorkFlowExportServiceImpl.java b/dss-orchestrator/orchestrators/dss-workflow/dss-workflow-server/src/main/java/com/webank/wedatasphere/dss/workflow/io/export/impl/WorkFlowExportServiceImpl.java index 6de44149c9..d0209dbdfc 100644 --- a/dss-orchestrator/orchestrators/dss-workflow/dss-workflow-server/src/main/java/com/webank/wedatasphere/dss/workflow/io/export/impl/WorkFlowExportServiceImpl.java +++ b/dss-orchestrator/orchestrators/dss-workflow/dss-workflow-server/src/main/java/com/webank/wedatasphere/dss/workflow/io/export/impl/WorkFlowExportServiceImpl.java @@ -432,12 +432,12 @@ public void run() { } try { - // 等待线程完成,等待线程超过60s后超时 + // 等待线程完成或等待线程超时 for (Future future : futureList) { - future.get(60, TimeUnit.SECONDS); + future.get(); } } catch (Exception e) { - logger.error("export-flow-node thread fail msg is {} ", e); + logger.error("{} flow export fail msg is {} ", flowName, e); throw new RuntimeException(e); } From 9cce787389bc21340c5f7d640800f5e13e249141 Mon Sep 17 00:00:00 2001 From: SunpengWan <825559776@qq.com> Date: Wed, 11 Dec 2024 19:02:09 +0800 Subject: [PATCH 2/3] =?UTF-8?q?1=E3=80=81dssWorkspace=5F=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?enabledFlowKeywordsCheck=E5=AD=97=E6=AE=B5=5F2=E3=80=81?= =?UTF-8?q?=E6=9B=B4=E6=94=B9=E5=8F=91=E5=B8=83=E5=88=B0wtss=E5=B7=A5?= =?UTF-8?q?=E4=BD=9C=E6=B5=81=E9=95=BF=E5=BA=A6=5F3=E3=80=81=E5=8F=96?= =?UTF-8?q?=E6=B6=88=E7=BA=BF=E7=A8=8B=E7=AD=89=E5=BE=85=E6=97=B6=E9=97=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dss/workflow/io/export/impl/WorkFlowExportServiceImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dss-orchestrator/orchestrators/dss-workflow/dss-workflow-server/src/main/java/com/webank/wedatasphere/dss/workflow/io/export/impl/WorkFlowExportServiceImpl.java b/dss-orchestrator/orchestrators/dss-workflow/dss-workflow-server/src/main/java/com/webank/wedatasphere/dss/workflow/io/export/impl/WorkFlowExportServiceImpl.java index d0209dbdfc..05d2520ba6 100644 --- a/dss-orchestrator/orchestrators/dss-workflow/dss-workflow-server/src/main/java/com/webank/wedatasphere/dss/workflow/io/export/impl/WorkFlowExportServiceImpl.java +++ b/dss-orchestrator/orchestrators/dss-workflow/dss-workflow-server/src/main/java/com/webank/wedatasphere/dss/workflow/io/export/impl/WorkFlowExportServiceImpl.java @@ -432,7 +432,7 @@ public void run() { } try { - // 等待线程完成或等待线程超时 + // 等待线程完成 for (Future future : futureList) { future.get(); } From ee23a94a229027cc38ffca6ca63d63c170253be3 Mon Sep 17 00:00:00 2001 From: SunpengWan <825559776@qq.com> Date: Thu, 12 Dec 2024 09:24:17 +0800 Subject: [PATCH 3/3] =?UTF-8?q?DSSWorkspace=E6=B7=BB=E5=8A=A0isDefaultRefe?= =?UTF-8?q?rence=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dss/framework/workspace/bean/DSSWorkspace.java | 10 ++++++++++ .../framework/workspace/dao/impl/WorkspaceMapper.xml | 4 +++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/dss-framework/dss-framework-workspace-server/src/main/java/com/webank/wedatasphere/dss/framework/workspace/bean/DSSWorkspace.java b/dss-framework/dss-framework-workspace-server/src/main/java/com/webank/wedatasphere/dss/framework/workspace/bean/DSSWorkspace.java index 9cd1cd312d..f0c45a994a 100644 --- a/dss-framework/dss-framework-workspace-server/src/main/java/com/webank/wedatasphere/dss/framework/workspace/bean/DSSWorkspace.java +++ b/dss-framework/dss-framework-workspace-server/src/main/java/com/webank/wedatasphere/dss/framework/workspace/bean/DSSWorkspace.java @@ -35,6 +35,8 @@ public class DSSWorkspace { private int adminPermission; private Boolean enabledFlowKeywordsCheck; + private Boolean isDefaultReference; + public int getAdminPermission() { return adminPermission; } @@ -146,4 +148,12 @@ public Boolean getEnabledFlowKeywordsCheck() { public void setEnabledFlowKeywordsCheck(Boolean enabledFlowKeywordsCheck) { this.enabledFlowKeywordsCheck = enabledFlowKeywordsCheck; } + + public Boolean getDefaultReference() { + return isDefaultReference; + } + + public void setDefaultReference(Boolean defaultReference) { + isDefaultReference = defaultReference; + } } diff --git a/dss-framework/dss-framework-workspace-server/src/main/java/com/webank/wedatasphere/dss/framework/workspace/dao/impl/WorkspaceMapper.xml b/dss-framework/dss-framework-workspace-server/src/main/java/com/webank/wedatasphere/dss/framework/workspace/dao/impl/WorkspaceMapper.xml index 5d86da48ea..d5d2c9562a 100644 --- a/dss-framework/dss-framework-workspace-server/src/main/java/com/webank/wedatasphere/dss/framework/workspace/dao/impl/WorkspaceMapper.xml +++ b/dss-framework/dss-framework-workspace-server/src/main/java/com/webank/wedatasphere/dss/framework/workspace/dao/impl/WorkspaceMapper.xml @@ -61,7 +61,9 @@ last_update_time, last_update_user, workspace_type, - admin_permission + admin_permission, + enabled_flow_keywords_check as enabledFlowKeywordsCheck, + is_default_reference as isDefaultReference FROM dss_workspace WHERE id = #{workspaceId}