|
50 | 50 | import org.apache.dolphinscheduler.common.utils.CodeGenerateUtils.CodeGenerateException; |
51 | 51 | import org.apache.dolphinscheduler.common.utils.DateUtils; |
52 | 52 | import org.apache.dolphinscheduler.common.utils.JSONUtils; |
| 53 | +import org.apache.dolphinscheduler.dao.entity.Cluster; |
53 | 54 | import org.apache.dolphinscheduler.dao.entity.Command; |
54 | 55 | import org.apache.dolphinscheduler.dao.entity.DagData; |
55 | 56 | import org.apache.dolphinscheduler.dao.entity.DataSource; |
|
62 | 63 | import org.apache.dolphinscheduler.dao.entity.DqTaskStatisticsValue; |
63 | 64 | import org.apache.dolphinscheduler.dao.entity.Environment; |
64 | 65 | import org.apache.dolphinscheduler.dao.entity.ErrorCommand; |
65 | | -import org.apache.dolphinscheduler.dao.entity.K8s; |
66 | 66 | import org.apache.dolphinscheduler.dao.entity.ProcessDefinition; |
67 | 67 | import org.apache.dolphinscheduler.dao.entity.ProcessDefinitionLog; |
68 | 68 | import org.apache.dolphinscheduler.dao.entity.ProcessInstance; |
|
81 | 81 | import org.apache.dolphinscheduler.dao.entity.Tenant; |
82 | 82 | import org.apache.dolphinscheduler.dao.entity.UdfFunc; |
83 | 83 | import org.apache.dolphinscheduler.dao.entity.User; |
| 84 | +import org.apache.dolphinscheduler.dao.mapper.ClusterMapper; |
84 | 85 | import org.apache.dolphinscheduler.dao.mapper.CommandMapper; |
85 | 86 | import org.apache.dolphinscheduler.dao.mapper.DataSourceMapper; |
86 | 87 | import org.apache.dolphinscheduler.dao.mapper.DqComparisonTypeMapper; |
|
91 | 92 | import org.apache.dolphinscheduler.dao.mapper.DqTaskStatisticsValueMapper; |
92 | 93 | import org.apache.dolphinscheduler.dao.mapper.EnvironmentMapper; |
93 | 94 | import org.apache.dolphinscheduler.dao.mapper.ErrorCommandMapper; |
94 | | -import org.apache.dolphinscheduler.dao.mapper.K8sMapper; |
95 | 95 | import org.apache.dolphinscheduler.dao.mapper.ProcessDefinitionLogMapper; |
96 | 96 | import org.apache.dolphinscheduler.dao.mapper.ProcessDefinitionMapper; |
97 | 97 | import org.apache.dolphinscheduler.dao.mapper.ProcessInstanceMapMapper; |
@@ -276,7 +276,7 @@ public class ProcessServiceImpl implements ProcessService { |
276 | 276 | private TaskPluginManager taskPluginManager; |
277 | 277 |
|
278 | 278 | @Autowired |
279 | | - private K8sMapper k8sMapper; |
| 279 | + private ClusterMapper clusterMapper; |
280 | 280 |
|
281 | 281 | @Autowired |
282 | 282 | private CuringParamsService curingGlobalParamsService; |
@@ -3170,10 +3170,11 @@ public String findConfigYamlByName(String clusterName) { |
3170 | 3170 | if (Strings.isNullOrEmpty(clusterName)) { |
3171 | 3171 | return null; |
3172 | 3172 | } |
3173 | | - QueryWrapper<K8s> nodeWrapper = new QueryWrapper<>(); |
3174 | | - nodeWrapper.eq("k8s_name", clusterName); |
3175 | | - K8s k8s = k8sMapper.selectOne(nodeWrapper); |
3176 | | - return k8s.getK8sConfig(); |
| 3173 | + |
| 3174 | + QueryWrapper<Cluster> nodeWrapper = new QueryWrapper<>(); |
| 3175 | + nodeWrapper.eq("name", clusterName); |
| 3176 | + Cluster cluster = clusterMapper.selectOne(nodeWrapper); |
| 3177 | + return cluster == null ? null : cluster.getConfig(); |
3177 | 3178 | } |
3178 | 3179 |
|
3179 | 3180 | @Override |
|
0 commit comments