Skip to content

Commit 151b262

Browse files
QAQ-Junvainhopeanmopeishengsheng
authored
Conflict bug (#1051)
Co-authored-by: vainhope <845869847@qq.com> Co-authored-by: anmo <anmo@dtstack.com> Co-authored-by: peishengsheng <793850328@qq.com>
1 parent f50d8b3 commit 151b262

File tree

17 files changed

+178
-45
lines changed

17 files changed

+178
-45
lines changed

sql/1.4/increment.sql

Lines changed: 55 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -187,26 +187,24 @@ VALUES ('component_datasource_mapping', '3', '80', null, 18, 1, 'STRING', 'TDH 6
187187

188188
ALTER TABLE console_component
189189
ADD datasource_type int null comment '数据插件类型';
190-
COMMIT;
191-
192-
INSERT INTO `dict` (dict_code, dict_name, dict_value, dict_desc, type, sort, data_type, depend_name, is_default,
193-
gmt_create, gmt_modified, is_deleted)
194-
VALUES ('25', 'HadoopMR',
195-
'{"actions": ["SAVE_TASK", "SUBMIT_TASK", "OPERATOR_TASK"], "formField": ["resourceIdList", "mainClass", "exeArgs"],"barItem":["dependency","task_params","env_params"], "renderKind": "spark"}',
196-
'', 30, 5, 'STRING', '', 0, '2023-02-09 10:28:45', '2023-02-09 10:28:45', 0);
197-
198190

199191
-- script 支持 standalone
200192
UPDATE console_component t
201-
SET t.version_name = 'on-yarn', gmt_modified = now()
202-
WHERE component_type_code = 8;
193+
SET t.version_name = 'on-yarn',
194+
t.gmt_modified = now(),
195+
t.deploy_type = 1
196+
WHERE t.component_type_code = 8;
203197

204198
-- 处理组件配置是否有多版本之类的
205199
update dict
206200
set dict_value = '{"owner": "COMPUTE", "dependsOn": ["RESOURCE", "STORAGE"], "allowKerberos": "true", "allowCoexistence": true, "uploadConfigType": "0", "versionDictionary": "SCRIPT_VERSION"}'
207201
where type = 12
208202
and dict_name = 'SCRIPT';
209203

204+
DELETE
205+
FROM `dict`
206+
WHERE type = 34
207+
and dict_code = 'script_version';
210208
-- 处理组件配置树
211209
INSERT INTO dict (dict_code, dict_name, dict_value, dict_desc, type, sort, data_type, depend_name, is_default,
212210
gmt_create, gmt_modified, is_deleted)
@@ -215,18 +213,30 @@ INSERT INTO dict (dict_code, dict_name, dict_value, dict_desc, type, sort, data_
215213
gmt_create, gmt_modified, is_deleted)
216214
VALUES ('script_version', 'standalone', '', null, 34, 2, 'INTEGER', '', 0, now(), now(), 0);
217215

216+
DELETE
217+
FROM `dict`
218+
WHERE dict_name = 'script-standalone'
219+
and dict_code = 'typename_mapping';
218220
-- 处理组件默认版本
219221
INSERT INTO dict (dict_code, dict_name, dict_value, dict_desc, type, sort, data_type, depend_name,
220222
is_default, gmt_create, gmt_modified, is_deleted)
221223
VALUES ('typename_mapping', 'script-standalone', '-320', null, 6, 0, 'LONG', '', 0, now(), now(), 0);
222224

223-
225+
DELETE
226+
FROM `dict`
227+
WHERE dict_name = 'standalone'
228+
and dict_code = 'component_model_config'
229+
and type = 14;
224230
-- 处理组件配置模版获取
225231
INSERT INTO dict (dict_code, dict_name, dict_value, dict_desc, type, sort, data_type, depend_name,
226232
is_default, gmt_create, gmt_modified, is_deleted)
227233
VALUES ('component_model_config', 'standalone', '{"standalone":"script-standalone"}', null, 14, 1,
228234
'STRING', 'SCRIPT', 0, now(), now(), 0);
229235

236+
DELETE
237+
FROM `console_component_config`
238+
WHERE `cluster_id` = -2
239+
AND `component_id` IN (-320, -233);
230240
-- 组件模版参数
231241
insert into console_component_config (cluster_id, component_id, component_type_code, type, required, `key`,
232242
value, `values`, dependencyKey, dependencyValue, `desc`, gmt_create,
@@ -251,7 +261,7 @@ VALUES ('tips', 'log.dir', '临时脚本、运行日志存放路径', '8', 25, 0
251261
UPDATE task_param_template t
252262
SET t.params = '## 任务运行方式:
253263
## yarn: 将任务运行在Hadoop集群上
254-
## standalone将任务运行在本地,单独运行
264+
## standalone: 将任务运行在本地,单独运行
255265
runMode=yarn
256266
## 每个worker所占内存,比如512m
257267
# script.worker.memory=512m
@@ -268,13 +278,24 @@ job.priority=10
268278
## 指定work运行机架
269279
# script.worker.racks=
270280
## 日志级别可选ALL, DEBUG, ERROR, FATAL, INFO, OFF, TRACE, WARN
271-
logLevel=INFO' WHERE t.task_type in (12, 13);
272-
281+
logLevel=INFO'
282+
WHERE t.task_type in (12, 13);
273283

284+
DELETE
285+
FROM `dict`
286+
WHERE dict_code = 'component_model'
287+
and dict_name = 'DATAX';
274288

275-
INSERT INTO `dict` (dict_code, dict_name, dict_value, dict_desc, type, sort, data_type, depend_name, is_default, gmt_create, gmt_modified, is_deleted) VALUES ('component_model', 'DATAX', '{"owner": "COMPUTE", "dependsOn": [], "nameTemplate": "datax", "allowKerberos": "false", "allowCoexistence": false, "uploadConfigType": "0"}', null, 12, 0, 'STRING', '', 0, '2023-02-07 11:26:57', '2023-02-07 16:54:54', 0);
276-
INSERT INTO `console_component` (component_name, component_type_code, store_type, is_metadata, is_default, cluster_id, gmt_create, gmt_modified, is_deleted) VALUES ('DATAX', 9, 2, 0, 1, -1, '2023-02-27 15:46:53', '2023-02-27 15:46:53', 0);
289+
INSERT INTO `dict` (dict_code, dict_name, dict_value, dict_desc, type, sort, data_type, depend_name, is_default,
290+
gmt_create, gmt_modified, is_deleted)
291+
VALUES ('component_model', 'DATAX',
292+
'{"owner": "COMPUTE", "dependsOn": [], "nameTemplate": "DATAX", "allowKerberos": "false", "allowCoexistence": false, "uploadConfigType": "0"}',
293+
null, 12, 0, 'STRING', '', 0, '2023-02-07 11:26:57', '2023-02-07 16:54:54', 0);
277294

295+
DELETE
296+
FROM `dict`
297+
WHERE dict_code = 'typename_mapping'
298+
and dict_name = 'DATAX';
278299
-- 处理组件默认版本
279300
INSERT INTO dict (dict_code, dict_name, dict_value, dict_desc, type, sort, data_type, depend_name,
280301
is_default, gmt_create, gmt_modified, is_deleted)
@@ -284,10 +305,25 @@ VALUES ('typename_mapping', 'DATAX', '-233', null, 6, 0, 'LONG', '', 0, now(), n
284305
insert into console_component_config (cluster_id, component_id, component_type_code, type, required, `key`,
285306
value, `values`, dependencyKey, dependencyValue, `desc`, gmt_create,
286307
gmt_modified, is_deleted)
287-
values (-2, -233, 8, 'INPUT', 1, 'datax.local.path', '/data/taier', null, null, null, null, now(), now(), 0);
308+
values (-2, -233, 8, 'INPUT', 1, 'DataX.local.path', '/data/taier', null, null, null, null, now(), now(), 0);
288309

289310
insert into console_component_config (cluster_id, component_id, component_type_code, type, required, `key`,
290311
value, `values`, dependencyKey, dependencyValue, `desc`, gmt_create,
291312
gmt_modified, is_deleted)
292-
values (-2, -233, 8, 'INPUT', 1, 'datax.task.temp', '/data/taier', null, null, null, null, now(), now(), 0);
293-
INSERT INTO dict (dict_code, dict_name, dict_value, dict_desc, type, sort, data_type, depend_name, is_default, gmt_create, gmt_modified, is_deleted) VALUES ('26', 'DATAX', '{"actions": ["SAVE_TASK", "RUN_TASK", "STOP_TASK", "SUBMIT_TASK", "OPERATOR_TASK"], "barItem": ["task", "dependency", "task_params", "env_params"], "formField": ["datasource"], "renderKind": "editor","dataTypeCodes":["27","7","50"]}', null, 30, 0, 'STRING', '', 0, '2023-03-03 07:27:25', '2022-03-03 07:27:25', 0);
313+
values (-2, -233, 8, 'INPUT', 1, 'DataX.task.temp', '/data/taier', null, null, null, null, now(), now(), 0),
314+
(-2, -233, 8, 'INPUT', 1, 'execute.dir', '/tmp/dir', null, null, null, null, now(), now(), 0),
315+
(-2, -233, 8, 'INPUT', 1, 'DATAX.python.path', 'python3', null, null, null, null, now(), now(), 0);
316+
317+
DELETE
318+
FROM `dict`
319+
WHERE dict_code = '26'
320+
and dict_name = 'DATAX';
321+
322+
INSERT INTO dict (dict_code, dict_name, dict_value, dict_desc, type, sort, data_type, depend_name, is_default,
323+
gmt_create, gmt_modified, is_deleted)
324+
VALUES ('26', 'DATAX',
325+
'{"actions": ["SAVE_TASK", "RUN_TASK", "STOP_TASK", "SUBMIT_TASK", "OPERATOR_TASK"], "barItem": ["task", "dependency", "task_params", "env_params"], "formField": ["datasource"], "renderKind": "editor","dataTypeCodes":["27","7","50"]}',
326+
null, 30, 0, 'STRING', '', 0, '2023-03-03 07:27:25', '2022-03-03 07:27:25', 0);
327+
328+
329+
COMMIT;

sql/init.sql

Lines changed: 59 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2339,6 +2339,10 @@ VALUES (1, 'admin@dtstack.com', '0192023A7BBD73250516F069DF18B500', '', 'admin@d
23392339
COMMIT;
23402340

23412341
SET FOREIGN_KEY_CHECKS = 1;
2342+
2343+
INSERT INTO `dict` (dict_code, dict_name, dict_value, dict_desc, type, sort, data_type, depend_name, is_default, gmt_create, gmt_modified, is_deleted) VALUES ('25', 'HadoopMR', '{"actions": ["SAVE_TASK", "SUBMIT_TASK", "OPERATOR_TASK"], "formField": ["resourceIdList", "mainClass", "exeArgs"],"barItem":["dependency","task_params","env_params"], "renderKind": "spark"}', '', 30, 5, 'STRING', '', 0, '2023-02-09 10:28:45', '2023-02-09 10:28:45', 0);
2344+
2345+
23422346
-- script 支持 standalone
23432347

23442348
-- 处理组件配置是否有多版本之类的
@@ -2383,7 +2387,7 @@ VALUES ('tips', 'log.dir', '临时脚本、运行日志存放路径', '8', 25, 0
23832387
UPDATE task_param_template t
23842388
SET t.params = '## 任务运行方式:
23852389
## yarn: 将任务运行在Hadoop集群上
2386-
## standalone将任务运行在本地,单独运行
2390+
## standalone: 将任务运行在本地,单独运行
23872391
runMode=yarn
23882392
23892393
## 每个worker所占内存,比如512m
@@ -2408,4 +2412,57 @@ job.priority=10
24082412
# script.worker.racks=
24092413
24102414
## 日志级别可选ALL, DEBUG, ERROR, FATAL, INFO, OFF, TRACE, WARN
2411-
logLevel=INFO' WHERE t.task_type in (12, 13);
2415+
logLevel=INFO'
2416+
WHERE t.task_type in (12, 13);
2417+
2418+
UPDATE console_component t
2419+
SET t.version_name = 'on-yarn',
2420+
t.gmt_modified = now(),
2421+
t.deploy_type = 1
2422+
WHERE t.component_type_code = 8;
2423+
2424+
DELETE
2425+
FROM `dict`
2426+
WHERE dict_code = 'component_model'
2427+
and dict_name = 'DATAX';
2428+
2429+
INSERT INTO `dict` (dict_code, dict_name, dict_value, dict_desc, type, sort, data_type, depend_name, is_default,
2430+
gmt_create, gmt_modified, is_deleted)
2431+
VALUES ('component_model', 'DATAX',
2432+
'{"owner": "COMPUTE", "dependsOn": [], "nameTemplate": "DATAX", "allowKerberos": "false", "allowCoexistence": false, "uploadConfigType": "0"}',
2433+
null, 12, 0, 'STRING', '', 0, '2023-02-07 11:26:57', '2023-02-07 16:54:54', 0);
2434+
2435+
DELETE
2436+
FROM `dict`
2437+
WHERE dict_code = 'typename_mapping'
2438+
and dict_name = 'DATAX';
2439+
-- 处理组件默认版本
2440+
INSERT INTO dict (dict_code, dict_name, dict_value, dict_desc, type, sort, data_type, depend_name,
2441+
is_default, gmt_create, gmt_modified, is_deleted)
2442+
VALUES ('typename_mapping', 'DATAX', '-233', null, 6, 0, 'LONG', '', 0, now(), now(), 0);
2443+
2444+
-- 组件模版参数
2445+
insert into console_component_config (cluster_id, component_id, component_type_code, type, required, `key`,
2446+
value, `values`, dependencyKey, dependencyValue, `desc`, gmt_create,
2447+
gmt_modified, is_deleted)
2448+
values (-2, -233, 8, 'INPUT', 1, 'DataX.local.path', '/data/taier', null, null, null, null, now(), now(), 0);
2449+
2450+
insert into console_component_config (cluster_id, component_id, component_type_code, type, required, `key`,
2451+
value, `values`, dependencyKey, dependencyValue, `desc`, gmt_create,
2452+
gmt_modified, is_deleted)
2453+
values (-2, -233, 8, 'INPUT', 1, 'DataX.task.temp', '/data/taier', null, null, null, null, now(), now(), 0);
2454+
2455+
DELETE
2456+
FROM `dict`
2457+
WHERE dict_code = '26'
2458+
and dict_name = 'DATAX';
2459+
2460+
INSERT INTO dict (dict_code, dict_name, dict_value, dict_desc, type, sort, data_type, depend_name, is_default,
2461+
gmt_create, gmt_modified, is_deleted)
2462+
VALUES ('26', 'DATAX',
2463+
'{"actions": ["SAVE_TASK", "RUN_TASK", "STOP_TASK", "SUBMIT_TASK", "OPERATOR_TASK"], "barItem": ["task", "dependency", "task_params", "env_params"], "formField": ["datasource"], "renderKind": "editor","dataTypeCodes":["27","7","50"]}',
2464+
null, 30, 0, 'STRING', '', 0, '2023-03-03 07:27:25', '2022-03-03 07:27:25', 0);
2465+
2466+
2467+
2468+
COMMIT;

taier-common/src/main/java/com/dtstack/taier/common/client/ClientCache.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ public IClient getClient(String pluginInfo) throws ClientAccessException {
8181
if (StringUtils.isBlank(typeName)) {
8282
throw new TaierDefineException("typeName is empty");
8383
}
84-
if ("datax".equals(typeName)) {
84+
if ("DataX".equals(typeName)) {
8585
typeName = "script-standalone";
8686
}
8787
String md5plugin = MD5Util.getMd5String(pluginInfo);

taier-common/src/main/java/com/dtstack/taier/common/client/ClientFactory.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ public static IClient createPluginClass(ClassLoader classLoader) throws Exceptio
6363
public static IClient buildPluginClient(String pluginInfo, String pluginPath) throws Exception {
6464
Map<String, Object> params = PublicUtil.jsonStrToObject(pluginInfo, Map.class);
6565
String clientTypeStr = MathUtil.getString(params.get(ConfigConstant.TYPE_NAME_KEY));
66-
if ("datax".equals(params.get(ConfigConstant.TYPE_NAME_KEY))){
66+
if ("DataX".equals(params.get(ConfigConstant.TYPE_NAME_KEY))){
6767
clientTypeStr= "script-standalone";
6868
}
6969
if (StringUtils.isBlank(clientTypeStr)) {

taier-common/src/main/java/com/dtstack/taier/common/enums/EComponentType.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@ public enum EComponentType {
3232
HDFS(2, "HDFS", "hadoopConf", EComponentScheduleType.STORAGE),
3333
YARN(3, "YARN", "yarnConf", EComponentScheduleType.RESOURCE),
3434
SFTP(6, "SFTP", "sftpConf", EComponentScheduleType.COMMON),
35-
DATAX(9, "DATAX", "dataXConf", EComponentScheduleType.COMPUTE),
3635
SCRIPT(8, "Script", "scriptConf", EComponentScheduleType.COMPUTE),
36+
DATAX(9, "DataX", "dataXConf", EComponentScheduleType.COMPUTE),
3737

3838
;
3939

@@ -53,13 +53,11 @@ public enum EComponentType {
5353
}
5454

5555
private static final Map<Integer, EComponentType> COMPONENT_TYPE_CODE_MAP = new ConcurrentHashMap<>(16);
56-
private static final Map<String, EComponentType> COMPONENT_TYPE_NAME_MAP = new ConcurrentHashMap<>(16);
5756
private static final Map<String, EComponentType> COMPONENT_TYPE_CONF_NAME_MAP = new ConcurrentHashMap<>(16);
5857

5958
static {
6059
for (EComponentType componentType : EComponentType.values()) {
6160
COMPONENT_TYPE_CODE_MAP.put(componentType.getTypeCode(), componentType);
62-
COMPONENT_TYPE_NAME_MAP.put(componentType.getName(), componentType);
6361
COMPONENT_TYPE_CONF_NAME_MAP.put(componentType.getConfName(), componentType);
6462
}
6563
}

taier-common/src/main/java/com/dtstack/taier/common/util/TaskParamsUtils.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,9 @@ public static EDeployMode parseDeployTypeByTaskParams(String taskParams, Integer
5454

5555
String scriptMode = properties.getProperty("runMode");
5656
if (!StringUtils.isEmpty(scriptMode)) {
57-
if (scriptMode.equalsIgnoreCase("yarn")) {
57+
if (scriptMode.equalsIgnoreCase(EDeployMode.RUN_ON_YARN.getMode())) {
5858
return EDeployMode.RUN_ON_YARN;
59-
} else if (scriptMode.equalsIgnoreCase("standalone")) {
59+
} else if (scriptMode.equalsIgnoreCase(EDeployMode.STANDALONE.getMode())) {
6060
return EDeployMode.STANDALONE;
6161
}
6262
}

taier-data-develop/src/main/java/com/dtstack/taier/develop/controller/develop/DevelopSelectSqlController.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
import com.dtstack.taier.develop.service.develop.TaskConfiguration;
3131
import com.dtstack.taier.develop.service.develop.impl.DevelopSelectSqlService;
3232
import com.dtstack.taier.develop.service.develop.impl.DevelopTaskService;
33+
import com.dtstack.taier.develop.service.develop.runner.ScriptTaskRunner;
3334
import com.dtstack.taier.develop.vo.develop.query.DevelopSelectSqlVO;
3435
import com.dtstack.taier.pluginapi.constrant.ConfigConstant;
3536
import com.dtstack.taier.scheduler.service.ScheduleJobService;
@@ -69,6 +70,9 @@ public class DevelopSelectSqlController {
6970
@Autowired
7071
private EnvironmentContext environmentContext;
7172

73+
@Autowired
74+
private ScriptTaskRunner scriptTaskRunner;
75+
7276
@PostMapping(value = "selectData")
7377
@ApiOperation("获取执行结果")
7478
public R<ExecuteResultVO> selectData(@RequestBody DevelopSelectSqlVO sqlVO) {
@@ -126,7 +130,7 @@ protected ExecuteResultVO process() {
126130
Preconditions.checkNotNull(selectSql, "不存在该临时查询");
127131
ITaskRunner taskRunner = taskConfiguration.get(selectSql.getTaskType());
128132
Task task = developTaskService.getOneWithError(sqlVO.getTaskId());
129-
return taskRunner.runLog(selectSql.getJobId(), task.getTaskType(), task.getTenantId(), sqlVO.getLimitNum());
133+
return scriptTaskRunner.runLog(selectSql.getJobId(), task.getTaskType(), task.getTenantId(), sqlVO.getLimitNum());
130134
} catch (Exception e) {
131135
throw new TaierDefineException(e.getMessage());
132136
}

taier-data-develop/src/main/java/com/dtstack/taier/develop/service/develop/runner/DataXTaskRunner.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,9 @@ public class DataXTaskRunner implements ITaskRunner {
6565
@Autowired
6666
protected ClusterService clusterService;
6767

68+
@Autowired
69+
private ScriptTaskRunner scriptTaskRunner;
70+
6871
@Override
6972
public List<EScheduleJobType> support() {
7073
return Lists.newArrayList(EScheduleJobType.DATAX);
@@ -93,7 +96,7 @@ public ExecuteResultVO selectStatus(Task task, DevelopSelectSql selectSql, Long
9396
public ExecuteResultVO runLog(String jobId, Integer taskType, Long tenantId, Integer limitNum) {
9497
ExecuteResultVO resultVO = new ExecuteResultVO();
9598
StringBuilder log = new StringBuilder();
96-
IDownload download = logDownLoad(tenantId, jobId, Objects.isNull(limitNum) ? environmentContext.getLogsLimitNum() : limitNum);
99+
IDownload download = scriptTaskRunner.logDownLoad(tenantId, jobId, Objects.isNull(limitNum) ? environmentContext.getLogsLimitNum() : limitNum);
97100
if (Objects.nonNull(download)) {
98101
LOGGER.error("-----日志文件导出失败-----");
99102
while (!download.reachedEnd()) {

taier-data-develop/src/main/java/com/dtstack/taier/develop/service/develop/runner/ScriptTaskRunner.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ public ExecuteResultVO runLog(String jobId, Integer taskType, Long tenantId, Int
132132
@Override
133133
public IDownload logDownLoad(Long tenantId, String jobId, Integer limitNum) {
134134
ScheduleJob scheduleJob = jobService.getScheduleJob(jobId);
135-
if (StringUtils.isBlank(scheduleJob.getApplicationId())) {
135+
if (StringUtils.isBlank(scheduleJob.getApplicationId())) {
136136
return null;
137137
}
138138
// 判断是否运行在本地

taier-scheduler/src/main/java/com/dtstack/taier/scheduler/server/pluginInfo/ScriptPluginInfoStrategy.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,13 +33,13 @@ public class ScriptPluginInfoStrategy extends ComponentPluginInfoStrategy {
3333
@Override
3434
public JSONObject convertPluginInfo(JSONObject clusterConfigJson, Long clusterId, Integer deployMode) {
3535
JSONObject confConfig = clusterConfigJson.getJSONObject(EComponentType.SCRIPT.getConfName());
36+
if (Objects.isNull(confConfig)) {
37+
throw new TaierDefineException("Component Script is not configured");
38+
}
3639
String typeName = confConfig.getString(TYPE_NAME);
3740
if (!StringUtils.isBlank(typeName)) {
3841
clusterConfigJson.put(TYPE_NAME_KEY, typeName);
3942
}
40-
if (Objects.isNull(confConfig)) {
41-
throw new TaierDefineException(String.format("scriptConf is not configured"));
42-
}
4343
clusterConfigJson.remove(EComponentType.SCRIPT.getConfName());
4444
// put flat all script config
4545
clusterConfigJson.putAll(confConfig);

taier-scheduler/src/main/java/com/dtstack/taier/scheduler/service/ClusterService.java

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,6 @@
4242
import com.dtstack.taier.scheduler.server.pluginInfo.KerberosPluginInfo;
4343
import com.dtstack.taier.scheduler.server.pluginInfo.ScriptPluginInfoStrategy;
4444
import com.dtstack.taier.scheduler.server.pluginInfo.SparkPluginInfoStrategy;
45-
import com.dtstack.taier.scheduler.server.pluginInfo.DefaultPluginInfoStrategy;
46-
import com.dtstack.taier.scheduler.server.pluginInfo.ScriptPluginInfoStrategy;
47-
import com.dtstack.taier.scheduler.server.pluginInfo.KerberosPluginInfo;
48-
import com.dtstack.taier.scheduler.server.pluginInfo.HadoopMRPluginInfoStrategy;
4945
import org.apache.commons.collections.MapUtils;
5046
import org.apache.commons.lang3.StringUtils;
5147
import org.slf4j.Logger;
@@ -133,6 +129,9 @@ public JSONObject buildClusterConfig(Long clusterId, String componentVersion, EC
133129
if (EDeployMode.STANDALONE.getType().equals(deployMode)) {
134130
deployType = EDeployType.STANDALONE;
135131
}
132+
if (EDeployMode.RUN_ON_YARN.getType().equals(deployMode)) {
133+
deployType = EDeployType.YARN;
134+
}
136135
for (Component component : components) {
137136
EComponentType componentType = EComponentType.getByCode(component.getComponentTypeCode());
138137
if (!EComponentScheduleType.COMPUTE.equals(EComponentType.getByCode(component.getComponentTypeCode()).getComponentScheduleType())) {

0 commit comments

Comments
 (0)