diff --git a/pom.xml b/pom.xml
index 9c38677d62..b36cc88048 100644
--- a/pom.xml
+++ b/pom.xml
@@ -206,6 +206,11 @@
oss-sonatype
https://oss.sonatype.org/content/repositories/releases/
+
+
+ huawei
+ https://repo.huaweicloud.com/repository/maven/huaweicloudsdk/
+
@@ -283,7 +288,7 @@
true
javadocs
- engine-java-docs
+ taier-java-docs
diff --git a/sql/1.5/1.5_increment.sql b/sql/1.5/1.5_increment.sql
new file mode 100644
index 0000000000..1069aa8006
--- /dev/null
+++ b/sql/1.5/1.5_increment.sql
@@ -0,0 +1,95 @@
+DELETE FROM console_component_config WHERE component_id = -109;
+INSERT INTO console_component_config (cluster_id, component_id, component_type_code, type, required, `key`, value, `values`, dependencyKey, dependencyValue, `desc`, gmt_create, gmt_modified, is_deleted) VALUES (-2, -109, 1, 'CHECKBOX', 1, 'deploymode', '["perjob"]', null, '', '', null, now(), now(), 0);
+INSERT INTO console_component_config (cluster_id, component_id, component_type_code, type, required, `key`, value, `values`, dependencyKey, dependencyValue, `desc`, gmt_create, gmt_modified, is_deleted) VALUES (-2, -109, 1, 'GROUP', 1, 'perjob', 'perjob', null, 'deploymode', 'perjob', null, now(), now(), 0);
+INSERT INTO console_component_config (cluster_id, component_id, component_type_code, type, required, `key`, value, `values`, dependencyKey, dependencyValue, `desc`, gmt_create, gmt_modified, is_deleted) VALUES (-2, -109, 1, 'INPUT', 0, 'addColumnSupport', 'true', null, 'deploymode$perjob', null, null, now(), now(), 0);
+INSERT INTO console_component_config (cluster_id, component_id, component_type_code, type, required, `key`, value, `values`, dependencyKey, dependencyValue, `desc`, gmt_create, gmt_modified, is_deleted) VALUES (-2, -109, 1, 'INPUT', 1, 'spark.cores.max', '1', null, 'deploymode$perjob', null, null, now(), now(), 0);
+INSERT INTO console_component_config (cluster_id, component_id, component_type_code, type, required, `key`, value, `values`, dependencyKey, dependencyValue, `desc`, gmt_create, gmt_modified, is_deleted) VALUES (-2, -109, 1, 'INPUT', 0, 'spark.driver.extraJavaOptions', '-Dfile.encoding=utf-8', null, 'deploymode$perjob', null, null, now(), now(), 0);
+INSERT INTO console_component_config (cluster_id, component_id, component_type_code, type, required, `key`, value, `values`, dependencyKey, dependencyValue, `desc`, gmt_create, gmt_modified, is_deleted) VALUES (-2, -109, 1, 'INPUT', 0, 'spark.eventLog.compress', 'true', null, 'deploymode$perjob', null, null, now(), now(), 0);
+INSERT INTO console_component_config (cluster_id, component_id, component_type_code, type, required, `key`, value, `values`, dependencyKey, dependencyValue, `desc`, gmt_create, gmt_modified, is_deleted) VALUES (-2, -109, 1, 'INPUT', 0, 'spark.eventLog.dir', 'hdfs:///tmp/spark-yarn-logs', null, 'deploymode$perjob', null, null, now(), now(), 0);
+INSERT INTO console_component_config (cluster_id, component_id, component_type_code, type, required, `key`, value, `values`, dependencyKey, dependencyValue, `desc`, gmt_create, gmt_modified, is_deleted) VALUES (-2, -109, 1, 'INPUT', 0, 'spark.eventLog.enabled', 'true', null, 'deploymode$perjob', null, null, now(), now(), 0);
+INSERT INTO console_component_config (cluster_id, component_id, component_type_code, type, required, `key`, value, `values`, dependencyKey, dependencyValue, `desc`, gmt_create, gmt_modified, is_deleted) VALUES (-2, -109, 1, 'INPUT', 1, 'spark.executor.cores', '1', null, 'deploymode$perjob', null, null, now(), now(), 0);
+INSERT INTO console_component_config (cluster_id, component_id, component_type_code, type, required, `key`, value, `values`, dependencyKey, dependencyValue, `desc`, gmt_create, gmt_modified, is_deleted) VALUES (-2, -109, 1, 'INPUT', 0, 'spark.executor.extraJavaOptions', '-Dfile.encoding=utf-8', null, 'deploymode$perjob', null, null, now(), now(), 0);
+INSERT INTO console_component_config (cluster_id, component_id, component_type_code, type, required, `key`, value, `values`, dependencyKey, dependencyValue, `desc`, gmt_create, gmt_modified, is_deleted) VALUES (-2, -109, 1, 'INPUT', 1, 'spark.executor.heartbeatInterval', '10s', null, 'deploymode$perjob', null, null, now(), now(), 0);
+INSERT INTO console_component_config (cluster_id, component_id, component_type_code, type, required, `key`, value, `values`, dependencyKey, dependencyValue, `desc`, gmt_create, gmt_modified, is_deleted) VALUES (-2, -109, 1, 'INPUT', 1, 'spark.executor.instances', '1', null, 'deploymode$perjob', null, null, now(), now(), 0);
+INSERT INTO console_component_config (cluster_id, component_id, component_type_code, type, required, `key`, value, `values`, dependencyKey, dependencyValue, `desc`, gmt_create, gmt_modified, is_deleted) VALUES (-2, -109, 1, 'INPUT', 1, 'spark.executor.memory', '512m', null, 'deploymode$perjob', null, null, now(), now(), 0);
+
+INSERT INTO console_component_config (cluster_id, component_id, component_type_code, type, required, `key`, value, `values`, dependencyKey, dependencyValue, `desc`, gmt_create, gmt_modified, is_deleted) VALUES (-2, -109, 1, 'INPUT', 1, 'spark.sql.adaptive.advisoryPartitionSizeInBytes', '64MB', null, 'deploymode$perjob', null, null, now(), now(), 0);
+INSERT INTO console_component_config (cluster_id, component_id, component_type_code, type, required, `key`, value, `values`, dependencyKey, dependencyValue, `desc`, gmt_create, gmt_modified, is_deleted) VALUES (-2, -109, 1, 'INPUT', 1, 'spark.sql.adaptive.coalescePartitions.minPartitionSize', '1MB', null, 'deploymode$perjob', null, null, now(), now(), 0);
+INSERT INTO console_component_config (cluster_id, component_id, component_type_code, type, required, `key`, value, `values`, dependencyKey, dependencyValue, `desc`, gmt_create, gmt_modified, is_deleted) VALUES (-2, -109, 1, 'INPUT', 1, 'spark.sql.adaptive.coalescePartitions.initialPartitionNum', '200', null, 'deploymode$perjob', null, null, now(), now(), 0);
+INSERT INTO console_component_config (cluster_id, component_id, component_type_code, type, required, `key`, value, `values`, dependencyKey, dependencyValue, `desc`, gmt_create, gmt_modified, is_deleted) VALUES (-2, -109, 1, 'INPUT', 1, 'spark.sql.adaptive.skewJoin.skewedPartitionThresholdInBytes', '256MB', null, 'deploymode$perjob', null, null, now(), now(), 0);
+INSERT INTO console_component_config (cluster_id, component_id, component_type_code, type, required, `key`, value, `values`, dependencyKey, dependencyValue, `desc`, gmt_create, gmt_modified, is_deleted) VALUES (-2, -109, 1, 'INPUT', 1, 'spark.sql.adaptive.skewJoin.skewedPartitionFactor', '5', null, 'deploymode$perjob', null, null, now(), now(), 0);
+
+INSERT INTO console_component_config (cluster_id, component_id, component_type_code, type, required, `key`, value, `values`, dependencyKey, dependencyValue, `desc`, gmt_create, gmt_modified, is_deleted) VALUES (-2, -109, 1, 'INPUT', 1, 'spark.network.timeout', '600s', null, 'deploymode$perjob', null, null, now(), now(), 0);
+INSERT INTO console_component_config (cluster_id, component_id, component_type_code, type, required, `key`, value, `values`, dependencyKey, dependencyValue, `desc`, gmt_create, gmt_modified, is_deleted) VALUES (-2, -109, 1, 'INPUT', 1, 'spark.rpc.askTimeout', '600s', null, 'deploymode$perjob', null, null, now(), now(), 0);
+INSERT INTO console_component_config (cluster_id, component_id, component_type_code, type, required, `key`, value, `values`, dependencyKey, dependencyValue, `desc`, gmt_create, gmt_modified, is_deleted) VALUES (-2, -109, 1, 'INPUT', 1, 'spark.speculation', 'true', null, 'deploymode$perjob', null, null, now(), now(), 0);
+INSERT INTO console_component_config (cluster_id, component_id, component_type_code, type, required, `key`, value, `values`, dependencyKey, dependencyValue, `desc`, gmt_create, gmt_modified, is_deleted) VALUES (-2, -109, 1, 'INPUT', 1, 'spark.submit.deployMode', 'cluster', null, 'deploymode$perjob', null, null, now(), now(), 0);
+INSERT INTO console_component_config (cluster_id, component_id, component_type_code, type, required, `key`, value, `values`, dependencyKey, dependencyValue, `desc`, gmt_create, gmt_modified, is_deleted) VALUES (-2, -109, 1, 'INPUT', 0, 'spark.yarn.appMasterEnv.PYSPARK_DRIVER_PYTHON', '/data/miniconda2/bin/python3', null, 'deploymode$perjob', null, null, now(), now(), 0);
+INSERT INTO console_component_config (cluster_id, component_id, component_type_code, type, required, `key`, value, `values`, dependencyKey, dependencyValue, `desc`, gmt_create, gmt_modified, is_deleted) VALUES (-2, -109, 1, 'INPUT', 0, 'spark.yarn.appMasterEnv.PYSPARK_PYTHON', '/data/miniconda2/bin/python3', null, 'deploymode$perjob', null, null, now(), now(), 0);
+INSERT INTO console_component_config (cluster_id, component_id, component_type_code, type, required, `key`, value, `values`, dependencyKey, dependencyValue, `desc`, gmt_create, gmt_modified, is_deleted) VALUES (-2, -109, 1, 'INPUT', 1, 'spark.yarn.maxAppAttempts', '1', null, 'deploymode$perjob', null, null, now(), now(), 0);
+INSERT INTO console_component_config (cluster_id, component_id, component_type_code, type, required, `key`, value, `values`, dependencyKey, dependencyValue, `desc`, gmt_create, gmt_modified, is_deleted) VALUES (-2, -109, 1, 'INPUT', 1, 'sparkPythonExtLibPath', 'hdfs:///dtInsight/pythons/pyspark.zip,hdfs:///dtInsight/pythons/py4j-0.10.7-src.zip', null, 'deploymode$perjob', null, null, now(), now(), 0);
+INSERT INTO console_component_config (cluster_id, component_id, component_type_code, type, required, `key`, value, `values`, dependencyKey, dependencyValue, `desc`, gmt_create, gmt_modified, is_deleted) VALUES (-2, -109, 1, 'INPUT', 1, 'sparkSqlProxyPath', 'hdfs:///dtInsight/spark/spark-sql-proxy.jar', null, 'deploymode$perjob', null, null, now(), now(), 0);
+INSERT INTO console_component_config (cluster_id, component_id, component_type_code, type, required, `key`, value, `values`, dependencyKey, dependencyValue, `desc`, gmt_create, gmt_modified, is_deleted) VALUES (-2, -109, 1, 'INPUT', 1, 'sparkYarnArchive', 'hdfs:///dtInsight/sparkjars/jars', null, 'deploymode$perjob', null, null, now(), now(), 0);
+INSERT INTO console_component_config (cluster_id, component_id, component_type_code, type, required, `key`, value, `values`, dependencyKey, dependencyValue, `desc`, gmt_create, gmt_modified, is_deleted) VALUES (-2, -109, 1, 'INPUT', 0, 'yarnAccepterTaskNumber', '3', null, 'deploymode$perjob', null, null, now(), now(), 0);
+
+DELETE FROM dict WHERE dict_code = 'typename_mapping' AND dict_name IN ('yarn2-hdfs2-spark320','yarn3-hdfs3-spark320');
+
+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 ('typename_mapping', 'yarn2-hdfs2-spark320', '-109', null, 6, 0, 'LONG', '', 0, now(),now(), 0);
+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 ('typename_mapping', 'yarn3-hdfs3-spark320', '-109', null, 6, 0, 'LONG', '', 0, now(),now(), 0);
+
+DELETE FROM dict WHERE dict_code = 'component_model_config' AND depend_name = 'YARN';
+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_config', 'Apache Hadoop 2.x', '{"HDFS": {"HDFS": "yarn2-hdfs2-hadoop2", "FLINK": [{"112": "yarn2-hdfs2-flink112"}], "SPARK": [{"320": "yarn2-hdfs2-spark320"}, {"210": "yarn2-hdfs2-spark210"], "SCRIPT": "yarn2-hdfs2-script"}, "YARN": "yarn2"}', null, 14, 1, 'STRING', 'YARN', 0, now(),now(), 0);
+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_config', 'Apache Hadoop 3.x', '{"HDFS": {"HDFS": "yarn3-hdfs3-hadoop3", "FLINK": [{"112": "yarn3-hdfs3-flink112"}], "SPARK": [{"320": "yarn3-hdfs3-spark320"}, {"210": "yarn3-hdfs3-spark210"}], "SCRIPT": "yarn3-hdfs3-script"}, "YARN": "yarn3"}', null, 14, 1, 'STRING', 'YARN', 0, now(),now(), 0);
+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_config', 'CDH 5.x', '{"HDFS": {"HDFS": "yarn2-hdfs2-hadoop2", "FLINK": [{"112": "yarn2-hdfs2-flink112"}], "SPARK": [{"320": "yarn2-hdfs2-spark320"}, {"210": "yarn2-hdfs2-spark210"}], "SCRIPT": "yarn2-hdfs2-script"}, "YARN": "yarn2"}', null, 14, 1, 'STRING', 'YARN', 0, now(),now(), 0);
+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_config', 'CDH 6.0.x', '{"HDFS": {"HDFS": "yarn3-hdfs3-hadoop3", "FLINK": [{"112": "yarn3-hdfs3-flink112"}], "SPARK": [{"320": "yarn3-hdfs3-spark320"}, {"210": "yarn3-hdfs3-spark210"}], "SCRIPT": "yarn3-hdfs3-script"}, "YARN": "yarn3"}', null, 14, 1, 'STRING', 'YARN', 0, now(),now(), 0);
+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_config', 'CDH 6.1.x', '{"HDFS": {"HDFS": "yarn3-hdfs3-hadoop3", "FLINK": [{"112": "yarn3-hdfs3-flink112"}], "SPARK": [{"320": "yarn3-hdfs3-spark320"}, {"210": "yarn3-hdfs3-spark210"}], "SCRIPT": "yarn3-hdfs3-script"}, "YARN": "yarn3"}', null, 14, 1, 'STRING', 'YARN', 0, now(),now(), 0);
+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_config', 'CDH 6.2.x', '{"HDFS": {"HDFS": "yarn3-hdfs3-hadoop3", "FLINK": [{"112": "yarn3-hdfs3-flink112"}], "SPARK": [{"320": "yarn3-hdfs3-spark320"}, {"210": "yarn3-hdfs3-spark210"], "SCRIPT": "yarn3-hdfs3-script"}, "YARN": "yarn3"}', null, 14, 1, 'STRING', 'YARN', 0, now(),now(), 0);
+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_config', 'CDP 7.x', '{"HDFS": {"HDFS": "yarn3-hdfs3-hadoop3", "FLINK": [{"112": "yarn3-hdfs3-flink112"}], "SPARK": [{"320": "yarn3-hdfs3-spark320"}, {"210": "yarn3-hdfs3-spark210"}], "SCRIPT": "yarn3-hdfs3-script"}, "YARN": "yarn3"}', null, 14, 1, 'STRING', 'YARN', 0, now(),now(), 0);
+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_config', 'HDP 2.6.x', '{"HDFS": {"HDFS": "yarn2-hdfs2-hadoop2", "FLINK": [{"112": "yarn2-hdfs2-flink112"}], "SPARK": [{"320": "yarn2-hdfs2-spark320"}, {"210": "yarn2-hdfs2-spark210"}], "SCRIPT": "yarn2-hdfs2-script"}, "YARN": "yarn2"}', null, 14, 1, 'STRING', 'YARN', 0, now(),now(), 0);
+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_config', 'HDP 3.0.x', '{"HDFS": {"HDFS": "yarn3-hdfs3-hadoop3", "FLINK": [{"112": "yarn3-hdfs3-flink112"}], "SPARK": [{"320": "yarn3-hdfs3-spark320"}, {"210": "yarn3-hdfs3-spark210"}], "SCRIPT": "yarn3-hdfs3-script"}, "YARN": "yarn3"}', null, 14, 1, 'STRING', 'YARN', 0, now(),now(), 0);
+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_config', 'HDP 3.x', '{"HDFS": {"HDFS": "yarn3-hdfs3-hadoop3", "FLINK": [{"112": "yarn3-hdfs3-flink112"}], "SPARK": [{"320": "yarn3-hdfs3-spark320"}, {"210": "yarn3-hdfs3-spark210"}], "SCRIPT": "yarn3-hdfs3-script"}, "YARN": "yarn3"}', null, 14, 1, 'STRING', 'YARN', 0, now(),now(), 0);
+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_config', 'TDH 5.2.x', '{"HDFS": {"HDFS": "yarn2-hdfs2-hadoop2", "FLINK": [{"112": "yarn2-hdfs2-flink112"}], "SPARK": [{"320": "yarn2-hdfs2-spark320"}, {"210": "yarn2-hdfs2-spark210"}], "SCRIPT": "yarn2-hdfs2-script"}, "YARN": "yarn2"}', null, 14, 1, 'STRING', 'YARN', 0, now(),now(), 0);
+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_config', 'TDH 6.x', '{"HDFS": {"HDFS": "yarn2-hdfs2-hadoop2", "FLINK": [{"112": "yarn2-hdfs2-flink112"}], "SPARK": [{"320": "yarn2-hdfs2-spark320"}, {"210": "yarn2-hdfs2-spark210"}], "SCRIPT": "yarn2-hdfs2-script"}, "YARN": "yarn2"}', null, 14, 1, 'STRING', 'YARN', 0, now(),now(), 0);
+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_config', 'TDH 7.x', '{"HDFS": {"HDFS": "yarn2-hdfs2-hadoop2", "FLINK": [{"112": "yarn2-hdfs2-flink112"}], "SPARK": [{"320": "yarn2-hdfs2-spark320"}, {"210": "yarn2-hdfs2-spark210"}], "SCRIPT": "yarn2-hdfs2-script"}, "YARN": "yarn2"}', null, 14, 1, 'STRING', 'YARN', 0, now(),now(), 0);
+
+
+
+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 ('spark_version', '3.2', '320', null, 2, 1, 'INTEGER', '', 1, now(),now(), 0);
+
+UPDATE dict set dict_value = '{"actions": ["SAVE_TASK", "RUN_TASK", "STOP_TASK", "SUBMIT_TASK", "OPERATOR_TASK"], "barItem": ["task", "dependency", "task_params", "env_params"], "formField": ["datasource","queue","componentVersion"], "renderKind": "editor","dataTypeCodes":["45"]}'
+WHERE dict_code = 1 AND dict_name = 'SparkSQL';
+
+DELETE FROM task_param_template WHERE task_name = 'SPARK_SQL' AND task_version = '3.2';
+
+INSERT INTO task_param_template (task_type, task_name, task_version, params, gmt_create, gmt_modified, is_deleted) VALUES (0, 'SPARK_SQL', '3.2', '## Driver程序使用的CPU核数,默认为1
+# spark.driver.cores=1
+
+## Driver程序使用内存大小,默认1g
+# spark.driver.memory=1g
+
+## 对Spark每个action结果集大小的限制,最少是1M,若设为0则不限制大小。
+## 若Job结果超过限制则会异常退出,若结果集限制过大也可能造成OOM问题,默认1g
+# spark.driver.maxResultSize=1g
+
+## 启动的executor的数量,默认为1
+# spark.executor.instances=1
+
+## 每个executor使用的CPU核数,默认为1
+# spark.executor.cores=1
+
+## 每个executor内存大小,默认1g
+# spark.executor.memory=1g
+
+## spark 日志级别可选ALL, DEBUG, ERROR, FATAL, INFO, OFF, TRACE, WARN
+# logLevel = INFO
+
+## spark中所有网络交互的最大超时时间
+# spark.network.timeout=120s
+
+## executor的OffHeap内存,和spark.executor.memory配置使用
+# spark.yarn.executor.memoryOverhead=
+
+## 设置spark sql shuffle分区数,默认200
+# spark.sql.shuffle.partitions=200
+
+## 开启spark推测行为,默认false
+# spark.speculation=false', now(), now(), 0);
\ No newline at end of file
diff --git a/sql/init.sql b/sql/init.sql
index bff138a20a..f66ac9f675 100644
--- a/sql/init.sql
+++ b/sql/init.sql
@@ -1541,6 +1541,8 @@ INSERT INTO `dict` VALUES (5, 'spark_thrift_version', '2.x', '2.x', NULL, 3, 2,
INSERT INTO `dict` VALUES (7, 'hadoop_config', 'HDP 3.1.x', '-200', '', 5, 0, 'LONG', 'SPARK', 0, '2021-02-05 11:53:21', '2021-02-05 11:53:21', 0);
INSERT INTO `dict` VALUES (9, 'typename_mapping', 'yarn3-hdfs3-spark210', '-108', NULL, 6, 0, 'LONG', '', 0, '2021-03-04 17:50:23', '2021-03-04 17:50:23', 0);
INSERT INTO `dict` VALUES (11, 'typename_mapping', 'yarn2-hdfs2-spark210', '-108', NULL, 6, 0, 'LONG', '', 0, '2021-03-04 17:50:24', '2021-03-04 17:50:24', 0);
+INSERT INTO `dict` VALUES (11, 'typename_mapping', 'yarn2-hdfs2-spark320', '-109', NULL, 6, 0, 'LONG', '', 0, '2021-03-04 17:50:24', '2021-03-04 17:50:24', 0);
+INSERT INTO `dict` VALUES (11, 'typename_mapping', 'yarn3-hdfs3-spark320', '-109', NULL, 6, 0, 'LONG', '', 0, '2021-03-04 17:50:24', '2021-03-04 17:50:24', 0);
INSERT INTO `dict` VALUES (13, 'typename_mapping', 'dummy', '-101', NULL, 6, 0, 'LONG', '', 0, '2021-03-04 17:50:24', '2021-03-04 17:50:24', 0);
INSERT INTO `dict` VALUES (15, 'typename_mapping', 'hive', '-117', NULL, 6, 0, 'LONG', '', 0, '2021-03-04 17:50:24', '2021-03-04 17:50:24', 0);
INSERT INTO `dict` VALUES (17, 'typename_mapping', 'hive2', '-117', NULL, 6, 0, 'LONG', '', 0, '2021-03-04 17:50:24', '2021-03-04 17:50:24', 0);
@@ -1570,19 +1572,19 @@ INSERT INTO `dict` VALUES (85, 'ResourceManager', 'ResourceManager', '3', '资
INSERT INTO `dict` VALUES (87, 'TaskManager', 'TaskManager', '1', '任务管理', 32, 1, 'STRING', '', 1, '2022-02-11 10:42:19', '2022-02-11 10:42:19', 0);
INSERT INTO `dict` VALUES (89, 'CustomFunction', 'CustomFunction', '6', '自定义函数', 33, 4, 'STRING', '', 1, '2022-02-11 10:42:57', '2022-02-11 10:42:57', 0);
INSERT INTO `dict` VALUES (91, 'SystemFunction', 'SystemFunction', '6', '系统函数', 33, 2, 'STRING', '', 1, '2022-02-11 10:42:57', '2022-02-11 10:42:57', 0);
-INSERT INTO `dict` VALUES (95, 'component_model_config', 'Apache Hadoop 2.x', '{\"HDFS\": {\"HDFS\": \"yarn2-hdfs2-hadoop2\", \"FLINK\": [{\"112\": \"yarn2-hdfs2-flink112\"}], \"SPARK\": [{\"210\": \"yarn2-hdfs2-spark210\", \"240\": \"yarn2-hdfs2-spark240\"}], \"SCRIPT\": \"yarn2-hdfs2-script\"}, \"YARN\": \"yarn2\"}', NULL, 14, 1, 'STRING', 'YARN', 0, '2021-12-28 11:01:55', '2021-12-28 11:01:55', 0);
-INSERT INTO `dict` VALUES (97, 'component_model_config', 'Apache Hadoop 3.x', '{\"HDFS\": {\"HDFS\": \"yarn3-hdfs3-hadoop3\", \"FLINK\": [{\"112\": \"yarn3-hdfs3-flink112\"}], \"SPARK\": [{\"210\": \"yarn3-hdfs3-spark210\", \"240\": \"yarn3-hdfs3-spark240\"}], \"SCRIPT\": \"yarn3-hdfs3-script\"}, \"YARN\": \"yarn3\"}', NULL, 14, 1, 'STRING', 'YARN', 0, '2021-12-28 11:03:45', '2021-12-28 11:03:45', 0);
-INSERT INTO `dict` VALUES (99, 'component_model_config', 'HDP 3.0.x', '{\"HDFS\": {\"HDFS\": \"yarn3-hdfs3-hadoop3\", \"FLINK\": [{\"112\": \"yarn3-hdfs3-flink112\"}], \"SPARK\": [{\"210\": \"yarn3-hdfs3-spark210\", \"240\": \"yarn3-hdfs3-spark240\"}], \"SCRIPT\": \"yarn3-hdfs3-script\"}, \"YARN\": \"yarn3\"}', NULL, 14, 1, 'STRING', 'YARN', 0, '2021-12-28 11:04:23', '2021-12-28 11:04:23', 0);
-INSERT INTO `dict` VALUES (101, 'component_model_config', 'CDH 6.0.x', '{\"HDFS\": {\"HDFS\": \"yarn3-hdfs3-hadoop3\", \"FLINK\": [{\"1.8\": \"yarn3-hdfs3-flink180\"}, {\"1.10\": \"yarn3-hdfs3-flink110\"}, {\"112\": \"yarn3-hdfs3-flink112\"}], \"SPARK\": [{\"210\": \"yarn3-hdfs3-spark210\", \"240\": \"yarn3-hdfs3-spark240\"}], \"SCRIPT\": \"yarn3-hdfs3-script\"}, \"YARN\": \"yarn3\"}', NULL, 14, 1, 'STRING', 'YARN', 0, '2021-12-28 11:04:40', '2021-12-28 11:04:40', 0);
-INSERT INTO `dict` VALUES (103, 'component_model_config', 'CDH 6.1.x', '{\"HDFS\": {\"HDFS\": \"yarn3-hdfs3-hadoop3\", \"FLINK\": [{\"112\": \"yarn3-hdfs3-flink112\"}], \"SPARK\": [{\"210\": \"yarn3-hdfs3-spark210\", \"240\": \"yarn3-hdfs3-spark240\"}], \"SCRIPT\": \"yarn3-hdfs3-script\"}, \"YARN\": \"yarn3\"}', NULL, 14, 1, 'STRING', 'YARN', 0, '2021-12-28 11:04:55', '2021-12-28 11:04:55', 0);
-INSERT INTO `dict` VALUES (105, 'component_model_config', 'CDH 6.2.x', '{\"HDFS\": {\"HDFS\": \"yarn3-hdfs3-hadoop3\", \"TONY\": \"yarn3-hdfs3-tony\", \"FLINK\": [{\"1.8\": \"yarn3-hdfs3-flink180\"}, {\"1.10\": \"yarn3-hdfs3-flink110\"}, {\"112\": \"yarn3-hdfs3-flink112\"}], \"SPARK\": [{\"210\": \"yarn3-hdfs3-spark210\", \"240(CDH 6.2)\": \"yarn3-hdfs3-spark240cdh620\"}], \"LEARNING\": \"yarn3-hdfs3-learning\", \"SCRIPT\": \"yarn3-hdfs3-script\"}, \"YARN\": \"yarn3\"}', NULL, 14, 1, 'STRING', 'YARN', 0, '2021-12-28 11:05:06', '2021-12-28 11:05:06', 0);
-INSERT INTO `dict` VALUES (107, 'component_model_config', 'HDP 2.6.x', '{\"HDFS\": {\"HDFS\": \"yarn2-hdfs2-hadoop2\", \"FLINK\": [{\"112\": \"yarn2-hdfs2-flink112\"}], \"SPARK\": [{\"210\": \"yarn2-hdfs2-spark210\", \"240\": \"yarn2-hdfs2-spark240\"}], \"SCRIPT\": \"yarn2-hdfs2-script\"}, \"YARN\": \"yarn2\"}', NULL, 14, 1, 'STRING', 'YARN', 0, '2021-12-28 11:06:38', '2021-12-28 11:06:38', 0);
-INSERT INTO `dict` VALUES (109, 'component_model_config', 'CDH 5.x', '{\"HDFS\": {\"HDFS\": \"yarn2-hdfs2-hadoop2\", \"FLINK\": [{\"112\": \"yarn2-hdfs2-flink112\"}], \"SPARK\": [{\"210\": \"yarn2-hdfs2-spark210\", \"240\": \"yarn2-hdfs2-spark240\"}], \"SCRIPT\": \"yarn2-hdfs2-script\"}, \"YARN\": \"yarn2\"}', NULL, 14, 1, 'STRING', 'YARN', 0, '2021-12-28 11:07:19', '2021-12-28 11:07:19', 0);
-INSERT INTO `dict` VALUES (111, 'component_model_config', 'HDP 3.x', '{\"HDFS\": {\"HDFS\": \"yarn3-hdfs3-hadoop3\", \"FLINK\": [{\"112\": \"yarn3-hdfs3-flink112\"}], \"SPARK\": [{\"210\": \"yarn3-hdfs3-spark210\", \"240\": \"yarn3-hdfs3-spark240\"}], \"SCRIPT\": \"yarn3-hdfs3-script\"}, \"YARN\": \"yarn3\"}', NULL, 14, 1, 'STRING', 'YARN', 0, '2021-12-28 11:43:05', '2021-12-28 11:43:05', 0);
-INSERT INTO `dict` VALUES (113, 'component_model_config', 'TDH 5.2.x', '{\"HDFS\": {\"HDFS\": \"yarn2-hdfs2-hadoop2\", \"FLINK\": [{\"112\": \"yarn2-hdfs2-flink112\"}], \"SPARK\": [{\"210\": \"yarn2-hdfs2-spark210\", \"240\": \"yarn2-hdfs2-spark240\"}], \"SCRIPT\": \"yarn2-hdfs2-script\"}, \"YARN\": \"yarn2\"}', NULL, 14, 1, 'STRING', 'YARN', 0, '2021-12-28 11:44:33', '2021-12-28 11:44:33', 0);
-INSERT INTO `dict` VALUES (115, 'component_model_config', 'TDH 6.x', '{\"HDFS\": {\"HDFS\": \"yarn2-hdfs2-hadoop2\", \"FLINK\": [{\"112\": \"yarn2-hdfs2-flink112\"}], \"SPARK\": [{\"210\": \"yarn2-hdfs2-spark210\", \"240\": \"yarn2-hdfs2-spark240\"}], \"SCRIPT\": \"yarn2-hdfs2-script\"}, \"YARN\": \"yarn2\"}', NULL, 14, 1, 'STRING', 'YARN', 0, '2021-12-28 11:44:43', '2021-12-28 11:44:43', 0);
-INSERT INTO `dict` VALUES (117, 'component_model_config', 'TDH 7.x', '{\"HDFS\": {\"HDFS\": \"yarn2-hdfs2-hadoop2\", \"FLINK\": [{\"112\": \"yarn2-hdfs2-flink112\"}], \"SPARK\": [{\"210\": \"yarn2-hdfs2-spark210\", \"240\": \"yarn2-hdfs2-spark240\"}], \"SCRIPT\": \"yarn2-hdfs2-script\"}, \"YARN\": \"yarn2\"}', NULL, 14, 1, 'STRING', 'YARN', 0, '2021-12-28 11:45:02', '2021-12-28 11:45:02', 0);
-INSERT INTO `dict` VALUES (119, 'component_model_config', 'CDP 7.x', '{\"HDFS\": {\"HDFS\": \"yarn3-hdfs3-hadoop3\", \"FLINK\": [{\"112\": \"yarn3-hdfs3-flink112\"}], \"SPARK\": [{\"210\": \"yarn3-hdfs3-spark210\", \"240\": \"yarn3-hdfs3-spark240\"}], \"SCRIPT\": \"yarn3-hdfs3-script\"}, \"YARN\": \"yarn3\"}', NULL, 14, 1, 'STRING', 'YARN', 0, '2021-12-28 11:45:02', '2021-12-28 11:45:02', 0);
+INSERT INTO `dict` VALUES (95,'component_model_config', 'Apache Hadoop 2.x', '{"HDFS": {"HDFS": "yarn2-hdfs2-hadoop2", "FLINK": [{"112": "yarn2-hdfs2-flink112"}], "SPARK": [{"320": "yarn2-hdfs2-spark320"}, {"210": "yarn2-hdfs2-spark210"], "SCRIPT": "yarn2-hdfs2-script"}, "YARN": "yarn2"}', null, 14, 1, 'STRING', 'YARN', 0, '2021-12-28 11:01:55', '2021-12-28 11:01:55', 0);
+INSERT INTO `dict` VALUES (97,'component_model_config', 'Apache Hadoop 3.x', '{"HDFS": {"HDFS": "yarn3-hdfs3-hadoop3", "FLINK": [{"112": "yarn3-hdfs3-flink112"}], "SPARK": [{"320": "yarn3-hdfs3-spark320"}, {"210": "yarn3-hdfs3-spark210"}], "SCRIPT": "yarn3-hdfs3-script"}, "YARN": "yarn3"}', null, 14, 1, 'STRING', 'YARN', 0, '2021-12-28 11:03:45', '2021-12-28 11:03:45', 0);
+INSERT INTO `dict` VALUES (99,'component_model_config', 'HDP 3.0.x', '{"HDFS": {"HDFS": "yarn3-hdfs3-hadoop3", "FLINK": [{"112": "yarn3-hdfs3-flink112"}], "SPARK": [{"320": "yarn3-hdfs3-spark320"}, {"210": "yarn3-hdfs3-spark210"}], "SCRIPT": "yarn3-hdfs3-script"}, "YARN": "yarn3"}', null, 14, 1, 'STRING', 'YARN', 0, '2021-12-28 11:04:23', '2021-12-28 11:04:23', 0);
+INSERT INTO `dict` VALUES (101,'component_model_config', 'CDH 6.0.x', '{"HDFS": {"HDFS": "yarn3-hdfs3-hadoop3", "FLINK": [{"112": "yarn3-hdfs3-flink112"}], "SPARK": [{"320": "yarn3-hdfs3-spark320"}, {"210": "yarn3-hdfs3-spark210"}], "SCRIPT": "yarn3-hdfs3-script"}, "YARN": "yarn3"}', null, 14, 1, 'STRING', 'YARN', 0, '2021-12-28 11:04:40', '2021-12-28 11:04:40', 0);
+INSERT INTO `dict` VALUES (103,'component_model_config', 'CDH 6.1.x', '{"HDFS": {"HDFS": "yarn3-hdfs3-hadoop3", "FLINK": [{"112": "yarn3-hdfs3-flink112"}], "SPARK": [{"320": "yarn3-hdfs3-spark320"}, {"210": "yarn3-hdfs3-spark210"}], "SCRIPT": "yarn3-hdfs3-script"}, "YARN": "yarn3"}', null, 14, 1, 'STRING', 'YARN', 0, '2021-12-28 11:04:55', '2021-12-28 11:04:55', 0);
+INSERT INTO `dict` VALUES (105,'component_model_config', 'CDH 6.2.x', '{"HDFS": {"HDFS": "yarn3-hdfs3-hadoop3", "FLINK": [{"112": "yarn3-hdfs3-flink112"}], "SPARK": [{"320": "yarn3-hdfs3-spark320"}, {"210": "yarn3-hdfs3-spark210"], "SCRIPT": "yarn3-hdfs3-script"}, "YARN": "yarn3"}', null, 14, 1, 'STRING', 'YARN', 0, '2021-12-28 11:05:06', '2021-12-28 11:05:06', 0);
+INSERT INTO `dict` VALUES (107,'component_model_config', 'HDP 2.6.x', '{"HDFS": {"HDFS": "yarn2-hdfs2-hadoop2", "FLINK": [{"112": "yarn2-hdfs2-flink112"}], "SPARK": [{"320": "yarn2-hdfs2-spark320"}, {"210": "yarn2-hdfs2-spark210"}], "SCRIPT": "yarn2-hdfs2-script"}, "YARN": "yarn2"}', null, 14, 1, 'STRING', 'YARN', 0, '2021-12-28 11:06:38', '2021-12-28 11:06:38', 0);
+INSERT INTO `dict` VALUES (109,'component_model_config', 'CDH 5.x', '{"HDFS": {"HDFS": "yarn2-hdfs2-hadoop2", "FLINK": [{"112": "yarn2-hdfs2-flink112"}], "SPARK": [{"320": "yarn2-hdfs2-spark320"}, {"210": "yarn2-hdfs2-spark210"}], "SCRIPT": "yarn2-hdfs2-script"}, "YARN": "yarn2"}', null, 14, 1, 'STRING', 'YARN', 0, '2021-12-28 11:07:19', '2021-12-28 11:07:19', 0);
+INSERT INTO `dict` VALUES (111,'component_model_config', 'HDP 3.x', '{"HDFS": {"HDFS": "yarn3-hdfs3-hadoop3", "FLINK": [{"112": "yarn3-hdfs3-flink112"}], "SPARK": [{"320": "yarn3-hdfs3-spark320"}, {"210": "yarn3-hdfs3-spark210"}], "SCRIPT": "yarn3-hdfs3-script"}, "YARN": "yarn3"}', null, 14, 1, 'STRING', 'YARN', 0, '2021-12-28 11:43:05', '2021-12-28 11:43:05', 0);
+INSERT INTO `dict` VALUES (113,'component_model_config', 'TDH 5.2.x', '{"HDFS": {"HDFS": "yarn2-hdfs2-hadoop2", "FLINK": [{"112": "yarn2-hdfs2-flink112"}], "SPARK": [{"320": "yarn2-hdfs2-spark320"}, {"210": "yarn2-hdfs2-spark210"}], "SCRIPT": "yarn2-hdfs2-script"}, "YARN": "yarn2"}', null, 14, 1, 'STRING', 'YARN', 0, '2021-12-28 11:44:33', '2021-12-28 11:44:33', 0);
+INSERT INTO `dict` VALUES (115,'component_model_config', 'TDH 6.x', '{"HDFS": {"HDFS": "yarn2-hdfs2-hadoop2", "FLINK": [{"112": "yarn2-hdfs2-flink112"}], "SPARK": [{"320": "yarn2-hdfs2-spark320"}, {"210": "yarn2-hdfs2-spark210"}], "SCRIPT": "yarn2-hdfs2-script"}, "YARN": "yarn2"}', null, 14, 1, 'STRING', 'YARN', 0, '2021-12-28 11:44:43', '2021-12-28 11:44:43', 0);
+INSERT INTO `dict` VALUES (117,'component_model_config', 'TDH 7.x', '{"HDFS": {"HDFS": "yarn2-hdfs2-hadoop2", "FLINK": [{"112": "yarn2-hdfs2-flink112"}], "SPARK": [{"320": "yarn2-hdfs2-spark320"}, {"210": "yarn2-hdfs2-spark210"}], "SCRIPT": "yarn2-hdfs2-script"}, "YARN": "yarn2"}', null, 14, 1, 'STRING', 'YARN', 0, '2021-12-28 11:45:02', '2021-12-28 11:45:02', 0);
+INSERT INTO `dict` VALUES (119,'component_model_config', 'CDP 7.x', '{"HDFS": {"HDFS": "yarn3-hdfs3-hadoop3", "FLINK": [{"112": "yarn3-hdfs3-flink112"}], "SPARK": [{"320": "yarn3-hdfs3-spark320"}, {"210": "yarn3-hdfs3-spark210"}], "SCRIPT": "yarn3-hdfs3-script"}, "YARN": "yarn3"}', null, 14, 1, 'STRING', 'YARN', 0, '2021-12-28 11:45:02', '2021-12-28 11:45:02', 0);
INSERT INTO `dict` VALUES (121, 'typename_mapping', 'yarn2-hdfs2-flink112', '-115', NULL, 6, 0, 'LONG', '', 0, '2021-05-18 11:29:00', '2021-05-18 11:29:00', 0);
INSERT INTO `dict` VALUES (123, 'typename_mapping', 'yarn3-hdfs3-flink112', '-115', NULL, 6, 0, 'LONG', '', 0, '2021-05-18 11:29:00', '2021-05-18 11:29:00', 0);
INSERT INTO `dict` VALUES (125, 'hive_version', '1.x', '1.x', NULL, 4, 1, 'STRING', '', 0, '2022-05-03 22:20:53', '2022-05-03 22:20:53', 0);
@@ -1675,7 +1677,7 @@ INSERT INTO `dict` VALUES (299, 'typename_mapping', 'flink112-standalone', '-120
INSERT INTO `dict` VALUES (301, 'flink_version', '1.12-on-yarn', '112', NULL, 1, 2, 'INTEGER', '', 0, '2022-05-03 22:13:12', '2022-05-03 22:13:12', 0);
INSERT INTO `dict` VALUES (303, 'flink_version', '1.12-standalone', '112', NULL, 1, 2, 'INTEGER', '', 0, '2022-09-20 14:57:48', '2022-09-20 14:57:48', 0);
INSERT INTO `dict` VALUES (305, '-1', '虚节点', '{\"actions\": [\"SAVE_TASK\", \"SUBMIT_TASK\", \"OPERATOR_TASK\"], \"barItem\":[ \"dependency\"],\"formField\": [], \"renderKind\": \"virtual\"}', NULL, 30, -1, 'STRING', '', 1, '2022-02-11 10:28:45', '2022-02-11 10:28:45', 0);
-INSERT INTO `dict` VALUES (307, '0', 'SparkSQL', '{\"actions\": [\"SAVE_TASK\", \"RUN_TASK\", \"STOP_TASK\", \"SUBMIT_TASK\", \"OPERATOR_TASK\"], \"barItem\": [\"task\", \"dependency\", \"task_params\", \"env_params\"], \"formField\": [\"datasource\",\"queue\"], \"renderKind\": \"editor\",\"dataTypeCodes\":[\"45\"]}', NULL, 30, 0, 'STRING', '', 1, '2022-02-11 10:28:45', '2022-02-11 10:28:45', 0);
+INSERT INTO `dict` VALUES (307, '0', 'SparkSQL', '{\"actions\": [\"SAVE_TASK\", \"RUN_TASK\", \"STOP_TASK\", \"SUBMIT_TASK\", \"OPERATOR_TASK\"], \"barItem\": [\"task\", \"dependency\", \"task_params\", \"env_params\"], \"formField\": [\"datasource\",\"queue\",\"componentVersion\"], \"renderKind\": \"editor\",\"dataTypeCodes\":[\"45\"]}', NULL, 30, 0, 'STRING', '', 1, '2022-02-11 10:28:45', '2022-02-11 10:28:45', 0);
INSERT INTO `dict` VALUES (309, '1', 'Spark', '{\"actions\": [\"SAVE_TASK\", \"SUBMIT_TASK\", \"OPERATOR_TASK\"], \"formField\": [\"resourceIdList\", \"mainClass\", \"exeArgs\", \"componentVersion\"],\"barItem\":[ \"dependency\",\"env_params\",\"task_params\"], \"renderKind\": \"spark\"}', NULL, 30, 0, 'STRING', '', 0, '2022-09-03 07:27:25', '2022-09-03 07:27:25', 0);
INSERT INTO `dict` VALUES (311, '2', 'SYNC', '{\"actions\": [\"SAVE_TASK\", \"RUN_TASK\", \"STOP_TASK\", \"SUBMIT_TASK\", \"OPERATOR_TASK\"], \"barItem\": [\"task\", \"dependency\", \"task_config\", \"task_params\", \"env_params\"], \"formField\": [\"createModel\", \"syncModel\"], \"renderKind\": \"dataSync\", \"renderCondition\": {\"key\": \"createModel\", \"value\": 0, \"renderKind\": \"editor\"}, \"actionsCondition\": {\"key\": \"createModel\", \"value\": 0, \"actions\": [\"CONVERT_TASK\", \"SAVE_TASK\", \"RUN_TASK\", \"STOP_TASK\", \"SUBMIT_TASK\", \"OPERATOR_TASK\"]}}', NULL, 30, 2, 'STRING', '', 1, '2022-02-11 10:28:45', '2022-02-11 10:28:45', 0);
INSERT INTO `dict` VALUES (313, '5', 'FlinkSQL', '{\"actions\": [\"GRAMMAR_TASK\", \"SAVE_TASK\", \"OPERATOR_TASK\"], \"barItem\": [\"task\", \"env_params\"], \"formField\": [\"componentVersion\"], \"renderKind\": \"editor\", \"actionsCondition\": {\"key\": \"createModel\", \"value\": 0, \"actions\": [\"CONVERT_TASK\", \"FORMAT_TASK\", \"GRAMMAR_TASK\", \"SAVE_TASK\", \"OPERATOR_TASK\"]}, \"barItemCondition\": {\"key\": \"createModel\", \"value\": 0, \"barItem\": [\"task\", \"flinksql_source\", \"flinksql_result\", \"flinksql_dimension\", \"env_params\"]}}', NULL, 30, 5, 'STRING', '', 0, '2022-09-03 07:25:04', '2022-09-03 07:25:04', 0);
@@ -2264,7 +2266,7 @@ VALUES (3, 1, 'SPARK', '2.1',
'2021-11-18 10:36:13', '2021-11-18 10:36:13', 0);
INSERT INTO `task_param_template`
VALUES (5, 2, 'SYNC', '1.12',
- '## 任务运行方式:\n## per_job:单独为任务创建flink yarn session,适用于低频率,大数据量同步\n## session:多个任务共用一个flink yarn session,适用于高频率、小数据量同步,默认per_job\n## standalone:多个任务共用一个flink standalone\n## flinkTaskRunMode=per_job\n## per_job模式下jobManager配置的内存大小,默认1024(单位M)\n## jobmanager.memory.mb=1024\n## per_job模式下taskManager配置的内存大小,默认1024(单位M)\n## taskmanager.memory.mb=1024\n## per_job模式下每个taskManager 对应 slot的数量\n## slots=1\n## checkpoint保存时间间隔\n## flink.checkpoint.interval=300000\n## 任务优先级, 范围:1-1000\n## job.priority=10',
+ '## 任务运行方式:\n## per_job:单独为任务创建flink yarn session,适用于低频率,大数据量同步\n## session:多个任务共用一个flink yarn session,适用于高频率、小数据量同步,默认session\n## standalone:多个任务共用一个flink standalone\n## flinkTaskRunMode=per_job\n## per_job模式下jobManager配置的内存大小,默认1024(单位M)\n## jobmanager.memory.mb=1024\n## per_job模式下taskManager配置的内存大小,默认1024(单位M)\n## taskmanager.memory.mb=1024\n## per_job模式下每个taskManager 对应 slot的数量\n## slots=1\n## checkpoint保存时间间隔\n## flink.checkpoint.interval=300000\n## 任务优先级, 范围:1-1000\n## job.priority=10',
'2021-11-18 10:37:24', '2021-11-18 10:37:24', 0);
INSERT INTO `task_param_template`
VALUES (7, 5, 'FlinkSQL', '1.12',
@@ -2472,4 +2474,71 @@ insert into console_component_config (cluster_id, component_id, component_type_c
values (-2, -233, 8, 'INPUT', 1, 'execute.dir', '/tmp/dir', null, null, null, null, now(), now(), 0),
(-2, -233, 8, 'INPUT', 1, 'DataX.python.path', 'python3', null, null, null, null, now(), now(), 0);
+
+DELETE FROM console_component_config WHERE component_id = -109;
+INSERT INTO console_component_config (cluster_id, component_id, component_type_code, type, required, `key`, value, `values`, dependencyKey, dependencyValue, `desc`, gmt_create, gmt_modified, is_deleted) VALUES (-2, -109, 1, 'CHECKBOX', 1, 'deploymode', '["perjob"]', null, '', '', null, now(), now(), 0);
+INSERT INTO console_component_config (cluster_id, component_id, component_type_code, type, required, `key`, value, `values`, dependencyKey, dependencyValue, `desc`, gmt_create, gmt_modified, is_deleted) VALUES (-2, -109, 1, 'GROUP', 1, 'perjob', 'perjob', null, 'deploymode', 'perjob', null, now(), now(), 0);
+INSERT INTO console_component_config (cluster_id, component_id, component_type_code, type, required, `key`, value, `values`, dependencyKey, dependencyValue, `desc`, gmt_create, gmt_modified, is_deleted) VALUES (-2, -109, 1, 'INPUT', 0, 'addColumnSupport', 'true', null, 'deploymode$perjob', null, null, now(), now(), 0);
+INSERT INTO console_component_config (cluster_id, component_id, component_type_code, type, required, `key`, value, `values`, dependencyKey, dependencyValue, `desc`, gmt_create, gmt_modified, is_deleted) VALUES (-2, -109, 1, 'INPUT', 1, 'spark.cores.max', '1', null, 'deploymode$perjob', null, null, now(), now(), 0);
+INSERT INTO console_component_config (cluster_id, component_id, component_type_code, type, required, `key`, value, `values`, dependencyKey, dependencyValue, `desc`, gmt_create, gmt_modified, is_deleted) VALUES (-2, -109, 1, 'INPUT', 0, 'spark.driver.extraJavaOptions', '-Dfile.encoding=utf-8', null, 'deploymode$perjob', null, null, now(), now(), 0);
+INSERT INTO console_component_config (cluster_id, component_id, component_type_code, type, required, `key`, value, `values`, dependencyKey, dependencyValue, `desc`, gmt_create, gmt_modified, is_deleted) VALUES (-2, -109, 1, 'INPUT', 0, 'spark.eventLog.compress', 'true', null, 'deploymode$perjob', null, null, now(), now(), 0);
+INSERT INTO console_component_config (cluster_id, component_id, component_type_code, type, required, `key`, value, `values`, dependencyKey, dependencyValue, `desc`, gmt_create, gmt_modified, is_deleted) VALUES (-2, -109, 1, 'INPUT', 0, 'spark.eventLog.dir', 'hdfs:///tmp/spark-yarn-logs', null, 'deploymode$perjob', null, null, now(), now(), 0);
+INSERT INTO console_component_config (cluster_id, component_id, component_type_code, type, required, `key`, value, `values`, dependencyKey, dependencyValue, `desc`, gmt_create, gmt_modified, is_deleted) VALUES (-2, -109, 1, 'INPUT', 0, 'spark.eventLog.enabled', 'true', null, 'deploymode$perjob', null, null, now(), now(), 0);
+INSERT INTO console_component_config (cluster_id, component_id, component_type_code, type, required, `key`, value, `values`, dependencyKey, dependencyValue, `desc`, gmt_create, gmt_modified, is_deleted) VALUES (-2, -109, 1, 'INPUT', 1, 'spark.executor.cores', '1', null, 'deploymode$perjob', null, null, now(), now(), 0);
+INSERT INTO console_component_config (cluster_id, component_id, component_type_code, type, required, `key`, value, `values`, dependencyKey, dependencyValue, `desc`, gmt_create, gmt_modified, is_deleted) VALUES (-2, -109, 1, 'INPUT', 0, 'spark.executor.extraJavaOptions', '-Dfile.encoding=utf-8', null, 'deploymode$perjob', null, null, now(), now(), 0);
+INSERT INTO console_component_config (cluster_id, component_id, component_type_code, type, required, `key`, value, `values`, dependencyKey, dependencyValue, `desc`, gmt_create, gmt_modified, is_deleted) VALUES (-2, -109, 1, 'INPUT', 1, 'spark.executor.heartbeatInterval', '10s', null, 'deploymode$perjob', null, null, now(), now(), 0);
+INSERT INTO console_component_config (cluster_id, component_id, component_type_code, type, required, `key`, value, `values`, dependencyKey, dependencyValue, `desc`, gmt_create, gmt_modified, is_deleted) VALUES (-2, -109, 1, 'INPUT', 1, 'spark.executor.instances', '1', null, 'deploymode$perjob', null, null, now(), now(), 0);
+INSERT INTO console_component_config (cluster_id, component_id, component_type_code, type, required, `key`, value, `values`, dependencyKey, dependencyValue, `desc`, gmt_create, gmt_modified, is_deleted) VALUES (-2, -109, 1, 'INPUT', 1, 'spark.executor.memory', '512m', null, 'deploymode$perjob', null, null, now(), now(), 0);
+
+INSERT INTO console_component_config (cluster_id, component_id, component_type_code, type, required, `key`, value, `values`, dependencyKey, dependencyValue, `desc`, gmt_create, gmt_modified, is_deleted) VALUES (-2, -109, 1, 'INPUT', 1, 'spark.sql.adaptive.advisoryPartitionSizeInBytes', '64MB', null, 'deploymode$perjob', null, null, now(), now(), 0);
+INSERT INTO console_component_config (cluster_id, component_id, component_type_code, type, required, `key`, value, `values`, dependencyKey, dependencyValue, `desc`, gmt_create, gmt_modified, is_deleted) VALUES (-2, -109, 1, 'INPUT', 1, 'spark.sql.adaptive.coalescePartitions.minPartitionSize', '1MB', null, 'deploymode$perjob', null, null, now(), now(), 0);
+INSERT INTO console_component_config (cluster_id, component_id, component_type_code, type, required, `key`, value, `values`, dependencyKey, dependencyValue, `desc`, gmt_create, gmt_modified, is_deleted) VALUES (-2, -109, 1, 'INPUT', 1, 'spark.sql.adaptive.coalescePartitions.initialPartitionNum', '200', null, 'deploymode$perjob', null, null, now(), now(), 0);
+INSERT INTO console_component_config (cluster_id, component_id, component_type_code, type, required, `key`, value, `values`, dependencyKey, dependencyValue, `desc`, gmt_create, gmt_modified, is_deleted) VALUES (-2, -109, 1, 'INPUT', 1, 'spark.sql.adaptive.skewJoin.skewedPartitionThresholdInBytes', '256MB', null, 'deploymode$perjob', null, null, now(), now(), 0);
+INSERT INTO console_component_config (cluster_id, component_id, component_type_code, type, required, `key`, value, `values`, dependencyKey, dependencyValue, `desc`, gmt_create, gmt_modified, is_deleted) VALUES (-2, -109, 1, 'INPUT', 1, 'spark.sql.adaptive.skewJoin.skewedPartitionFactor', '5', null, 'deploymode$perjob', null, null, now(), now(), 0);
+
+INSERT INTO console_component_config (cluster_id, component_id, component_type_code, type, required, `key`, value, `values`, dependencyKey, dependencyValue, `desc`, gmt_create, gmt_modified, is_deleted) VALUES (-2, -109, 1, 'INPUT', 1, 'spark.network.timeout', '600s', null, 'deploymode$perjob', null, null, now(), now(), 0);
+INSERT INTO console_component_config (cluster_id, component_id, component_type_code, type, required, `key`, value, `values`, dependencyKey, dependencyValue, `desc`, gmt_create, gmt_modified, is_deleted) VALUES (-2, -109, 1, 'INPUT', 1, 'spark.rpc.askTimeout', '600s', null, 'deploymode$perjob', null, null, now(), now(), 0);
+INSERT INTO console_component_config (cluster_id, component_id, component_type_code, type, required, `key`, value, `values`, dependencyKey, dependencyValue, `desc`, gmt_create, gmt_modified, is_deleted) VALUES (-2, -109, 1, 'INPUT', 1, 'spark.speculation', 'true', null, 'deploymode$perjob', null, null, now(), now(), 0);
+INSERT INTO console_component_config (cluster_id, component_id, component_type_code, type, required, `key`, value, `values`, dependencyKey, dependencyValue, `desc`, gmt_create, gmt_modified, is_deleted) VALUES (-2, -109, 1, 'INPUT', 1, 'spark.submit.deployMode', 'cluster', null, 'deploymode$perjob', null, null, now(), now(), 0);
+INSERT INTO console_component_config (cluster_id, component_id, component_type_code, type, required, `key`, value, `values`, dependencyKey, dependencyValue, `desc`, gmt_create, gmt_modified, is_deleted) VALUES (-2, -109, 1, 'INPUT', 0, 'spark.yarn.appMasterEnv.PYSPARK_DRIVER_PYTHON', '/data/miniconda2/bin/python3', null, 'deploymode$perjob', null, null, now(), now(), 0);
+INSERT INTO console_component_config (cluster_id, component_id, component_type_code, type, required, `key`, value, `values`, dependencyKey, dependencyValue, `desc`, gmt_create, gmt_modified, is_deleted) VALUES (-2, -109, 1, 'INPUT', 0, 'spark.yarn.appMasterEnv.PYSPARK_PYTHON', '/data/miniconda2/bin/python3', null, 'deploymode$perjob', null, null, now(), now(), 0);
+INSERT INTO console_component_config (cluster_id, component_id, component_type_code, type, required, `key`, value, `values`, dependencyKey, dependencyValue, `desc`, gmt_create, gmt_modified, is_deleted) VALUES (-2, -109, 1, 'INPUT', 1, 'spark.yarn.maxAppAttempts', '1', null, 'deploymode$perjob', null, null, now(), now(), 0);
+INSERT INTO console_component_config (cluster_id, component_id, component_type_code, type, required, `key`, value, `values`, dependencyKey, dependencyValue, `desc`, gmt_create, gmt_modified, is_deleted) VALUES (-2, -109, 1, 'INPUT', 1, 'sparkPythonExtLibPath', 'hdfs:///dtInsight/pythons/pyspark.zip,hdfs:///dtInsight/pythons/py4j-0.10.7-src.zip', null, 'deploymode$perjob', null, null, now(), now(), 0);
+INSERT INTO console_component_config (cluster_id, component_id, component_type_code, type, required, `key`, value, `values`, dependencyKey, dependencyValue, `desc`, gmt_create, gmt_modified, is_deleted) VALUES (-2, -109, 1, 'INPUT', 1, 'sparkSqlProxyPath', 'hdfs:///dtInsight/spark/spark-sql-proxy.jar', null, 'deploymode$perjob', null, null, now(), now(), 0);
+INSERT INTO console_component_config (cluster_id, component_id, component_type_code, type, required, `key`, value, `values`, dependencyKey, dependencyValue, `desc`, gmt_create, gmt_modified, is_deleted) VALUES (-2, -109, 1, 'INPUT', 1, 'sparkYarnArchive', 'hdfs:///dtInsight/sparkjars/jars', null, 'deploymode$perjob', null, null, now(), now(), 0);
+INSERT INTO console_component_config (cluster_id, component_id, component_type_code, type, required, `key`, value, `values`, dependencyKey, dependencyValue, `desc`, gmt_create, gmt_modified, is_deleted) VALUES (-2, -109, 1, 'INPUT', 0, 'yarnAccepterTaskNumber', '3', null, 'deploymode$perjob', null, null, now(), now(), 0);
+
+INSERT INTO task_param_template (task_type, task_name, task_version, params, gmt_create, gmt_modified, is_deleted) VALUES (0, 'SPARK_SQL', '3.2', '## Driver程序使用的CPU核数,默认为1
+# spark.driver.cores=1
+
+## Driver程序使用内存大小,默认1g
+# spark.driver.memory=1g
+
+## 对Spark每个action结果集大小的限制,最少是1M,若设为0则不限制大小。
+## 若Job结果超过限制则会异常退出,若结果集限制过大也可能造成OOM问题,默认1g
+# spark.driver.maxResultSize=1g
+
+## 启动的executor的数量,默认为1
+# spark.executor.instances=1
+
+## 每个executor使用的CPU核数,默认为1
+# spark.executor.cores=1
+
+## 每个executor内存大小,默认1g
+# spark.executor.memory=1g
+
+## spark 日志级别可选ALL, DEBUG, ERROR, FATAL, INFO, OFF, TRACE, WARN
+# logLevel = INFO
+
+## spark中所有网络交互的最大超时时间
+# spark.network.timeout=120s
+
+## executor的OffHeap内存,和spark.executor.memory配置使用
+# spark.yarn.executor.memoryOverhead=
+
+## 设置spark sql shuffle分区数,默认200
+# spark.sql.shuffle.partitions=200
+
+## 开启spark推测行为,默认false
+# spark.speculation=false', now(), now(), 0);
COMMIT;
\ No newline at end of file
diff --git a/taier-common/pom.xml b/taier-common/pom.xml
index ba0ffeafb5..c8b40ee5c7 100644
--- a/taier-common/pom.xml
+++ b/taier-common/pom.xml
@@ -222,7 +222,7 @@
3.0.1
../javadocs
- engine-api-client
+ taier-api-client
-Xdoclint:none
diff --git a/taier-data-develop/pom.xml b/taier-data-develop/pom.xml
index b8ea022b24..5b09d9cfe2 100644
--- a/taier-data-develop/pom.xml
+++ b/taier-data-develop/pom.xml
@@ -131,7 +131,7 @@
org.apache.maven.plugins
maven-shade-plugin
- 2.4.3
+ 3.2.4
org.springframework.boot
diff --git a/taier-data-develop/src/main/java/com/dtstack/taier/develop/datasource/convert/utils/AbstractAssertUtils.java b/taier-data-develop/src/main/java/com/dtstack/taier/develop/datasource/convert/utils/AbstractAssertUtils.java
deleted file mode 100644
index d50eaab141..0000000000
--- a/taier-data-develop/src/main/java/com/dtstack/taier/develop/datasource/convert/utils/AbstractAssertUtils.java
+++ /dev/null
@@ -1,123 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.dtstack.taier.develop.datasource.convert.utils;
-
-import com.dtstack.taier.common.exception.DtCenterDefException;
-import com.dtstack.taier.common.exception.ExceptionEnums;
-import org.apache.commons.collections.CollectionUtils;
-import org.apache.commons.collections.MapUtils;
-import org.apache.commons.lang3.StringUtils;
-
-import java.util.Collection;
-import java.util.Map;
-
-/**
- * 断言工具类
- *
- * @author :wangchuan
- * date:Created in 下午2:16 2021/7/5
- * company: www.dtstack.com
- */
-public abstract class AbstractAssertUtils {
-
- public static void isTrue(boolean expression, String message) {
- if (!expression) {
- throw new DtCenterDefException(message);
- }
- }
-
- public static void isOverLength(String content, Integer limit, String message) {
- if (StringUtils.isNotBlank(content) && content.length() > limit) {
- throw new DtCenterDefException(message);
- }
- }
-
- public static void isTrue(boolean expression, ExceptionEnums exceptionEnums) {
- if (!expression) {
- throw new DtCenterDefException(exceptionEnums);
- }
- }
-
- public static void notNull(Object obj, String message) {
- if (obj == null) {
- throw new DtCenterDefException(message);
- }
- }
-
- public static void isNull(Object obj, String message) {
- if (obj != null) {
- throw new DtCenterDefException(message);
- }
- }
-
- public static void isNull(Object obj, ExceptionEnums exceptionEnums) {
- if (obj != null) {
- throw new DtCenterDefException(exceptionEnums);
- }
- }
-
- public static void notBlank(String obj, ExceptionEnums exceptionEnums) {
- if (StringUtils.isBlank(obj)) {
- throw new DtCenterDefException(exceptionEnums);
- }
- }
-
- public static void notBlank(String obj, String message) {
- if (StringUtils.isBlank(obj)) {
- throw new DtCenterDefException(message);
- }
- }
-
- public static void isFalse(boolean expression, String message) {
- if (expression) {
- throw new DtCenterDefException(message);
- }
- }
-
- public static void isFalse(boolean expression, ExceptionEnums exceptionEnums) {
- if (expression) {
- throw new DtCenterDefException(exceptionEnums);
- }
- }
-
- public static void notNull(Object obj, ExceptionEnums exceptionEnums) {
- if (obj == null) {
- throw new DtCenterDefException(exceptionEnums);
- }
- }
-
- public static void notNull(Collection collection, String message) {
- if (CollectionUtils.isEmpty(collection)) {
- throw new DtCenterDefException(message);
- }
- }
-
- public static void notNull(Collection collection, ExceptionEnums exceptionEnums) {
- if (CollectionUtils.isEmpty(collection)) {
- throw new DtCenterDefException(exceptionEnums);
- }
- }
-
- public static void notEmpty(Map collection, String message) {
- if (MapUtils.isEmpty(collection)) {
- throw new DtCenterDefException(message);
- }
- }
-
-}
diff --git a/taier-data-develop/src/main/java/com/dtstack/taier/develop/service/develop/impl/DevelopSelectSqlService.java b/taier-data-develop/src/main/java/com/dtstack/taier/develop/service/develop/impl/DevelopSelectSqlService.java
index a2d0fb7fdd..5174eaf24b 100644
--- a/taier-data-develop/src/main/java/com/dtstack/taier/develop/service/develop/impl/DevelopSelectSqlService.java
+++ b/taier-data-develop/src/main/java/com/dtstack/taier/develop/service/develop/impl/DevelopSelectSqlService.java
@@ -150,6 +150,7 @@ public String sendSqlTask(String sql, String taskParams, String jobId, Task task
paramActionExt.setTenantId(task.getTenantId());
paramActionExt.setQueueName(task.getQueueName());
paramActionExt.setDatasourceId(task.getDatasourceId());
+ paramActionExt.setComponentVersion(task.getComponentVersion());
actionService.start(paramActionExt);
return jobId;
}
diff --git a/taier-data-develop/src/main/java/com/dtstack/taier/develop/service/develop/saver/AbstractTaskSaver.java b/taier-data-develop/src/main/java/com/dtstack/taier/develop/service/develop/saver/AbstractTaskSaver.java
index 28dd84508b..d4191d6a49 100644
--- a/taier-data-develop/src/main/java/com/dtstack/taier/develop/service/develop/saver/AbstractTaskSaver.java
+++ b/taier-data-develop/src/main/java/com/dtstack/taier/develop/service/develop/saver/AbstractTaskSaver.java
@@ -21,6 +21,7 @@
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.dtstack.taier.common.enums.EComponentType;
+import com.dtstack.taier.common.enums.EComputeType;
import com.dtstack.taier.common.enums.EScheduleJobType;
import com.dtstack.taier.common.enums.EScheduleStatus;
import com.dtstack.taier.common.enums.ESubmitStatus;
@@ -183,6 +184,9 @@ public TaskVO updateTaskInfo(TaskResourceParam taskResourceParam) {
Task task = developTaskService.getOne(Wrappers.lambdaQuery(Task.class)
.eq(Task::getName, taskVO.getName())
.eq(Task::getTenantId, taskVO.getTenantId()));
+ if(EComputeType.BATCH.getType() == taskVO.getComputeType()){
+ taskVO.setJobId(null);
+ }
if (taskVO.getId() != null && taskVO.getId() > 0) {
//update
diff --git a/taier-data-develop/src/main/java/com/dtstack/taier/develop/service/develop/saver/DefaultTaskSaver.java b/taier-data-develop/src/main/java/com/dtstack/taier/develop/service/develop/saver/DefaultTaskSaver.java
index 1cc8d216f7..0e1c3646e0 100644
--- a/taier-data-develop/src/main/java/com/dtstack/taier/develop/service/develop/saver/DefaultTaskSaver.java
+++ b/taier-data-develop/src/main/java/com/dtstack/taier/develop/service/develop/saver/DefaultTaskSaver.java
@@ -26,6 +26,7 @@
import com.dtstack.taier.develop.dto.devlop.TaskVO;
import com.dtstack.taier.develop.service.develop.impl.DevelopTaskTaskService;
import com.dtstack.taier.develop.service.user.UserService;
+import com.dtstack.taier.pluginapi.enums.ComputeType;
import com.dtstack.taier.pluginapi.enums.EJobType;
import org.apache.commons.lang.BooleanUtils;
import org.apache.commons.lang.StringUtils;
@@ -50,13 +51,13 @@ public class DefaultTaskSaver extends AbstractTaskSaver {
@Autowired
private UserService userService;
- @Autowired
- private DevelopTaskTaskService developTaskTaskService;
@Override
public TaskResourceParam beforeProcessing(TaskResourceParam taskResourceParam) {
// sql 任务必须选择数据源
EScheduleJobType scheduleJobType = EScheduleJobType.getByTaskType(taskResourceParam.getTaskType());
+ taskResourceParam.setTaskParams(taskResourceParam.getTaskParams() == null ? taskTemplateService.getTaskTemplate(taskResourceParam.getTaskType(), taskResourceParam.getComponentVersion()).getParams() : taskResourceParam.getTaskParams());
+ taskResourceParam.setComputeType(ComputeType.BATCH.getType());
if (EComputeType.BATCH.getType() == scheduleJobType.getComputeType().getType() && EJobType.SQL.getType() == scheduleJobType.getEngineJobType()) {
if (null == taskResourceParam.getDatasourceId()) {
throw new TaierDefineException(ErrorCode.DATA_SOURCE_NOT_SET);
diff --git a/taier-datasource/pom.xml b/taier-datasource/pom.xml
index cc177fe870..b69794e572 100644
--- a/taier-datasource/pom.xml
+++ b/taier-datasource/pom.xml
@@ -89,6 +89,24 @@
+
+
+
+ central
+ https://repo1.maven.org/maven2/
+
+
+
+ oss-sonatype
+ https://oss.sonatype.org/content/repositories/releases/
+
+
+
+ huawei
+ https://repo.huaweicloud.com/repository/maven/huaweicloudsdk/
+
+
+
diff --git a/taier-datasource/taier-datasource-api/src/main/java/com/dtstack/taier/datasource/api/base/ClientCache.java b/taier-datasource/taier-datasource-api/src/main/java/com/dtstack/taier/datasource/api/base/ClientCache.java
index f2a9b13cd3..697ef0b626 100644
--- a/taier-datasource/taier-datasource-api/src/main/java/com/dtstack/taier/datasource/api/base/ClientCache.java
+++ b/taier-datasource/taier-datasource-api/src/main/java/com/dtstack/taier/datasource/api/base/ClientCache.java
@@ -25,11 +25,15 @@
import com.dtstack.taier.datasource.api.client.IRestful;
import com.dtstack.taier.datasource.api.client.ITable;
import com.dtstack.taier.datasource.api.client.IYarn;
+import com.dtstack.taier.datasource.api.config.Configuration;
+import com.dtstack.taier.datasource.api.context.ClientEnvironment;
import com.dtstack.taier.datasource.api.exception.InitializeException;
+import com.dtstack.taier.datasource.api.manager.ManagerFactory;
import com.dtstack.taier.datasource.api.manager.list.ClientManager;
import com.dtstack.taier.datasource.api.source.DataSourceType;
import lombok.extern.slf4j.Slf4j;
+import java.util.HashMap;
import java.util.Objects;
/**
@@ -78,6 +82,18 @@ public static IClient getClient(Integer dataSourceType) {
return getClientByType(IClient.class, dataSourceType);
}
+ public static void main(String[] args) {
+ Configuration configuration = new Configuration(new HashMap<>());
+ ClientEnvironment clientEnvironment = new ClientEnvironment(configuration);
+ clientEnvironment.start();
+ ClientCache.setEnv(clientEnvironment.getManagerFactory().getManager(ClientManager.class));
+ ClientManager clientManager = new ClientManager();
+ clientManager.setManagerFactory(new ManagerFactory());
+ setEnv(clientManager);
+ IClient client = getClient(DataSourceType.KAFKA.getVal());
+ System.out.println(client);
+ }
+
/**
* 获取 HDFS 文件客户端
*
diff --git a/taier-datasource/taier-datasource-plugin/taier-datasource-plugin-aws_s3/pom.xml b/taier-datasource/taier-datasource-plugin/taier-datasource-plugin-aws_s3/pom.xml
index bdf5d6497f..71ecb46ba1 100644
--- a/taier-datasource/taier-datasource-plugin/taier-datasource-plugin-aws_s3/pom.xml
+++ b/taier-datasource/taier-datasource-plugin/taier-datasource-plugin-aws_s3/pom.xml
@@ -51,7 +51,7 @@
org.apache.maven.plugins
maven-shade-plugin
- 3.2.1
+ 3.2.4
package
diff --git a/taier-datasource/taier-datasource-plugin/taier-datasource-plugin-csp_s3/pom.xml b/taier-datasource/taier-datasource-plugin/taier-datasource-plugin-csp_s3/pom.xml
index 68b777557f..8b5b54d92a 100644
--- a/taier-datasource/taier-datasource-plugin/taier-datasource-plugin-csp_s3/pom.xml
+++ b/taier-datasource/taier-datasource-plugin/taier-datasource-plugin-csp_s3/pom.xml
@@ -50,7 +50,7 @@
org.apache.maven.plugins
maven-shade-plugin
- 3.2.1
+ 3.2.4
package
diff --git a/taier-datasource/taier-datasource-plugin/taier-datasource-plugin-hive1/pom.xml b/taier-datasource/taier-datasource-plugin/taier-datasource-plugin-hive1/pom.xml
index b3e49611d8..49ed6ec582 100644
--- a/taier-datasource/taier-datasource-plugin/taier-datasource-plugin-hive1/pom.xml
+++ b/taier-datasource/taier-datasource-plugin/taier-datasource-plugin-hive1/pom.xml
@@ -22,10 +22,10 @@
1.0.5
1.8.3
1.1.2.6
- 1.1.1
+ 1.2.1
2.7.3
1.6.3
- 1.1.1
+ 1.2.1
@@ -424,6 +424,11 @@
+
+ org.apache.httpcomponents
+ httpclient
+ 4.5.3
+
diff --git a/taier-datasource/taier-datasource-plugin/taier-datasource-plugin-hive1/src/main/java/org/apache/hive/jdbc/HiveConnection.java b/taier-datasource/taier-datasource-plugin/taier-datasource-plugin-hive1/src/main/java/org/apache/hive/jdbc/HiveConnection.java
index 8ce1ed9bc5..04f72b58e4 100644
--- a/taier-datasource/taier-datasource-plugin/taier-datasource-plugin-hive1/src/main/java/org/apache/hive/jdbc/HiveConnection.java
+++ b/taier-datasource/taier-datasource-plugin/taier-datasource-plugin-hive1/src/main/java/org/apache/hive/jdbc/HiveConnection.java
@@ -18,43 +18,10 @@
package org.apache.hive.jdbc;
-import java.io.FileInputStream;
-import java.io.IOException;
-import java.security.KeyStore;
-import java.sql.Array;
-import java.sql.Blob;
-import java.sql.CallableStatement;
-import java.sql.Clob;
-import java.sql.Connection;
-import java.sql.DatabaseMetaData;
-import java.sql.DriverManager;
-import java.sql.NClob;
-import java.sql.PreparedStatement;
-import java.sql.ResultSet;
-import java.sql.SQLClientInfoException;
-import java.sql.SQLException;
-import java.sql.SQLWarning;
-import java.sql.SQLXML;
-import java.sql.Savepoint;
-import java.sql.Statement;
-import java.sql.Struct;
-import java.util.HashMap;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.Map;
-import java.util.Map.Entry;
-import java.util.Properties;
-import java.util.concurrent.Executor;
-import java.util.concurrent.TimeUnit;
-
-import javax.security.sasl.Sasl;
-import javax.security.sasl.SaslException;
-
import org.apache.commons.lang3.BooleanUtils;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.apache.hadoop.hive.conf.HiveConf;
-import org.apache.hadoop.hive.shims.ShimLoader;
import org.apache.hive.jdbc.Utils.JdbcConnectionParams;
import org.apache.hive.service.auth.HiveAuthFactory;
import org.apache.hive.service.auth.KerberosSaslHelper;
@@ -74,15 +41,60 @@
import org.apache.hive.service.cli.thrift.TRenewDelegationTokenResp;
import org.apache.hive.service.cli.thrift.TSessionHandle;
import org.apache.http.HttpRequestInterceptor;
-import org.apache.http.conn.scheme.Scheme;
+import org.apache.http.HttpResponse;
+import org.apache.http.client.CookieStore;
+import org.apache.http.client.ServiceUnavailableRetryStrategy;
+import org.apache.http.config.Registry;
+import org.apache.http.config.RegistryBuilder;
+import org.apache.http.conn.socket.ConnectionSocketFactory;
import org.apache.http.conn.ssl.SSLSocketFactory;
-import org.apache.http.impl.client.DefaultHttpClient;
+import org.apache.http.impl.client.BasicCookieStore;
+import org.apache.http.impl.client.CloseableHttpClient;
+import org.apache.http.impl.client.HttpClientBuilder;
+import org.apache.http.impl.client.HttpClients;
+import org.apache.http.impl.conn.BasicHttpClientConnectionManager;
+import org.apache.http.protocol.HttpContext;
import org.apache.thrift.TException;
import org.apache.thrift.protocol.TBinaryProtocol;
import org.apache.thrift.transport.THttpClient;
import org.apache.thrift.transport.TTransport;
import org.apache.thrift.transport.TTransportException;
+import javax.net.ssl.KeyManagerFactory;
+import javax.net.ssl.SSLContext;
+import javax.net.ssl.TrustManagerFactory;
+import javax.security.sasl.Sasl;
+import javax.security.sasl.SaslException;
+import java.io.FileInputStream;
+import java.io.IOException;
+import java.security.KeyStore;
+import java.security.SecureRandom;
+import java.sql.Array;
+import java.sql.Blob;
+import java.sql.CallableStatement;
+import java.sql.Clob;
+import java.sql.Connection;
+import java.sql.DatabaseMetaData;
+import java.sql.DriverManager;
+import java.sql.NClob;
+import java.sql.PreparedStatement;
+import java.sql.ResultSet;
+import java.sql.SQLClientInfoException;
+import java.sql.SQLException;
+import java.sql.SQLWarning;
+import java.sql.SQLXML;
+import java.sql.Savepoint;
+import java.sql.Statement;
+import java.sql.Struct;
+import java.util.HashMap;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Map;
+import java.util.Map.Entry;
+import java.util.Properties;
+import java.util.concurrent.Executor;
+import java.util.concurrent.TimeUnit;
+
/**
* HiveConnection.
*
@@ -185,6 +197,7 @@ public HiveConnection(String uri, Properties info) throws SQLException {
supportedProtocols.add(TProtocolVersion.HIVE_CLI_SERVICE_PROTOCOL_V5);
supportedProtocols.add(TProtocolVersion.HIVE_CLI_SERVICE_PROTOCOL_V6);
supportedProtocols.add(TProtocolVersion.HIVE_CLI_SERVICE_PROTOCOL_V7);
+ supportedProtocols.add(TProtocolVersion.HIVE_CLI_SERVICE_PROTOCOL_V8);
// open client session
openSession();
@@ -224,6 +237,8 @@ private void openTransport() throws SQLException {
port = connParams.getPort();
LOG.info("Will retry opening client transport");
} else {
+ LOG.info("Transport Used for JDBC connection: " +
+ sessConfMap.get(JdbcConnectionParams.TRANSPORT_MODE));
throw new SQLException("Could not open client transport with JDBC Uri: " + jdbcUriString
+ ": " + e.getMessage(), " 08S01", e);
}
@@ -247,7 +262,7 @@ private String getServerHttpUrl(boolean useSsl) {
}
private TTransport createHttpTransport() throws SQLException, TTransportException {
- DefaultHttpClient httpClient;
+ CloseableHttpClient httpClient;
boolean useSsl = isSslConnection();
// Create an http client from the configs
httpClient = getHttpClient(useSsl);
@@ -264,6 +279,9 @@ private TTransport createHttpTransport() throws SQLException, TTransportExceptio
}
}
catch (TException e) {
+ LOG.info("JDBC Connection Parameters used : useSSL = " + useSsl + " , httpPath = " +
+ sessConfMap.get(JdbcConnectionParams.HTTP_PATH) + " Authentication type = " +
+ sessConfMap.get(JdbcConnectionParams.AUTH_TYPE));
String msg = "Could not create http connection to " +
jdbcUriString + ". " + e.getMessage();
throw new TTransportException(msg, e);
@@ -271,37 +289,92 @@ private TTransport createHttpTransport() throws SQLException, TTransportExceptio
return transport;
}
- private DefaultHttpClient getHttpClient(Boolean useSsl) throws SQLException {
- DefaultHttpClient httpClient = new DefaultHttpClient();
+ private CloseableHttpClient getHttpClient(Boolean useSsl) throws SQLException {
+ boolean isCookieEnabled = sessConfMap.get(JdbcConnectionParams.COOKIE_AUTH) == null ||
+ (!JdbcConnectionParams.COOKIE_AUTH_FALSE.equalsIgnoreCase(
+ sessConfMap.get(JdbcConnectionParams.COOKIE_AUTH)));
+ String cookieName = sessConfMap.get(JdbcConnectionParams.COOKIE_NAME) == null ?
+ JdbcConnectionParams.DEFAULT_COOKIE_NAMES_HS2 :
+ sessConfMap.get(JdbcConnectionParams.COOKIE_NAME);
+ CookieStore cookieStore = isCookieEnabled ? new BasicCookieStore() : null;
+ HttpClientBuilder httpClientBuilder;
// Request interceptor for any request pre-processing logic
HttpRequestInterceptor requestInterceptor;
- // If Kerberos
+ Map additionalHttpHeaders = new HashMap();
+
+ // Retrieve the additional HttpHeaders
+ for (Map.Entry entry : sessConfMap.entrySet()) {
+ String key = entry.getKey();
+
+ if (key.startsWith(JdbcConnectionParams.HTTP_HEADER_PREFIX)) {
+ additionalHttpHeaders.put(key.substring(JdbcConnectionParams.HTTP_HEADER_PREFIX.length()),
+ entry.getValue());
+ }
+ }
+ // Configure http client for kerberos/password based authentication
if (isKerberosAuthMode()) {
/**
* Add an interceptor which sets the appropriate header in the request.
* It does the kerberos authentication and get the final service ticket,
* for sending to the server before every request.
* In https mode, the entire information is encrypted
- * TODO: Optimize this with a mix of kerberos + using cookie.
*/
requestInterceptor =
new HttpKerberosRequestInterceptor(sessConfMap.get(JdbcConnectionParams.AUTH_PRINCIPAL),
- host, getServerHttpUrl(useSsl), assumeSubject);
+ host, getServerHttpUrl(useSsl), assumeSubject, cookieStore, cookieName, useSsl,
+ additionalHttpHeaders);
}
else {
/**
* Add an interceptor to pass username/password in the header.
* In https mode, the entire information is encrypted
*/
- requestInterceptor = new HttpBasicAuthInterceptor(getUserName(), getPassword());
+ requestInterceptor = new HttpBasicAuthInterceptor(getUserName(), getPassword(),
+ cookieStore, cookieName, useSsl,
+ additionalHttpHeaders);
}
- // Configure httpClient for SSL
+ // Configure http client for cookie based authentication
+ if (isCookieEnabled) {
+ // Create a http client with a retry mechanism when the server returns a status code of 401.
+ httpClientBuilder =
+ HttpClients.custom().setServiceUnavailableRetryStrategy(
+ new ServiceUnavailableRetryStrategy() {
+
+ @Override
+ public boolean retryRequest(
+ final HttpResponse response,
+ final int executionCount,
+ final HttpContext context) {
+ int statusCode = response.getStatusLine().getStatusCode();
+ boolean ret = statusCode == 401 && executionCount <= 1;
+
+ // Set the context attribute to true which will be interpreted by the request interceptor
+ if (ret) {
+ context.setAttribute(Utils.HIVE_SERVER2_RETRY_KEY, Utils.HIVE_SERVER2_RETRY_TRUE);
+ }
+ return ret;
+ }
+
+ @Override
+ public long getRetryInterval() {
+ // Immediate retry
+ return 0;
+ }
+ });
+ } else {
+ httpClientBuilder = HttpClientBuilder.create();
+ }
+ // Add the request interceptor to the client builder
+ httpClientBuilder.addInterceptorFirst(requestInterceptor);
+ // Configure http client for SSL
if (useSsl) {
+ String useTwoWaySSL = sessConfMap.get(JdbcConnectionParams.USE_TWO_WAY_SSL);
String sslTrustStorePath = sessConfMap.get(JdbcConnectionParams.SSL_TRUST_STORE);
String sslTrustStorePassword = sessConfMap.get(
JdbcConnectionParams.SSL_TRUST_STORE_PASSWORD);
KeyStore sslTrustStore;
SSLSocketFactory socketFactory;
+
/**
* The code within the try block throws:
* 1. SSLInitializationException
@@ -315,11 +388,13 @@ private DefaultHttpClient getHttpClient(Boolean useSsl) throws SQLException {
* and throw a SQLException.
*/
try {
- if (sslTrustStorePath == null || sslTrustStorePath.isEmpty()) {
+ if (useTwoWaySSL != null &&
+ useTwoWaySSL.equalsIgnoreCase(JdbcConnectionParams.TRUE)) {
+ socketFactory = getTwoWaySSLSocketFactory();
+ } else if (sslTrustStorePath == null || sslTrustStorePath.isEmpty()) {
// Create a default socket factory based on standard JSSE trust material
socketFactory = SSLSocketFactory.getSocketFactory();
- }
- else {
+ } else {
// Pick trust store config from the given path
sslTrustStore = KeyStore.getInstance(JdbcConnectionParams.SSL_TRUST_STORE_TYPE);
sslTrustStore.load(new FileInputStream(sslTrustStorePath),
@@ -327,8 +402,13 @@ private DefaultHttpClient getHttpClient(Boolean useSsl) throws SQLException {
socketFactory = new SSLSocketFactory(sslTrustStore);
}
socketFactory.setHostnameVerifier(SSLSocketFactory.ALLOW_ALL_HOSTNAME_VERIFIER);
- Scheme sslScheme = new Scheme("https", 443, socketFactory);
- httpClient.getConnectionManager().getSchemeRegistry().register(sslScheme);
+
+ final Registry registry =
+ RegistryBuilder.create()
+ .register("https", socketFactory)
+ .build();
+
+ httpClientBuilder.setConnectionManager(new BasicHttpClientConnectionManager(registry));
}
catch (Exception e) {
String msg = "Could not create an https connection to " +
@@ -336,8 +416,7 @@ private DefaultHttpClient getHttpClient(Boolean useSsl) throws SQLException {
throw new SQLException(msg, " 08S01", e);
}
}
- httpClient.addRequestInterceptor(requestInterceptor);
- return httpClient;
+ return httpClientBuilder.build();
}
/**
@@ -360,17 +439,20 @@ private TTransport createBinaryTransport() throws SQLException, TTransportExcept
// If Kerberos
Map saslProps = new HashMap();
SaslQOP saslQOP = SaslQOP.AUTH;
- if (sessConfMap.containsKey(JdbcConnectionParams.AUTH_PRINCIPAL)) {
- if (sessConfMap.containsKey(JdbcConnectionParams.AUTH_QOP)) {
- try {
- saslQOP = SaslQOP.fromString(sessConfMap.get(JdbcConnectionParams.AUTH_QOP));
- } catch (IllegalArgumentException e) {
- throw new SQLException("Invalid " + JdbcConnectionParams.AUTH_QOP +
- " parameter. " + e.getMessage(), "42000", e);
- }
+ if (sessConfMap.containsKey(JdbcConnectionParams.AUTH_QOP)) {
+ try {
+ saslQOP = SaslQOP.fromString(sessConfMap.get(JdbcConnectionParams.AUTH_QOP));
+ } catch (IllegalArgumentException e) {
+ throw new SQLException("Invalid " + JdbcConnectionParams.AUTH_QOP +
+ " parameter. " + e.getMessage(), "42000", e);
}
saslProps.put(Sasl.QOP, saslQOP.toString());
- saslProps.put(Sasl.SERVER_AUTH, "true");
+ } else {
+ // If the client did not specify qop then just negotiate the one supported by server
+ saslProps.put(Sasl.QOP, "auth-conf,auth-int,auth");
+ }
+ saslProps.put(Sasl.SERVER_AUTH, "true");
+ if (sessConfMap.containsKey(JdbcConnectionParams.AUTH_PRINCIPAL)) {
transport = KerberosSaslHelper.getKerberosTransport(
sessConfMap.get(JdbcConnectionParams.AUTH_PRINCIPAL), host,
HiveAuthFactory.getSocketTransport(host, port, loginTimeout), saslProps,
@@ -393,7 +475,9 @@ private TTransport createBinaryTransport() throws SQLException, TTransportExcept
if (isSslConnection()) {
// get SSL socket
String sslTrustStore = sessConfMap.get(JdbcConnectionParams.SSL_TRUST_STORE);
- String sslTrustStorePassword = sessConfMap.get(JdbcConnectionParams.SSL_TRUST_STORE_PASSWORD);
+ String sslTrustStorePassword = sessConfMap.get(
+ JdbcConnectionParams.SSL_TRUST_STORE_PASSWORD);
+
if (sslTrustStore == null || sslTrustStore.isEmpty()) {
transport = HiveAuthFactory.getSSLSocket(host, port, loginTimeout);
} else {
@@ -419,6 +503,49 @@ private TTransport createBinaryTransport() throws SQLException, TTransportExcept
return transport;
}
+ SSLSocketFactory getTwoWaySSLSocketFactory() throws SQLException {
+ SSLSocketFactory socketFactory = null;
+
+ try {
+ KeyManagerFactory keyManagerFactory = KeyManagerFactory.getInstance(
+ JdbcConnectionParams.SUNX509_ALGORITHM_STRING,
+ JdbcConnectionParams.SUNJSSE_ALGORITHM_STRING);
+ String keyStorePath = sessConfMap.get(JdbcConnectionParams.SSL_KEY_STORE);
+ String keyStorePassword = sessConfMap.get(JdbcConnectionParams.SSL_KEY_STORE_PASSWORD);
+ KeyStore sslKeyStore = KeyStore.getInstance(JdbcConnectionParams.SSL_KEY_STORE_TYPE);
+
+ if (keyStorePath == null || keyStorePath.isEmpty()) {
+ throw new IllegalArgumentException(JdbcConnectionParams.SSL_KEY_STORE
+ + " Not configured for 2 way SSL connection, keyStorePath param is empty");
+ }
+ sslKeyStore.load(new FileInputStream(keyStorePath),
+ keyStorePassword.toCharArray());
+ keyManagerFactory.init(sslKeyStore, keyStorePassword.toCharArray());
+
+ TrustManagerFactory trustManagerFactory = TrustManagerFactory.getInstance(
+ JdbcConnectionParams.SUNX509_ALGORITHM_STRING);
+ String trustStorePath = sessConfMap.get(JdbcConnectionParams.SSL_TRUST_STORE);
+ String trustStorePassword = sessConfMap.get(
+ JdbcConnectionParams.SSL_TRUST_STORE_PASSWORD);
+ KeyStore sslTrustStore = KeyStore.getInstance(JdbcConnectionParams.SSL_TRUST_STORE_TYPE);
+
+ if (trustStorePath == null || trustStorePath.isEmpty()) {
+ throw new IllegalArgumentException(JdbcConnectionParams.SSL_TRUST_STORE
+ + " Not configured for 2 way SSL connection");
+ }
+ sslTrustStore.load(new FileInputStream(trustStorePath),
+ trustStorePassword.toCharArray());
+ trustManagerFactory.init(sslTrustStore);
+ SSLContext context = SSLContext.getInstance("TLS");
+ context.init(keyManagerFactory.getKeyManagers(),
+ trustManagerFactory.getTrustManagers(), new SecureRandom());
+ socketFactory = new SSLSocketFactory(context);
+ } catch (Exception e) {
+ throw new SQLException("Error while initializing 2 way ssl socket factory ", e);
+ }
+ return socketFactory;
+ }
+
// Lookup the delegation token. First in the connection URL, then Configuration
private String getClientDelegationToken(Map jdbcConnConf)
throws SQLException {
diff --git a/taier-ui/src/components/scaffolds/create.tsx b/taier-ui/src/components/scaffolds/create.tsx
index e06b2d8aa8..4f8baf32d3 100644
--- a/taier-ui/src/components/scaffolds/create.tsx
+++ b/taier-ui/src/components/scaffolds/create.tsx
@@ -70,7 +70,7 @@ const ComponentVersion = ({ onChange }: ICreateFormProps) => {
const [versions, setVersions] = useState<{ label: string; value: string }[]>([]);
useEffect(() => {
- if (taskType) {
+ if (taskType !== undefined) {
api.getComponentVersionByTaskType<{ componentVersion: string; default: boolean; componentName: string }[]>({
taskType,
}).then((res) => {
diff --git a/taier-worker/taier-worker-api/src/main/java/com/dtstack/taier/pluginapi/constrant/ConfigConstant.java b/taier-worker/taier-worker-api/src/main/java/com/dtstack/taier/pluginapi/constrant/ConfigConstant.java
index ff1cf596b9..94262f4c0b 100644
--- a/taier-worker/taier-worker-api/src/main/java/com/dtstack/taier/pluginapi/constrant/ConfigConstant.java
+++ b/taier-worker/taier-worker-api/src/main/java/com/dtstack/taier/pluginapi/constrant/ConfigConstant.java
@@ -113,4 +113,11 @@ public class ConfigConstant {
public static final String DATAX_PYTHON_BIN = "DataX.python.path";
+
+ public static final String SPARK_KERBEROS_REMOTE_KRB5 = "spark.kerberos.remotekrb5";
+
+ public static final String SPARK_KERBEROS_REMOTE_KEYTAB = "spark.kerberos.remotekeytab";
+
+ public static final String SPARK_HADOOP_CONF_REMOTE_DIR = "spark.hadoopconf.remotedir";
+
}
diff --git a/taier-worker/taier-worker-plugin/base/src/main/java/com/dtstack/taier/base/util/KerberosUtils.java b/taier-worker/taier-worker-plugin/base/src/main/java/com/dtstack/taier/base/util/KerberosUtils.java
index 84ed2708c2..75b3350844 100644
--- a/taier-worker/taier-worker-plugin/base/src/main/java/com/dtstack/taier/base/util/KerberosUtils.java
+++ b/taier-worker/taier-worker-plugin/base/src/main/java/com/dtstack/taier/base/util/KerberosUtils.java
@@ -432,7 +432,7 @@ public static synchronized String[] getKerberosFile(BaseConfig config, String lo
public static String getKeytabPath(BaseConfig config) {
String fileName = config.getPrincipalFile();
String remoteDir = config.getRemoteDir();
- String localDir = USER_DIR + remoteDir;
+ String localDir = ConfigConstant.LOCAL_KEYTAB_DIR_PARENT + remoteDir;
File path = new File(localDir);
if (!path.exists()) {
diff --git a/taier-worker/taier-worker-plugin/dummy/pom.xml b/taier-worker/taier-worker-plugin/dummy/pom.xml
index a57df43ea8..be017c65da 100644
--- a/taier-worker/taier-worker-plugin/dummy/pom.xml
+++ b/taier-worker/taier-worker-plugin/dummy/pom.xml
@@ -41,7 +41,7 @@
org.apache.maven.plugins
maven-shade-plugin
- 3.0.0
+ 3.2.4
package
diff --git a/taier-worker/taier-worker-plugin/flink/flink112-standalone/pom.xml b/taier-worker/taier-worker-plugin/flink/flink112-standalone/pom.xml
index cb5a1ced18..d6ec9bd158 100644
--- a/taier-worker/taier-worker-plugin/flink/flink112-standalone/pom.xml
+++ b/taier-worker/taier-worker-plugin/flink/flink112-standalone/pom.xml
@@ -258,7 +258,7 @@
org.apache.maven.plugins
maven-shade-plugin
- 3.0.0
+ 3.2.4
package
diff --git a/taier-worker/taier-worker-plugin/flink/pom.xml b/taier-worker/taier-worker-plugin/flink/pom.xml
index e584e7afd0..73f2947352 100644
--- a/taier-worker/taier-worker-plugin/flink/pom.xml
+++ b/taier-worker/taier-worker-plugin/flink/pom.xml
@@ -18,8 +18,8 @@
common
yarn-hdfs-flink112-core
- yarn3-hdfs3-flink112
yarn2-hdfs2-flink112
+ yarn3-hdfs3-flink112
flink112-standalone
flink-base
diff --git a/taier-worker/taier-worker-plugin/flink/yarn2-hdfs2-flink112/pom.xml b/taier-worker/taier-worker-plugin/flink/yarn2-hdfs2-flink112/pom.xml
index 3b92b61e34..bafad536b9 100644
--- a/taier-worker/taier-worker-plugin/flink/yarn2-hdfs2-flink112/pom.xml
+++ b/taier-worker/taier-worker-plugin/flink/yarn2-hdfs2-flink112/pom.xml
@@ -247,6 +247,25 @@
+
+
+
+ central
+ https://repo1.maven.org/maven2/
+
+
+
+ oss-sonatype
+ https://oss.sonatype.org/content/repositories/releases/
+
+
+
+ huawei
+ https://repo.huaweicloud.com/repository/maven/huaweicloudsdk/
+
+
+
+
@@ -259,7 +278,7 @@
org.apache.maven.plugins
maven-shade-plugin
- 3.0.0
+ 3.2.4
package
diff --git a/taier-worker/taier-worker-plugin/flink/yarn3-hdfs3-flink112/pom.xml b/taier-worker/taier-worker-plugin/flink/yarn3-hdfs3-flink112/pom.xml
index 14fb1fa55a..e9c63167b6 100644
--- a/taier-worker/taier-worker-plugin/flink/yarn3-hdfs3-flink112/pom.xml
+++ b/taier-worker/taier-worker-plugin/flink/yarn3-hdfs3-flink112/pom.xml
@@ -252,6 +252,23 @@
+
+
+
+ central
+ https://repo1.maven.org/maven2/
+
+
+
+ oss-sonatype
+ https://oss.sonatype.org/content/repositories/releases/
+
+
+
+ huawei
+ https://repo.huaweicloud.com/repository/maven/huaweicloudsdk/
+
+
diff --git a/taier-worker/taier-worker-plugin/hadoop/yarn2-hdfs2-hadoop2/pom.xml b/taier-worker/taier-worker-plugin/hadoop/yarn2-hdfs2-hadoop2/pom.xml
index db5d0755d7..9ca12bf265 100644
--- a/taier-worker/taier-worker-plugin/hadoop/yarn2-hdfs2-hadoop2/pom.xml
+++ b/taier-worker/taier-worker-plugin/hadoop/yarn2-hdfs2-hadoop2/pom.xml
@@ -75,7 +75,7 @@
org.apache.maven.plugins
maven-shade-plugin
- 3.0.0
+ 3.2.4
package
diff --git a/taier-worker/taier-worker-plugin/hadoop/yarn3-hdfs3-hadoop3/pom.xml b/taier-worker/taier-worker-plugin/hadoop/yarn3-hdfs3-hadoop3/pom.xml
index cfa93dbd7a..1b166bc1c3 100644
--- a/taier-worker/taier-worker-plugin/hadoop/yarn3-hdfs3-hadoop3/pom.xml
+++ b/taier-worker/taier-worker-plugin/hadoop/yarn3-hdfs3-hadoop3/pom.xml
@@ -75,7 +75,7 @@
org.apache.maven.plugins
maven-shade-plugin
- 3.0.0
+ 3.2.4
package
diff --git a/taier-worker/taier-worker-plugin/pom.xml b/taier-worker/taier-worker-plugin/pom.xml
index 5c1a7d75c8..52ee72ce9d 100644
--- a/taier-worker/taier-worker-plugin/pom.xml
+++ b/taier-worker/taier-worker-plugin/pom.xml
@@ -1,8 +1,14 @@
+
+
+ taier-worker
+ com.dtstack.taier
+ 1.0.0
+ ../pom.xml
+
4.0.0
- com.dtstack.taier
taier-worker-plugin
1.0.0
pom
@@ -164,7 +170,7 @@
true
javadocs
- engine-java-docs
+ taier-java-docs
diff --git a/taier-worker/taier-worker-plugin/script/yarn2-hdfs2-script/script-client/pom.xml b/taier-worker/taier-worker-plugin/script/yarn2-hdfs2-script/script-client/pom.xml
index 3bd0127e06..7f318280f7 100644
--- a/taier-worker/taier-worker-plugin/script/yarn2-hdfs2-script/script-client/pom.xml
+++ b/taier-worker/taier-worker-plugin/script/yarn2-hdfs2-script/script-client/pom.xml
@@ -31,12 +31,6 @@
1.0.0
-
-
-
-
-
-
org.apache.hadoop
diff --git a/taier-worker/taier-worker-plugin/script/yarn2-hdfs2-script/script-core/pom.xml b/taier-worker/taier-worker-plugin/script/yarn2-hdfs2-script/script-core/pom.xml
index 1eb0046d8e..363e6d129d 100644
--- a/taier-worker/taier-worker-plugin/script/yarn2-hdfs2-script/script-core/pom.xml
+++ b/taier-worker/taier-worker-plugin/script/yarn2-hdfs2-script/script-core/pom.xml
@@ -126,7 +126,7 @@
org.apache.maven.plugins
maven-shade-plugin
- 3.0.0
+ 3.2.4
package
diff --git a/taier-worker/taier-worker-plugin/script/yarn3-hdfs3-script/script-client/pom.xml b/taier-worker/taier-worker-plugin/script/yarn3-hdfs3-script/script-client/pom.xml
index c941f86e64..70ed2bb81f 100644
--- a/taier-worker/taier-worker-plugin/script/yarn3-hdfs3-script/script-client/pom.xml
+++ b/taier-worker/taier-worker-plugin/script/yarn3-hdfs3-script/script-client/pom.xml
@@ -31,11 +31,6 @@
1.0.0
-
-
-
-
-
org.apache.hadoop
@@ -101,7 +96,7 @@
org.apache.maven.plugins
maven-shade-plugin
- 3.0.0
+ 3.2.4
package
diff --git a/taier-worker/taier-worker-plugin/script/yarn3-hdfs3-script/script-core/pom.xml b/taier-worker/taier-worker-plugin/script/yarn3-hdfs3-script/script-core/pom.xml
index 816a8e9763..0f125da118 100644
--- a/taier-worker/taier-worker-plugin/script/yarn3-hdfs3-script/script-core/pom.xml
+++ b/taier-worker/taier-worker-plugin/script/yarn3-hdfs3-script/script-core/pom.xml
@@ -125,7 +125,7 @@
org.apache.maven.plugins
maven-shade-plugin
- 3.0.0
+ 3.2.4
package
diff --git a/taier-worker/taier-worker-plugin/spark/pom.xml b/taier-worker/taier-worker-plugin/spark/pom.xml
index 2e4f7ff13b..4264aa56fe 100644
--- a/taier-worker/taier-worker-plugin/spark/pom.xml
+++ b/taier-worker/taier-worker-plugin/spark/pom.xml
@@ -15,12 +15,119 @@
pom
+
+ UTF-8
+ 2.1.3
+ 2.11.8
+
+
- yarn2-hdfs2-spark210-core
+ spark-sql-proxy
+ spark-yarn-client-core
+ yarn-hdfs-spark210-core
+ yarn-hdfs-spark320-core
yarn2-hdfs2-spark210
yarn3-hdfs3-spark210
+ yarn2-hdfs2-spark320
+ yarn3-hdfs3-spark320
+
+
+
+ com.dtstack.taier
+ taier-worker-plugin.base
+ 1.0.0
+
+
+
+ com.dtstack.taier
+ taier-worker-plugin.spark.spark-sql-proxy
+ 1.0.0
+
+
+
+ org.apache.hadoop
+ hadoop-common
+ ${hadoop2.version}
+ provided
+
+
+
+ com.google.guava
+ guava
+ 14.0.1
+
+
+
+ org.scala-lang
+ scala-library
+ ${scala.version}
+
+
+
+
+ org.apache.spark
+ spark-hive_2.11
+ ${spark.version}
+
+
+ log4j
+ apache-log4j-extras
+
+
+
+
+
+ org.apache.spark
+ spark-core_2.11
+ ${spark.version}
+
+
+
+ org.apache.spark
+ spark-yarn_2.11
+ ${spark.version}
+
+
+
+ org.apache.hadoop
+ hadoop-common
+ ${hadoop2.version}
+
+
+
+ org.apache.hadoop
+ hadoop-hdfs
+ ${hadoop2.version}
+
+
+
+ org.apache.hadoop
+ hadoop-client
+ ${hadoop2.version}
+
+
+
+ org.apache.hadoop
+ hadoop-yarn-client
+ ${hadoop2.version}
+
+
+
+ xalan
+ xalan
+ 2.7.1
+
+
+
+ xerces
+ xercesImpl
+ 2.9.1
+
+
+
+
@@ -30,5 +137,132 @@
src/main/resources/
+
+
+
+
+
+ net.alchim31.maven
+ scala-maven-plugin
+ 3.2.1
+
+
+ scala-compile-first
+
+ add-source
+ compile
+
+ process-resources
+
+
+ scala-test-compile
+
+ testCompile
+
+ process-test-resources
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-compiler-plugin
+ 2.0.2
+
+
+
+ compile
+
+ compile
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-shade-plugin
+ 3.2.4
+
+
+
+ shade
+
+ package
+
+
+ false
+ true
+ ${project.basedir}/target/dependency-reduced-pom.xml
+ true
+
+
+
+
+
+
+
+ META-INF/MANIFEST.MF
+ MANIFEST.MF
+
+
+ META-INF/services/org.apache.hadoop.security.SecurityInfo
+
+
+ META-INF/services/org.apache.hadoop.fs.FileSystem
+
+
+
+
+
+ org.slf4j:slf4j-log4j12
+ log4j:log4j
+ org.slf4j:slf4j-api
+ netty-all:io.netty
+
+
+
+
+ *:*
+
+ META-INF/*.SF
+ META-INF/*.DSA
+ META-INF/*.RSA
+
+
+
+
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-antrun-plugin
+ 1.2
+
+
+ copy-resources
+
+ run
+
+
+ package
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
\ No newline at end of file
+
diff --git a/taier-worker/taier-worker-plugin/spark/yarn2-hdfs2-spark210/spark-sql-proxy/pom.xml b/taier-worker/taier-worker-plugin/spark/spark-sql-proxy/pom.xml
similarity index 56%
rename from taier-worker/taier-worker-plugin/spark/yarn2-hdfs2-spark210/spark-sql-proxy/pom.xml
rename to taier-worker/taier-worker-plugin/spark/spark-sql-proxy/pom.xml
index f53665a02c..45f53b7ef7 100644
--- a/taier-worker/taier-worker-plugin/spark/yarn2-hdfs2-spark210/spark-sql-proxy/pom.xml
+++ b/taier-worker/taier-worker-plugin/spark/spark-sql-proxy/pom.xml
@@ -3,44 +3,40 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
- taier-worker-plugin.spark.yarn2-hdfs2-spark210
+ taier-worker-plugin.spark
com.dtstack.taier
1.0.0
../pom.xml
4.0.0
- taier-worker-plugin.spark.yarn2-hdfs2-spark210.spark-sql-proxy
- taier-worker-plugin.spark.yarn2-hdfs2-spark210.spark-sql-proxy
+ taier-worker-plugin.spark.spark-sql-proxy
+ taier-worker-plugin.spark.spark-sql-proxy
+
+ jar
spark-sql-proxy
- yarn2-hdfs2-spark210
- 1.5.0-SNAPSHOT
+ spark-sql-proxy
+ UTF-8
+ 2.1.3
+ 2.11.8
+ 3.2.2
- jar
com.dtstack.taier
- taier-worker-plugin.spark.yarn2-hdfs2-spark210-core.spark-sql-proxy-core
+ taier-worker-plugin.base
1.0.0
-
-
- commons-lang3
- org.apache.commons
-
-
-
org.apache.spark
spark-sql_2.11
${spark.version}
provided
-
org.apache.spark
spark-hive-thriftserver_2.11
@@ -60,64 +56,46 @@
-
+
+
+ net.alchim31.maven
+ scala-maven-plugin
+
+
+
+ org.apache.maven.plugins
+ maven-compiler-plugin
+
+
org.apache.maven.plugins
maven-shade-plugin
- 3.0.0
-
-
- package
-
- shade
-
-
- false
-
-
- org.slf4j
-
-
-
-
- *:*
-
- META-INF/*.SF
- META-INF/*.DSA
- META-INF/*.RSA
-
-
-
-
-
-
+ org.apache.maven.plugins
maven-antrun-plugin
1.2
copy-resources
-
- package
run
+
+ package
-
-
-
+
@@ -126,4 +104,4 @@
-
\ No newline at end of file
+
diff --git a/taier-worker/taier-worker-plugin/spark/yarn2-hdfs2-spark210-core/spark-sql-proxy-core/src/main/java/com/dtstack/taier/sql/main/SqlProxy.java b/taier-worker/taier-worker-plugin/spark/spark-sql-proxy/src/main/java/com/dtstack/taier/sql/main/SqlProxy.java
similarity index 98%
rename from taier-worker/taier-worker-plugin/spark/yarn2-hdfs2-spark210-core/spark-sql-proxy-core/src/main/java/com/dtstack/taier/sql/main/SqlProxy.java
rename to taier-worker/taier-worker-plugin/spark/spark-sql-proxy/src/main/java/com/dtstack/taier/sql/main/SqlProxy.java
index f014d870a5..cee4e0ff1f 100644
--- a/taier-worker/taier-worker-plugin/spark/yarn2-hdfs2-spark210-core/spark-sql-proxy-core/src/main/java/com/dtstack/taier/sql/main/SqlProxy.java
+++ b/taier-worker/taier-worker-plugin/spark/spark-sql-proxy/src/main/java/com/dtstack/taier/sql/main/SqlProxy.java
@@ -78,8 +78,8 @@ public void runJob(String submitSql, String appName, String logLevel, SparkConf
//屏蔽引号内的 分号
Splitter splitter = new Splitter(';');
List sqlArray = splitter.splitEscaped(unzipSql);
- for(String sql : sqlArray){
- if(sql == null || sql.trim().length() == 0){
+ for (String sql : sqlArray) {
+ if (sql == null || sql.trim().length() == 0) {
continue;
}
logger.info("processed sql statement {}", sql);
diff --git a/taier-worker/taier-worker-plugin/spark/yarn2-hdfs2-spark210-core/spark-sql-proxy-core/src/main/java/com/dtstack/taier/sql/main/util/ZipUtil.java b/taier-worker/taier-worker-plugin/spark/spark-sql-proxy/src/main/java/com/dtstack/taier/sql/main/util/ZipUtil.java
similarity index 100%
rename from taier-worker/taier-worker-plugin/spark/yarn2-hdfs2-spark210-core/spark-sql-proxy-core/src/main/java/com/dtstack/taier/sql/main/util/ZipUtil.java
rename to taier-worker/taier-worker-plugin/spark/spark-sql-proxy/src/main/java/com/dtstack/taier/sql/main/util/ZipUtil.java
diff --git a/taier-worker/taier-worker-plugin/spark/spark-yarn-client-core/pom.xml b/taier-worker/taier-worker-plugin/spark/spark-yarn-client-core/pom.xml
new file mode 100644
index 0000000000..65568b88df
--- /dev/null
+++ b/taier-worker/taier-worker-plugin/spark/spark-yarn-client-core/pom.xml
@@ -0,0 +1,117 @@
+
+
+
+ taier-worker-plugin.spark
+ com.dtstack.taier
+ 1.0.0
+ ../pom.xml
+
+ 4.0.0
+
+ taier-worker-plugin.spark.spark-yarn-client-core
+ taier-worker-plugin.spark.spark-yarn-client-core
+ jar
+
+
+
+ com.dtstack.taier
+ taier-worker-plugin.base
+
+
+
+ com.google.guava
+ guava
+ provided
+
+
+
+
+ org.eclipse.jetty
+ jetty-server
+ 9.3.19.v20170502
+
+
+
+
+ org.apache.spark
+ spark-hive_2.11
+ provided
+
+
+
+ org.apache.spark
+ spark-core_2.11
+ provided
+
+
+ org.apache.hadoop
+ hadoop-confHdfsPath
+
+
+ org.apache.hadoop
+ hadoop-common
+
+
+ org.apache.hadoop
+ hadoop-client
+
+
+
+
+
+ org.apache.spark
+ spark-yarn_2.11
+ provided
+
+
+ org.apache.hadoop
+ hadoop-yarn-common
+
+
+ org.apache.hadoop
+ hadoop-yarn-api
+
+
+
+ hadooop-yarn-server-web-proxy
+ org.apache.hadoop
+
+
+
+
+
+
+ org.apache.hadoop
+ hadoop-client
+ provided
+
+
+
+ org.apache.hadoop
+ hadoop-yarn-client
+ provided
+
+
+
+ org.apache.hadoop
+ hadoop-hdfs
+ provided
+
+
+
+
+
+
+ net.alchim31.maven
+ scala-maven-plugin
+
+
+
+ org.apache.maven.plugins
+ maven-compiler-plugin
+
+
+
+
diff --git a/taier-worker/taier-worker-plugin/spark/spark-yarn-client-core/src/main/java/com/dtstack/taier/sparkyarn/sparkext/ClientExt.java b/taier-worker/taier-worker-plugin/spark/spark-yarn-client-core/src/main/java/com/dtstack/taier/sparkyarn/sparkext/ClientExt.java
new file mode 100644
index 0000000000..f28ad31404
--- /dev/null
+++ b/taier-worker/taier-worker-plugin/spark/spark-yarn-client-core/src/main/java/com/dtstack/taier/sparkyarn/sparkext/ClientExt.java
@@ -0,0 +1,40 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.dtstack.taier.sparkyarn.sparkext;
+
+import org.apache.hadoop.conf.Configuration;
+import org.apache.hadoop.yarn.client.api.YarnClient;
+import org.apache.spark.SparkConf;
+import org.apache.spark.deploy.yarn.ClientArguments;
+import org.apache.spark.deploy.yarn.DtClient;
+
+/**
+ * 修改Saprk yarn client ---> 修改提交之前的配置包打包
+ * Date: 2018/5/9
+ * Company: www.dtstack.com
+ *
+ * @author xuchao
+ */
+
+public class ClientExt extends DtClient {
+
+ public ClientExt(ClientArguments args, Configuration hadoopConf, SparkConf sparkConf, YarnClient yarnClient) {
+ super(args, hadoopConf, sparkConf, yarnClient);
+ }
+}
\ No newline at end of file
diff --git a/taier-worker/taier-worker-plugin/spark/yarn2-hdfs2-spark210-core/spark-yarn-client-core/src/main/java/com/dtstack/taier/sparkyarn/sparkext/ClientExtFactory.java b/taier-worker/taier-worker-plugin/spark/spark-yarn-client-core/src/main/java/com/dtstack/taier/sparkyarn/sparkext/ClientExtFactory.java
similarity index 77%
rename from taier-worker/taier-worker-plugin/spark/yarn2-hdfs2-spark210-core/spark-yarn-client-core/src/main/java/com/dtstack/taier/sparkyarn/sparkext/ClientExtFactory.java
rename to taier-worker/taier-worker-plugin/spark/spark-yarn-client-core/src/main/java/com/dtstack/taier/sparkyarn/sparkext/ClientExtFactory.java
index 1a77d6e29f..602ea0698d 100644
--- a/taier-worker/taier-worker-plugin/spark/yarn2-hdfs2-spark210-core/spark-yarn-client-core/src/main/java/com/dtstack/taier/sparkyarn/sparkext/ClientExtFactory.java
+++ b/taier-worker/taier-worker-plugin/spark/spark-yarn-client-core/src/main/java/com/dtstack/taier/sparkyarn/sparkext/ClientExtFactory.java
@@ -18,8 +18,8 @@
package com.dtstack.taier.sparkyarn.sparkext;
-import com.dtstack.taier.base.filesystem.FilesystemManager;
import org.apache.hadoop.conf.Configuration;
+import org.apache.hadoop.yarn.client.api.YarnClient;
import org.apache.spark.SparkConf;
import org.apache.spark.deploy.yarn.ClientArguments;
@@ -28,16 +28,17 @@
* Reason:
* Date: 2019/1/21
* Company: www.dtstack.com
+ *
* @author xuchao
*/
public class ClientExtFactory {
- public static ClientExt getClientExt(FilesystemManager filesystemManager,
- ClientArguments args,
+ public static ClientExt getClientExt(ClientArguments args,
Configuration hadoopConf,
- SparkConf sparkConf){
+ SparkConf sparkConf,
+ YarnClient yarnClient) {
- return new ClientExt(filesystemManager, args, hadoopConf, sparkConf);
+ return new ClientExt(args, hadoopConf, sparkConf, yarnClient);
}
}
diff --git a/taier-worker/taier-worker-plugin/spark/yarn2-hdfs2-spark210-core/spark-yarn-client-core/src/main/java/com/dtstack/taier/sparkyarn/sparkyarn/SparkJobLog.java b/taier-worker/taier-worker-plugin/spark/spark-yarn-client-core/src/main/java/com/dtstack/taier/sparkyarn/sparkyarn/SparkJobLog.java
similarity index 100%
rename from taier-worker/taier-worker-plugin/spark/yarn2-hdfs2-spark210-core/spark-yarn-client-core/src/main/java/com/dtstack/taier/sparkyarn/sparkyarn/SparkJobLog.java
rename to taier-worker/taier-worker-plugin/spark/spark-yarn-client-core/src/main/java/com/dtstack/taier/sparkyarn/sparkyarn/SparkJobLog.java
diff --git a/taier-worker/taier-worker-plugin/spark/yarn2-hdfs2-spark210-core/spark-yarn-client-core/src/main/java/com/dtstack/taier/sparkyarn/sparkyarn/SparkYarnClient.java b/taier-worker/taier-worker-plugin/spark/spark-yarn-client-core/src/main/java/com/dtstack/taier/sparkyarn/sparkyarn/SparkYarnClient.java
similarity index 95%
rename from taier-worker/taier-worker-plugin/spark/yarn2-hdfs2-spark210-core/spark-yarn-client-core/src/main/java/com/dtstack/taier/sparkyarn/sparkyarn/SparkYarnClient.java
rename to taier-worker/taier-worker-plugin/spark/spark-yarn-client-core/src/main/java/com/dtstack/taier/sparkyarn/sparkyarn/SparkYarnClient.java
index e360f3ff62..a5cf6cd181 100644
--- a/taier-worker/taier-worker-plugin/spark/yarn2-hdfs2-spark210-core/spark-yarn-client-core/src/main/java/com/dtstack/taier/sparkyarn/sparkyarn/SparkYarnClient.java
+++ b/taier-worker/taier-worker-plugin/spark/spark-yarn-client-core/src/main/java/com/dtstack/taier/sparkyarn/sparkyarn/SparkYarnClient.java
@@ -45,6 +45,7 @@
import com.dtstack.taier.sparkyarn.sparkext.ClientExt;
import com.dtstack.taier.sparkyarn.sparkext.ClientExtFactory;
import com.dtstack.taier.sparkyarn.sparkyarn.constant.AppEnvConstant;
+import com.dtstack.taier.sparkyarn.sparkyarn.constant.SparkConstants;
import com.dtstack.taier.sparkyarn.sparkyarn.file.SparkResourceUploader;
import com.dtstack.taier.sparkyarn.sparkyarn.parser.AddJarOperator;
import com.dtstack.taier.sparkyarn.sparkyarn.util.HadoopConf;
@@ -67,7 +68,6 @@
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-import java.io.File;
import java.io.IOException;
import java.net.URLDecoder;
import java.net.URLEncoder;
@@ -94,8 +94,6 @@ public class SparkYarnClient extends AbstractClient {
private static final String SPARK_YARN_MODE = "SPARK_YARN_MODE";
- private static final String IS_CARBON_SPARK_KEY = "isCarbondata";
-
private static final String SESSION_CONF_KEY_PREFIX = "session.";
private static final String KEY_DEFAULT_FILE_FORMAT = "hive.default.fileformat";
@@ -110,16 +108,12 @@ public class SparkYarnClient extends AbstractClient {
private static final String KEY_PRE_STR = "spark.";
- private static final String SPARK_JAVA_OPTS_KEY = "SPARK_JAVA_OPTS";
-
private static final String PYTHON_RUNNER_CLASS = "org.apache.spark.deploy.PythonRunner";
private static final String PYTHON_RUNNER_DEPENDENCY_RES_KEY = "extRefResource";
private static final String CLUSTER_INFO_WS_FORMAT = "%s/ws/v1/cluster";
- private static final String USER_DIR = System.getProperty("user.dir");
-
/**
* 如果请求 CLUSTER_INFO_WS_FORMAT 返回信息包含该特征则表示是alive
*/
@@ -139,10 +133,6 @@ public class SparkYarnClient extends AbstractClient {
private ThreadPoolExecutor threadPoolExecutor;
- private static String userDir = System.getProperty("user.dir");
-
- private static final String SPARK_CONF_DIR = "sparkconf";
-
public static final String SPARK_LOG4J_FILE_NAME = "log4j-spark.properties";
public static final String SPARK_LOCAL_LOG4J_KEY = "spark_local_log4j_key";
@@ -249,15 +239,13 @@ private JobResult submitJobWithJar(JobClient jobClient) {
ClientArguments clientArguments = new ClientArguments(argList.toArray(new String[argList.size()]));
SparkConf sparkConf = buildBasicSparkConf(jobClient);
sparkConf.setAppName(appName);
- setSparkLog4jLocalFilePath(sparkConf, jobClient);
fillExtSparkConf(sparkConf, jobClient.getConfProperties());
- setSparkLog4jConfiguration(sparkConf);
+ setSparkLog4j(jobClient,sparkConf);
ApplicationId appId = null;
try {
- ClientExt clientExt = ClientExtFactory.getClientExt(filesystemManager, clientArguments, yarnConf, sparkConf);
- clientExt.setSparkYarnConfig(sparkYarnConfig);
+ ClientExt clientExt = ClientExtFactory.getClientExt(clientArguments, yarnConf, sparkConf, yarnClient);
String proxyUserName = sparkYarnConfig.getDtProxyUserName();
if (StringUtils.isNotBlank(proxyUserName)) {
logger.info("jobId {} ugi proxyUser is {}", jobClient.getJobId(), proxyUserName);
@@ -351,15 +339,12 @@ private JobResult submitPythonJob(JobClient jobClient) {
sparkConf.set("spark.submit.pyFiles", pythonExtPath);
sparkConf.setAppName(appName);
- setSparkLog4jLocalFilePath(sparkConf, jobClient);
fillExtSparkConf(sparkConf, jobClient.getConfProperties());
setSparkLog4jConfiguration(sparkConf);
try {
ClientArguments clientArguments = new ClientArguments(argList.toArray(new String[argList.size()]));
- ClientExt clientExt = new ClientExt(filesystemManager, clientArguments, yarnConf, sparkConf);
- clientExt.setSparkYarnConfig(sparkYarnConfig);
-
+ ClientExt clientExt = new ClientExt(clientArguments, yarnConf, sparkConf, yarnClient);
String proxyUserName = sparkYarnConfig.getDtProxyUserName();
if (StringUtils.isNotBlank(proxyUserName)) {
logger.info("ugi proxyUser is {}", proxyUserName);
@@ -459,15 +444,14 @@ private JobResult submitSparkSqlJobForBatch(JobClient jobClient) {
ClientArguments clientArguments = new ClientArguments(argList.toArray(new String[argList.size()]));
SparkConf sparkConf = buildBasicSparkConf(jobClient);
sparkConf.setAppName(jobClient.getJobName());
- setSparkLog4jLocalFilePath(sparkConf, jobClient);
+ setSparkLog4j(jobClient, sparkConf);
fillExtSparkConf(sparkConf, confProp);
setSparkLog4jConfiguration(sparkConf);
ApplicationId appId = null;
try {
- ClientExt clientExt = ClientExtFactory.getClientExt(filesystemManager, clientArguments, yarnConf, sparkConf);
- clientExt.setSparkYarnConfig(sparkYarnConfig);
+ ClientExt clientExt = ClientExtFactory.getClientExt(clientArguments, yarnConf, sparkConf, yarnClient);
String proxyUserName = sparkYarnConfig.getDtProxyUserName();
if (StringUtils.isNotBlank(proxyUserName)) {
logger.info("ugi proxyUser is {}", proxyUserName);
@@ -502,15 +486,6 @@ private Map getSparkSessionConf(Properties confProp) {
return map;
}
- private void setSparkLog4jLocalFilePath(SparkConf sparkConf, JobClient jobClient) {
- Properties confProp = jobClient.getConfProperties();
- String logLevel = MathUtil.getString(confProp.get(LOG_LEVEL_KEY), "info");
- String path = userDir + File.separator + SPARK_CONF_DIR + File.separator + logLevel.toLowerCase() + File.separator + SPARK_LOG4J_FILE_NAME;
- File file = new File(path);
- if (file.exists()) {
- sparkConf.set(SPARK_LOCAL_LOG4J_KEY, path);
- }
- }
private SparkConf buildBasicSparkConf(JobClient jobClient) {
@@ -899,4 +874,37 @@ private YarnClient buildYarnClient() {
}
+
+ private void setSparkLog4j(JobClient jobClient, SparkConf sparkConf) {
+ Properties confProp = jobClient.getConfProperties();
+ String logLevel = MathUtil.getString(confProp.get(SparkConstants.LOG_LEVEL_KEY), "info");
+ sparkConf.set(
+ "spark.log4j.content",
+ StringUtils.replace(SparkConstants.SPARK_LOG4J_CONTENT, "INFO", logLevel));
+ String log4jContent = SparkConstants.SPARK_JAVA_OPTIONS_LOG4J_CONTENT;
+ setSparkExtraJavaOptions(log4jContent, sparkConf);
+ }
+
+ private void setSparkExtraJavaOptions(String options, SparkConf sparkConf) {
+ String driverExtraJavaOptions =
+ sparkConf.get(SparkConstants.SPARK_DRIVER_EXTRA_JAVA_OPTIONS, "");
+ if (StringUtils.isBlank(driverExtraJavaOptions)) {
+ sparkConf.set(SparkConstants.SPARK_DRIVER_EXTRA_JAVA_OPTIONS, options);
+ } else {
+ sparkConf.set(
+ SparkConstants.SPARK_DRIVER_EXTRA_JAVA_OPTIONS,
+ driverExtraJavaOptions + " " + options);
+ }
+ String executorExtraJavaOptions =
+ sparkConf.get(SparkConstants.SPARK_EXECUTOR_EXTRA_JAVA_OPTIONS, "");
+ if (StringUtils.isBlank(executorExtraJavaOptions)) {
+ sparkConf.set(SparkConstants.SPARK_EXECUTOR_EXTRA_JAVA_OPTIONS, options);
+ } else {
+ sparkConf.set(
+ SparkConstants.SPARK_EXECUTOR_EXTRA_JAVA_OPTIONS,
+ executorExtraJavaOptions + " " + options);
+ }
+ }
+
+
}
diff --git a/taier-worker/taier-worker-plugin/spark/yarn2-hdfs2-spark210-core/spark-yarn-client-core/src/main/java/com/dtstack/taier/sparkyarn/sparkyarn/SparkYarnConfig.java b/taier-worker/taier-worker-plugin/spark/spark-yarn-client-core/src/main/java/com/dtstack/taier/sparkyarn/sparkyarn/SparkYarnConfig.java
similarity index 100%
rename from taier-worker/taier-worker-plugin/spark/yarn2-hdfs2-spark210-core/spark-yarn-client-core/src/main/java/com/dtstack/taier/sparkyarn/sparkyarn/SparkYarnConfig.java
rename to taier-worker/taier-worker-plugin/spark/spark-yarn-client-core/src/main/java/com/dtstack/taier/sparkyarn/sparkyarn/SparkYarnConfig.java
diff --git a/taier-worker/taier-worker-plugin/spark/yarn2-hdfs2-spark210-core/spark-yarn-client-core/src/main/java/com/dtstack/taier/sparkyarn/sparkyarn/SparkYarnResourceInfo.java b/taier-worker/taier-worker-plugin/spark/spark-yarn-client-core/src/main/java/com/dtstack/taier/sparkyarn/sparkyarn/SparkYarnResourceInfo.java
similarity index 100%
rename from taier-worker/taier-worker-plugin/spark/yarn2-hdfs2-spark210-core/spark-yarn-client-core/src/main/java/com/dtstack/taier/sparkyarn/sparkyarn/SparkYarnResourceInfo.java
rename to taier-worker/taier-worker-plugin/spark/spark-yarn-client-core/src/main/java/com/dtstack/taier/sparkyarn/sparkyarn/SparkYarnResourceInfo.java
diff --git a/taier-worker/taier-worker-plugin/spark/yarn2-hdfs2-spark210-core/spark-yarn-client-core/src/main/java/com/dtstack/taier/sparkyarn/sparkyarn/constant/AppEnvConstant.java b/taier-worker/taier-worker-plugin/spark/spark-yarn-client-core/src/main/java/com/dtstack/taier/sparkyarn/sparkyarn/constant/AppEnvConstant.java
similarity index 100%
rename from taier-worker/taier-worker-plugin/spark/yarn2-hdfs2-spark210-core/spark-yarn-client-core/src/main/java/com/dtstack/taier/sparkyarn/sparkyarn/constant/AppEnvConstant.java
rename to taier-worker/taier-worker-plugin/spark/spark-yarn-client-core/src/main/java/com/dtstack/taier/sparkyarn/sparkyarn/constant/AppEnvConstant.java
diff --git a/taier-worker/taier-worker-plugin/spark/spark-yarn-client-core/src/main/java/com/dtstack/taier/sparkyarn/sparkyarn/constant/SparkConstants.java b/taier-worker/taier-worker-plugin/spark/spark-yarn-client-core/src/main/java/com/dtstack/taier/sparkyarn/sparkyarn/constant/SparkConstants.java
new file mode 100644
index 0000000000..dc9128af8e
--- /dev/null
+++ b/taier-worker/taier-worker-plugin/spark/spark-yarn-client-core/src/main/java/com/dtstack/taier/sparkyarn/sparkyarn/constant/SparkConstants.java
@@ -0,0 +1,58 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.dtstack.taier.sparkyarn.sparkyarn.constant;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+
+public class SparkConstants {
+ public static final String HADOOP_CONF = "__hadoop_conf__";
+
+ public static final String HIVE_SITE = "/hive-site.xml";
+
+ public static final String CORE_SITE = "/core-site.xml";
+
+ public static final String YARN_SITE = "/yarn-site.xml";
+
+ public static final ArrayList FILTER_PARAM =
+ new ArrayList<>(
+ Arrays.asList(
+ "fs.hdfs.impl.disable.cache",
+ "fs.file.impl.disable.cache",
+ "hive.execution.engine"));
+
+ public static final String SPARK_LOG4J_CONTENT =
+ "log4j.rootLogger=INFO,Client\n"
+ + "log4j.logger.Client=INFO,Client\n"
+ + "log4j.additivity.Client = false\n"
+ + "log4j.appender.console.target=System.err\n"
+ + "log4j.appender.Client=org.apache.log4j.ConsoleAppender\n"
+ + "log4j.appender.Client.layout=org.apache.log4j.PatternLayout\n"
+ + "log4j.appender.Client.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss,SSS} %-5p %-60c %x - %m%n";
+
+ public static final String SPARK_JAVA_OPTIONS_LOG4J_CONTENT =
+ "-Dlog4j.configuration=./__spark_conf__/log4j.properties";
+
+
+ public static final String SPARK_DRIVER_EXTRA_JAVA_OPTIONS = "spark.driver.extraJavaOptions";
+
+ public static final String SPARK_EXECUTOR_EXTRA_JAVA_OPTIONS =
+ "spark.executor.extraJavaOptions";
+
+ public static final String LOG_LEVEL_KEY = "logLevel";
+}
\ No newline at end of file
diff --git a/taier-worker/taier-worker-plugin/spark/yarn2-hdfs2-spark210-core/spark-yarn-client-core/src/main/java/com/dtstack/taier/sparkyarn/sparkyarn/enums/ExceptionInfoConstrant.java b/taier-worker/taier-worker-plugin/spark/spark-yarn-client-core/src/main/java/com/dtstack/taier/sparkyarn/sparkyarn/enums/ExceptionInfoConstrant.java
similarity index 100%
rename from taier-worker/taier-worker-plugin/spark/yarn2-hdfs2-spark210-core/spark-yarn-client-core/src/main/java/com/dtstack/taier/sparkyarn/sparkyarn/enums/ExceptionInfoConstrant.java
rename to taier-worker/taier-worker-plugin/spark/spark-yarn-client-core/src/main/java/com/dtstack/taier/sparkyarn/sparkyarn/enums/ExceptionInfoConstrant.java
diff --git a/taier-worker/taier-worker-plugin/spark/yarn2-hdfs2-spark210-core/spark-yarn-client-core/src/main/java/com/dtstack/taier/sparkyarn/sparkyarn/enums/Status.java b/taier-worker/taier-worker-plugin/spark/spark-yarn-client-core/src/main/java/com/dtstack/taier/sparkyarn/sparkyarn/enums/Status.java
similarity index 100%
rename from taier-worker/taier-worker-plugin/spark/yarn2-hdfs2-spark210-core/spark-yarn-client-core/src/main/java/com/dtstack/taier/sparkyarn/sparkyarn/enums/Status.java
rename to taier-worker/taier-worker-plugin/spark/spark-yarn-client-core/src/main/java/com/dtstack/taier/sparkyarn/sparkyarn/enums/Status.java
diff --git a/taier-worker/taier-worker-plugin/spark/yarn2-hdfs2-spark210-core/spark-yarn-client-core/src/main/java/com/dtstack/taier/sparkyarn/sparkyarn/file/ResourceCleaner.java b/taier-worker/taier-worker-plugin/spark/spark-yarn-client-core/src/main/java/com/dtstack/taier/sparkyarn/sparkyarn/file/ResourceCleaner.java
similarity index 100%
rename from taier-worker/taier-worker-plugin/spark/yarn2-hdfs2-spark210-core/spark-yarn-client-core/src/main/java/com/dtstack/taier/sparkyarn/sparkyarn/file/ResourceCleaner.java
rename to taier-worker/taier-worker-plugin/spark/spark-yarn-client-core/src/main/java/com/dtstack/taier/sparkyarn/sparkyarn/file/ResourceCleaner.java
diff --git a/taier-worker/taier-worker-plugin/spark/spark-yarn-client-core/src/main/java/com/dtstack/taier/sparkyarn/sparkyarn/file/SparkResourceUploader.java b/taier-worker/taier-worker-plugin/spark/spark-yarn-client-core/src/main/java/com/dtstack/taier/sparkyarn/sparkyarn/file/SparkResourceUploader.java
new file mode 100644
index 0000000000..d020d00b8c
--- /dev/null
+++ b/taier-worker/taier-worker-plugin/spark/spark-yarn-client-core/src/main/java/com/dtstack/taier/sparkyarn/sparkyarn/file/SparkResourceUploader.java
@@ -0,0 +1,286 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.dtstack.taier.sparkyarn.sparkyarn.file;
+
+import com.dtstack.taier.base.filesystem.FilesystemManager;
+import com.dtstack.taier.base.util.KerberosUtils;
+import com.dtstack.taier.pluginapi.constrant.ConfigConstant;
+import com.dtstack.taier.pluginapi.exception.ExceptionUtil;
+import com.dtstack.taier.pluginapi.exception.PluginDefineException;
+import com.dtstack.taier.sparkyarn.sparkyarn.SparkYarnConfig;
+import com.dtstack.taier.sparkyarn.sparkyarn.SparkYarnResourceInfo;
+import org.apache.commons.lang3.StringUtils;
+import org.apache.hadoop.fs.FileSystem;
+import org.apache.hadoop.fs.Path;
+import org.apache.hadoop.fs.permission.FsPermission;
+import org.apache.hadoop.yarn.conf.YarnConfiguration;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.io.File;
+import java.io.FileWriter;
+import java.io.IOException;
+import java.lang.reflect.Method;
+import java.net.InetAddress;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.Map;
+import java.util.Map.Entry;
+import java.util.Properties;
+
+import static com.dtstack.taier.sparkyarn.sparkyarn.constant.SparkConstants.*;
+
+public class SparkResourceUploader {
+
+ private static final Logger logger = LoggerFactory.getLogger(SparkResourceUploader.class);
+
+ public static final String SP = File.separator;
+
+ // default hdfs resource cleaner rate
+ public static final String SPARK_DEFAULT_CLEAR_RESOURCED_RATE = "30";
+
+ private final YarnConfiguration yarnConf;
+
+ private final Properties sparkExtProp;
+
+ private final SparkYarnConfig sparkYarnConfig;
+
+
+
+ private final FilesystemManager filesystemManager;
+
+ public SparkResourceUploader(
+ YarnConfiguration yarnConf,
+ SparkYarnConfig sparkYarnConfig,
+ Properties sparkExtProp,
+ FilesystemManager filesystemManager) {
+ this.yarnConf = yarnConf;
+ this.sparkExtProp = sparkExtProp;
+ this.sparkYarnConfig = sparkYarnConfig;
+ this.filesystemManager = filesystemManager;
+ }
+
+ public void uploadSparkResource() {
+ Object sparkResourcesDirProp = sparkExtProp.get(SparkYarnResourceInfo.SPARK_RESOURCES_DIR);
+ if (sparkResourcesDirProp == null || StringUtils.isBlank(sparkResourcesDirProp.toString())) {
+ sparkResourcesDirProp = SparkYarnResourceInfo.DEFAULT_SPARK_RESOURCES_DIR;
+ }
+ final String sparkResourcesDir = sparkResourcesDirProp.toString();
+ String md5sum = sparkYarnConfig.getMd5sum();
+ String sparkClearResourceRate =
+ sparkExtProp
+ .getOrDefault(
+ SparkYarnResourceInfo.SPARK_CLEAR_RESOURCED_RATE,
+ SPARK_DEFAULT_CLEAR_RESOURCED_RATE)
+ .toString();
+ try {
+ KerberosUtils.login(
+ sparkYarnConfig,
+ () -> {
+ try {
+ FileSystem fileSystem = FileSystem.get(yarnConf);
+ String hostName = InetAddress.getLocalHost().getHostName();
+ String sparkResourcesDirHostName =
+ sparkResourcesDir + SparkResourceUploader.SP + hostName;
+ String sparkResourcesDirMd5sum =
+ sparkResourcesDir
+ + SparkResourceUploader.SP
+ + hostName
+ + SparkResourceUploader.SP
+ + md5sum;
+ ResourceCleaner.start(
+ fileSystem,
+ sparkResourcesDirHostName,
+ sparkResourcesDirMd5sum,
+ sparkClearResourceRate);
+ uploadHadoopConf(fileSystem, sparkResourcesDirMd5sum);
+ uploadSparkSqlProxy(fileSystem, sparkResourcesDirMd5sum);
+ uploadKerberosConf(fileSystem, sparkResourcesDirMd5sum);
+
+
+ } catch (IOException e) {
+ throw new PluginDefineException("upload hadoop conf", e);
+ }
+ return null;
+ },
+ yarnConf);
+ } catch (Exception e) {
+ throw new PluginDefineException("upload hadoop conf", e);
+ }
+ }
+
+ private void uploadSparkSqlProxy(FileSystem fileSystem, String sparkResourcesDirMd5sum) {
+ try {
+ Path localPath = new Path(getSqlProxyJarPath());
+ logger.info("local path {}", localPath);
+ String sparkSqlProxyPath = sparkResourcesDirMd5sum + "/spark-sql-proxy.jar";
+ Path remotePath = new Path(sparkSqlProxyPath);
+ fileSystem.copyFromLocalFile(localPath, remotePath);
+ sparkYarnConfig.setSparkSqlProxyPath(sparkSqlProxyPath);
+ } catch (IOException e) {
+ throw new PluginDefineException("upload spark sql proxy failed", e);
+ }
+ }
+
+ private String getSqlProxyJarPath() {
+ String path = this.getClass().getProtectionDomain().getCodeSource().getLocation().getPath();
+
+ File pluginDir = new File(path).getParentFile().getParentFile();
+ File[] sqlProxyDir =
+ pluginDir.listFiles(
+ (dir, name) ->
+ dir.isDirectory()
+ && name.toLowerCase().startsWith("spark-sql-proxy"));
+ if (sqlProxyDir != null && sqlProxyDir.length == 1) {
+ File[] sqlProxyJars = sqlProxyDir[0].listFiles();
+ if (sqlProxyJars != null && sqlProxyJars.length == 1) {
+ String sqlProxyJar = sqlProxyJars[0].getName();
+ if (sqlProxyJar.toLowerCase().startsWith("spark-sql-proxy") && sqlProxyJar.toLowerCase().endsWith(".jar")) {
+ return sqlProxyJars[0].getAbsolutePath();
+ }
+ }
+ }
+ throw new PluginDefineException(
+ "Can not find spark sql proxy jar in path: " + pluginDir);
+ }
+
+
+ public void uploadKerberosConf(FileSystem fileSystem, String sparkResourcesDirMd5sum) {
+ if (sparkYarnConfig.isOpenKerberos()) {
+ try {
+ String keytab = KerberosUtils.getKeytabPath(sparkYarnConfig);
+ String krb5 = new File(keytab).getParent() + File.separator + ConfigConstant.KRB5_CONF;
+ String remoteKeytab =
+ sparkResourcesDirMd5sum + File.separator + new File(keytab).getName();
+ String remoteKrb5 =
+ sparkResourcesDirMd5sum + File.separator + new File(krb5).getName();
+
+ fileSystem.copyFromLocalFile(new Path(keytab), new Path(remoteKeytab));
+ fileSystem.copyFromLocalFile(new Path(krb5), new Path(remoteKrb5));
+ sparkExtProp.setProperty(ConfigConstant.SPARK_KERBEROS_REMOTE_KEYTAB, remoteKeytab);
+ sparkExtProp.setProperty(ConfigConstant.SPARK_KERBEROS_REMOTE_KRB5, remoteKrb5);
+ } catch (IOException e) {
+ throw new PluginDefineException("upload kerberos conf failed", e);
+ }
+ }
+ }
+
+
+ public void uploadHadoopConf(FileSystem fileSystem, String sparkResourcesDirMd5sum) {
+ try {
+ Class clazz = Class.forName("org.apache.hadoop.conf.Configuration");
+ Method method = clazz.getDeclaredMethod("getOverlay");
+ method.setAccessible(true);
+ Properties yarnConfProp = (Properties) method.invoke(yarnConf);
+ Map yarnConfMap = new HashMap<>();
+ for (Map.Entry