From adaae24eac735776a3f969690074684413c13435 Mon Sep 17 00:00:00 2001
From: vainhope <845869847@qq.com>
Date: Tue, 24 Oct 2023 15:58:53 +0800
Subject: [PATCH] [feat_spark320][taier-all] support spark 3.2.0 version
---
pom.xml | 15 +-
sql/1.5/1.5_increment.sql | 95 +
sql/init.sql | 99 +-
taier-common/pom.xml | 2 +-
.../convert/utils/AbstractAssertUtils.java | 123 -
.../develop/impl/DevelopSelectSqlService.java | 1 +
.../develop/saver/AbstractTaskSaver.java | 4 +
.../develop/saver/DefaultTaskSaver.java | 5 +-
taier-datasource/pom.xml | 2 +-
.../datasource/api/base/ClientCache.java | 16 +
taier-ui/src/components/scaffolds/create.tsx | 2 +-
.../pluginapi/constrant/ConfigConstant.java | 7 +
.../taier/base/util/KerberosUtils.java | 2 +-
.../flink/yarn3-hdfs3-flink112/pom.xml | 15 +
taier-worker/taier-worker-plugin/pom.xml | 2 +-
.../yarn2-hdfs2-script/script-client/pom.xml | 6 -
.../yarn3-hdfs3-script/script-client/pom.xml | 5 -
.../taier-worker-plugin/spark/pom.xml | 238 +-
.../spark-sql-proxy/pom.xml | 80 +-
.../com/dtstack/taier/sql/main/SqlProxy.java | 4 +-
.../dtstack/taier/sql/main/util/ZipUtil.java | 0
.../spark/spark-yarn-client-core/pom.xml | 117 +
.../taier/sparkyarn/sparkext/ClientExt.java | 40 +
.../sparkyarn/sparkext/ClientExtFactory.java | 11 +-
.../sparkyarn/sparkyarn/SparkJobLog.java | 0
.../sparkyarn/sparkyarn/SparkYarnClient.java | 70 +-
.../sparkyarn/sparkyarn/SparkYarnConfig.java | 0
.../sparkyarn/SparkYarnResourceInfo.java | 0
.../sparkyarn/constant/AppEnvConstant.java | 0
.../sparkyarn/constant/SparkConstants.java | 58 +
.../enums/ExceptionInfoConstrant.java | 0
.../sparkyarn/sparkyarn/enums/Status.java | 0
.../sparkyarn/file/ResourceCleaner.java | 0
.../sparkyarn/file/SparkResourceUploader.java | 286 ++
.../sparkyarn/parser/AddJarOperator.java | 0
.../sparkyarn/sparkyarn/util/HadoopConf.java | 0
.../hadoop/security/UserGroupInformation.java | 0
.../deploy/rest/DtRestSubmissionClient.scala | 0
.../apache/spark/deploy/yarn/DtClient.scala | 288 +-
.../apache/spark/deploy/yarn/DtConfig.scala | 14 +
.../spark/yarn-hdfs-spark210-core/pom.xml | 45 +
.../spark/yarn-hdfs-spark320-core/pom.xml | 125 +
.../spark/common/constant/ConfigConstant.java | 57 +
.../spark/common/constant/SparkConstants.java | 145 +
.../hadoop/security/UserGroupInformation.java | 2930 +++++++++--------
.../apache/spark/deploy/yarn/DtClient.scala | 1646 +++++++++
.../spark/yarn2-hdfs2-spark210-core/pom.xml | 27 -
.../spark-sql-proxy-core/pom.xml | 66 -
.../spark-yarn-client-core/pom.xml | 204 --
.../taier/sparkyarn/sparkext/ClientExt.java | 136 -
.../sparkyarn/file/SparkResourceUploader.java | 143 -
.../spark/yarn2-hdfs2-spark210/pom.xml | 128 +-
.../spark-yarn-client/pom.xml | 223 --
.../hadoop/security/UserGroupInformation.java | 1794 ----------
...com.dtstack.taier.pluginapi.client.IClient | 0
.../spark/yarn2-hdfs2-spark320/pom.xml | 160 +
...com.dtstack.taier.pluginapi.client.IClient | 0
.../spark/yarn3-hdfs3-spark210/pom.xml | 159 +-
.../spark-sql-proxy/pom.xml | 130 -
.../spark-yarn-client/pom.xml | 215 --
...com.dtstack.taier.pluginapi.client.IClient | 16 +
.../spark/yarn3-hdfs3-spark320/pom.xml | 161 +
...com.dtstack.taier.pluginapi.client.IClient | 16 +
website/docs/functions/component/spark.md | 3 +-
website/docs/functions/task/sync.md | 42 +-
website/docs/quickstart/deploy/docker.md | 2 +-
website/docs/quickstart/rely.md | 7 +-
67 files changed, 5481 insertions(+), 4706 deletions(-)
create mode 100644 sql/1.5/1.5_increment.sql
delete mode 100644 taier-data-develop/src/main/java/com/dtstack/taier/develop/datasource/convert/utils/AbstractAssertUtils.java
rename taier-worker/taier-worker-plugin/spark/{yarn2-hdfs2-spark210 => }/spark-sql-proxy/pom.xml (56%)
rename taier-worker/taier-worker-plugin/spark/{yarn2-hdfs2-spark210-core/spark-sql-proxy-core => spark-sql-proxy}/src/main/java/com/dtstack/taier/sql/main/SqlProxy.java (98%)
rename taier-worker/taier-worker-plugin/spark/{yarn2-hdfs2-spark210-core/spark-sql-proxy-core => spark-sql-proxy}/src/main/java/com/dtstack/taier/sql/main/util/ZipUtil.java (100%)
create mode 100644 taier-worker/taier-worker-plugin/spark/spark-yarn-client-core/pom.xml
create mode 100644 taier-worker/taier-worker-plugin/spark/spark-yarn-client-core/src/main/java/com/dtstack/taier/sparkyarn/sparkext/ClientExt.java
rename taier-worker/taier-worker-plugin/spark/{yarn2-hdfs2-spark210-core => }/spark-yarn-client-core/src/main/java/com/dtstack/taier/sparkyarn/sparkext/ClientExtFactory.java (77%)
rename taier-worker/taier-worker-plugin/spark/{yarn2-hdfs2-spark210-core => }/spark-yarn-client-core/src/main/java/com/dtstack/taier/sparkyarn/sparkyarn/SparkJobLog.java (100%)
rename taier-worker/taier-worker-plugin/spark/{yarn2-hdfs2-spark210-core => }/spark-yarn-client-core/src/main/java/com/dtstack/taier/sparkyarn/sparkyarn/SparkYarnClient.java (95%)
rename taier-worker/taier-worker-plugin/spark/{yarn2-hdfs2-spark210-core => }/spark-yarn-client-core/src/main/java/com/dtstack/taier/sparkyarn/sparkyarn/SparkYarnConfig.java (100%)
rename taier-worker/taier-worker-plugin/spark/{yarn2-hdfs2-spark210-core => }/spark-yarn-client-core/src/main/java/com/dtstack/taier/sparkyarn/sparkyarn/SparkYarnResourceInfo.java (100%)
rename 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 (100%)
create mode 100644 taier-worker/taier-worker-plugin/spark/spark-yarn-client-core/src/main/java/com/dtstack/taier/sparkyarn/sparkyarn/constant/SparkConstants.java
rename 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 (100%)
rename 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 (100%)
rename 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 (100%)
create mode 100644 taier-worker/taier-worker-plugin/spark/spark-yarn-client-core/src/main/java/com/dtstack/taier/sparkyarn/sparkyarn/file/SparkResourceUploader.java
rename taier-worker/taier-worker-plugin/spark/{yarn2-hdfs2-spark210-core => }/spark-yarn-client-core/src/main/java/com/dtstack/taier/sparkyarn/sparkyarn/parser/AddJarOperator.java (100%)
rename taier-worker/taier-worker-plugin/spark/{yarn2-hdfs2-spark210-core => }/spark-yarn-client-core/src/main/java/com/dtstack/taier/sparkyarn/sparkyarn/util/HadoopConf.java (100%)
rename taier-worker/taier-worker-plugin/spark/{yarn2-hdfs2-spark210-core => }/spark-yarn-client-core/src/main/java/org/apache/hadoop/security/UserGroupInformation.java (100%)
rename taier-worker/taier-worker-plugin/spark/{yarn2-hdfs2-spark210-core => }/spark-yarn-client-core/src/main/scala/org/apache/spark/deploy/rest/DtRestSubmissionClient.scala (100%)
rename taier-worker/taier-worker-plugin/spark/{yarn2-hdfs2-spark210-core => }/spark-yarn-client-core/src/main/scala/org/apache/spark/deploy/yarn/DtClient.scala (95%)
create mode 100644 taier-worker/taier-worker-plugin/spark/spark-yarn-client-core/src/main/scala/org/apache/spark/deploy/yarn/DtConfig.scala
create mode 100644 taier-worker/taier-worker-plugin/spark/yarn-hdfs-spark210-core/pom.xml
create mode 100644 taier-worker/taier-worker-plugin/spark/yarn-hdfs-spark320-core/pom.xml
create mode 100644 taier-worker/taier-worker-plugin/spark/yarn-hdfs-spark320-core/src/main/java/com/dtstack/taier/spark/common/constant/ConfigConstant.java
create mode 100644 taier-worker/taier-worker-plugin/spark/yarn-hdfs-spark320-core/src/main/java/com/dtstack/taier/spark/common/constant/SparkConstants.java
rename taier-worker/taier-worker-plugin/spark/{yarn3-hdfs3-spark210/spark-yarn-client => yarn-hdfs-spark320-core}/src/main/java/org/apache/hadoop/security/UserGroupInformation.java (54%)
create mode 100644 taier-worker/taier-worker-plugin/spark/yarn-hdfs-spark320-core/src/main/scala/org/apache/spark/deploy/yarn/DtClient.scala
delete mode 100644 taier-worker/taier-worker-plugin/spark/yarn2-hdfs2-spark210-core/pom.xml
delete mode 100644 taier-worker/taier-worker-plugin/spark/yarn2-hdfs2-spark210-core/spark-sql-proxy-core/pom.xml
delete mode 100644 taier-worker/taier-worker-plugin/spark/yarn2-hdfs2-spark210-core/spark-yarn-client-core/pom.xml
delete mode 100644 taier-worker/taier-worker-plugin/spark/yarn2-hdfs2-spark210-core/spark-yarn-client-core/src/main/java/com/dtstack/taier/sparkyarn/sparkext/ClientExt.java
delete mode 100644 taier-worker/taier-worker-plugin/spark/yarn2-hdfs2-spark210-core/spark-yarn-client-core/src/main/java/com/dtstack/taier/sparkyarn/sparkyarn/file/SparkResourceUploader.java
delete mode 100644 taier-worker/taier-worker-plugin/spark/yarn2-hdfs2-spark210/spark-yarn-client/pom.xml
delete mode 100644 taier-worker/taier-worker-plugin/spark/yarn2-hdfs2-spark210/spark-yarn-client/src/main/java/org/apache/hadoop/security/UserGroupInformation.java
rename taier-worker/taier-worker-plugin/spark/yarn2-hdfs2-spark210/{spark-yarn-client => }/src/main/resources/META-INF/services/com.dtstack.taier.pluginapi.client.IClient (100%)
create mode 100644 taier-worker/taier-worker-plugin/spark/yarn2-hdfs2-spark320/pom.xml
rename taier-worker/taier-worker-plugin/spark/{yarn3-hdfs3-spark210/spark-yarn-client => yarn2-hdfs2-spark320}/src/main/resources/META-INF/services/com.dtstack.taier.pluginapi.client.IClient (100%)
delete mode 100644 taier-worker/taier-worker-plugin/spark/yarn3-hdfs3-spark210/spark-sql-proxy/pom.xml
delete mode 100644 taier-worker/taier-worker-plugin/spark/yarn3-hdfs3-spark210/spark-yarn-client/pom.xml
create mode 100644 taier-worker/taier-worker-plugin/spark/yarn3-hdfs3-spark210/src/main/resources/META-INF/services/com.dtstack.taier.pluginapi.client.IClient
create mode 100644 taier-worker/taier-worker-plugin/spark/yarn3-hdfs3-spark320/pom.xml
create mode 100644 taier-worker/taier-worker-plugin/spark/yarn3-hdfs3-spark320/src/main/resources/META-INF/services/com.dtstack.taier.pluginapi.client.IClient
diff --git a/pom.xml b/pom.xml
index 9c38677d62..af3920b6c0 100644
--- a/pom.xml
+++ b/pom.xml
@@ -206,6 +206,19 @@
oss-sonatype
https://oss.sonatype.org/content/repositories/releases/
+
+
+ pentaho
+ public.nexus.pentaho.org
+ https://public.nexus.pentaho.org/repository/proxy-public-3rd-party-release
+ default
+
+ true
+
+
+ false
+
+
@@ -283,7 +296,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/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..ac72d92961 100644
--- a/taier-datasource/pom.xml
+++ b/taier-datasource/pom.xml
@@ -30,7 +30,7 @@
org.slf4j
slf4j-api
1.7.21
- provided
+
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-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/flink/yarn3-hdfs3-flink112/pom.xml b/taier-worker/taier-worker-plugin/flink/yarn3-hdfs3-flink112/pom.xml
index 14fb1fa55a..24483c7825 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,21 @@
+
+
+ pentaho
+ public.nexus.pentaho.org
+ https://public.nexus.pentaho.org/repository/proxy-public-3rd-party-release
+ default
+
+ true
+
+
+ false
+
+
+
+
diff --git a/taier-worker/taier-worker-plugin/pom.xml b/taier-worker/taier-worker-plugin/pom.xml
index 5c1a7d75c8..2b3f58e38e 100644
--- a/taier-worker/taier-worker-plugin/pom.xml
+++ b/taier-worker/taier-worker-plugin/pom.xml
@@ -164,7 +164,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/yarn3-hdfs3-script/script-client/pom.xml b/taier-worker/taier-worker-plugin/script/yarn3-hdfs3-script/script-client/pom.xml
index c941f86e64..1c77fb5c7c 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
diff --git a/taier-worker/taier-worker-plugin/spark/pom.xml b/taier-worker/taier-worker-plugin/spark/pom.xml
index 2e4f7ff13b..857407ba5f 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.0.0
+
+
+
+ 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