From 01d4d27992b0b8ea310ec3974ce2194cc6763d1e Mon Sep 17 00:00:00 2001 From: ikiler Date: Mon, 9 Oct 2023 23:28:56 +0800 Subject: [PATCH] merge dev and formate code --- .../src/main/java/org/dinky/data/dto/TaskDTO.java | 3 --- .../java/org/dinky/service/impl/TaskServiceImpl.java | 6 +++--- .../src/main/java/org/dinky/data/result/ResultPool.java | 6 ------ dinky-core/src/main/java/org/dinky/job/JobConfig.java | 9 ++++----- 4 files changed, 7 insertions(+), 17 deletions(-) diff --git a/dinky-admin/src/main/java/org/dinky/data/dto/TaskDTO.java b/dinky-admin/src/main/java/org/dinky/data/dto/TaskDTO.java index 8508036b92..5412e392f3 100644 --- a/dinky-admin/src/main/java/org/dinky/data/dto/TaskDTO.java +++ b/dinky-admin/src/main/java/org/dinky/data/dto/TaskDTO.java @@ -31,9 +31,6 @@ import java.util.Map; import com.baomidou.mybatisplus.annotation.TableField; -import com.fasterxml.jackson.databind.JsonNode; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.node.ObjectNode; import cn.hutool.core.bean.BeanUtil; import io.swagger.annotations.ApiModel; diff --git a/dinky-admin/src/main/java/org/dinky/service/impl/TaskServiceImpl.java b/dinky-admin/src/main/java/org/dinky/service/impl/TaskServiceImpl.java index c44808d49f..ac2e6c6509 100644 --- a/dinky-admin/src/main/java/org/dinky/service/impl/TaskServiceImpl.java +++ b/dinky-admin/src/main/java/org/dinky/service/impl/TaskServiceImpl.java @@ -86,7 +86,7 @@ import org.dinky.service.UDFTemplateService; import org.dinky.service.UserService; import org.dinky.utils.FragmentVariableUtils; -import org.dinky.utils.JSONUtil; +import org.dinky.utils.JsonUtils; import org.dinky.utils.RunTimeUtil; import org.dinky.utils.UDFUtils; @@ -357,7 +357,7 @@ public List explainTask(TaskDTO task) throws NotSupportExplain public ObjectNode getJobPlan(TaskDTO task) { JobManager jobManager = JobManager.buildPlanMode(buildJobConfig(task)); String planJson = jobManager.getJobPlanJson(task.getStatement()); - return JSONUtil.parseObject(planJson); + return JsonUtils.parseObject(planJson); } @Override @@ -588,7 +588,7 @@ public String exportJsonByTaskId(Integer taskId) { } // path - ObjectNode jsonNode = (ObjectNode) JSONUtil.toJsonNode(task); + ObjectNode jsonNode = (ObjectNode) JsonUtils.toJsonNode(task); jsonNode.put("path", getTaskPathByTaskId(taskId)); // clusterConfigurationName diff --git a/dinky-core/src/main/java/org/dinky/data/result/ResultPool.java b/dinky-core/src/main/java/org/dinky/data/result/ResultPool.java index 8d6a06e6ea..fd6802b71f 100644 --- a/dinky-core/src/main/java/org/dinky/data/result/ResultPool.java +++ b/dinky-core/src/main/java/org/dinky/data/result/ResultPool.java @@ -21,12 +21,6 @@ import org.dinky.metadata.result.JdbcSelectResult; -import java.util.Map; -import java.util.concurrent.ConcurrentHashMap; -import java.util.concurrent.TimeUnit; - -import cn.hutool.cache.Cache; -import cn.hutool.cache.impl.TimedCache; import java.util.concurrent.TimeUnit; import cn.hutool.cache.Cache; diff --git a/dinky-core/src/main/java/org/dinky/job/JobConfig.java b/dinky-core/src/main/java/org/dinky/job/JobConfig.java index 8b4f5626fe..0e65b98296 100644 --- a/dinky-core/src/main/java/org/dinky/job/JobConfig.java +++ b/dinky-core/src/main/java/org/dinky/job/JobConfig.java @@ -21,9 +21,8 @@ import org.dinky.assertion.Asserts; import org.dinky.data.constant.NetConstant; -import org.dinky.executor.ExecutorSetting; -import org.dinky.gateway.config.FlinkConfig; import org.dinky.executor.ExecutorConfig; +import org.dinky.gateway.config.FlinkConfig; import org.dinky.gateway.config.GatewayConfig; import org.dinky.gateway.enums.GatewayType; import org.dinky.gateway.enums.SavePointStrategy; @@ -228,9 +227,9 @@ public ExecutorConfig getExecutorSetting() { address, checkpoint, parallelism, - useSqlFragment, - useStatementSet, - useBatchModel, + fragment, + statementSet, + batchModel, savePointPath, jobName, configJson,