@@ -187,26 +187,24 @@ VALUES ('component_datasource_mapping', '3', '80', null, 18, 1, 'STRING', 'TDH 6
187187
188188ALTER 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
200192UPDATE 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-- 处理组件配置是否有多版本之类的
205199update dict
206200set dict_value = ' {"owner": "COMPUTE", "dependsOn": ["RESOURCE", "STORAGE"], "allowKerberos": "true", "allowCoexistence": true, "uploadConfigType": "0", "versionDictionary": "SCRIPT_VERSION"}'
207201where type = 12
208202 and dict_name = ' SCRIPT' ;
209203
204+ DELETE
205+ FROM ` dict`
206+ WHERE type = 34
207+ and dict_code = ' script_version' ;
210208-- 处理组件配置树
211209INSERT 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)
216214VALUES (' 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-- 处理组件默认版本
219221INSERT 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)
221223VALUES (' 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-- 处理组件配置模版获取
225231INSERT 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)
227233VALUES (' 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-- 组件模版参数
231241insert 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
251261UPDATE task_param_template t
252262SET t .params = ' ## 任务运行方式:
253263## yarn: 将任务运行在Hadoop集群上
254- ## standalone: 将任务运行在本地,单独运行
264+ ## standalone: 将任务运行在本地,单独运行
255265runMode=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-- 处理组件默认版本
279300INSERT 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
284305insert 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
289310insert 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 ;
0 commit comments