From 427971d84ae7070c72d819a43dadf71dfbe9aab7 Mon Sep 17 00:00:00 2001 From: Xiduo You Date: Wed, 8 Nov 2023 12:05:13 +0800 Subject: [PATCH] [CORE] Refine maven Spark dependency (#3625) - Remove the profile in shim and ut module, so when we add a new Spark version, we do not need change these two modules. Instead, add spark.shim.module and spark.test.module. - Remove spark32, spark33, spark34 properties, we only need spark.version and change it in each spark version profile - Remove the spark-hive-thriftserver dependency --- backends-clickhouse/pom.xml | 2 +- backends-velox/pom.xml | 6 --- gluten-celeborn/clickhouse/pom.xml | 4 +- gluten-celeborn/package/pom.xml | 2 +- gluten-core/pom.xml | 2 +- gluten-ut/pom.xml | 32 +------------ package/pom.xml | 5 +- pom.xml | 77 ++++++++++++------------------ shims/common/pom.xml | 2 - shims/pom.xml | 28 ----------- shims/spark32/pom.xml | 7 --- shims/spark33/pom.xml | 7 --- shims/spark34/pom.xml | 7 --- 13 files changed, 40 insertions(+), 141 deletions(-) diff --git a/backends-clickhouse/pom.xml b/backends-clickhouse/pom.xml index 7a932b3589fe..fa1989758f7d 100644 --- a/backends-clickhouse/pom.xml +++ b/backends-clickhouse/pom.xml @@ -53,7 +53,7 @@ org.apache.spark - spark-hive-thriftserver_${scala.binary.version} + spark-hive_${scala.binary.version} provided diff --git a/backends-velox/pom.xml b/backends-velox/pom.xml index 3a42df280f2a..10ff8909b757 100755 --- a/backends-velox/pom.xml +++ b/backends-velox/pom.xml @@ -55,15 +55,9 @@ spark-catalyst_${scala.binary.version} provided - - org.apache.spark - spark-hive-thriftserver_${scala.binary.version} - provided - org.apache.spark spark-hive_${scala.binary.version} - ${spark.version} provided diff --git a/gluten-celeborn/clickhouse/pom.xml b/gluten-celeborn/clickhouse/pom.xml index 8a5f0337c244..e71dce47d3b6 100755 --- a/gluten-celeborn/clickhouse/pom.xml +++ b/gluten-celeborn/clickhouse/pom.xml @@ -75,9 +75,7 @@ org.apache.spark - spark-hive-thriftserver_${scala.binary.version} - ${spark.version} - test-jar + spark-hive_${scala.binary.version} test diff --git a/gluten-celeborn/package/pom.xml b/gluten-celeborn/package/pom.xml index 6604fc0006cc..3613d308edbe 100644 --- a/gluten-celeborn/package/pom.xml +++ b/gluten-celeborn/package/pom.xml @@ -11,7 +11,7 @@ gluten-celeborn-package jar - Gluten Celeborn Common + Gluten Celeborn Package diff --git a/gluten-core/pom.xml b/gluten-core/pom.xml index 14fa2bdfabc2..17fd77841425 100644 --- a/gluten-core/pom.xml +++ b/gluten-core/pom.xml @@ -52,7 +52,7 @@ org.apache.spark - spark-hive-thriftserver_${scala.binary.version} + spark-hive_${scala.binary.version} provided diff --git a/gluten-ut/pom.xml b/gluten-ut/pom.xml index 2e9464c1a21c..f0dc9ebbc8bd 100644 --- a/gluten-ut/pom.xml +++ b/gluten-ut/pom.xml @@ -54,7 +54,7 @@ org.apache.spark - spark-hive-thriftserver_${scala.binary.version} + spark-hive_${scala.binary.version} provided @@ -174,35 +174,5 @@ - - - - - spark-3.2 - - true - - - - - spark32 - common - - - - spark-3.3 - - spark33 - common - - - - spark-3.4 - - spark34 - common - - - diff --git a/package/pom.xml b/package/pom.xml index 262391a67673..af65203dfc79 100644 --- a/package/pom.xml +++ b/package/pom.xml @@ -50,7 +50,7 @@ org.apache.spark - spark-hive-thriftserver_${scala.binary.version} + spark-hive_${scala.binary.version} provided @@ -198,6 +198,9 @@ org.apache.spark.unused.UnusedStubClass javax.jdo.* + + javax.transaction.* + javax.xml.* org.apache.commons.logging.* diff --git a/pom.xml b/pom.xml index 4a7cd4a8560e..a38017476e54 100644 --- a/pom.xml +++ b/pom.xml @@ -30,36 +30,31 @@ - shims gluten-core + gluten-ui package + shims + shims/common + shims/${spark.shim.module} substrait/substrait-spark - gluten-ui 2.9.3 - 3.2.2 - 2.12.15 - 3.2 - 3.3.1 - 3.4.1 - 2.12.15 - 3.3 - 3.4 - 2.0.1 - 2.2.0 - ${delta20.version} + 2.0.1 20 2.12 - ${spark32.scala} - ${spark32.version} + 2.12.15 3 + 3.2 + spark32 + spark32 + 3.2.2 + spark-sql-columnar-shims-${spark.shim.module} 0.3.0-incubating - ${spark32bundle.version} 12.0.0 arrow-memory-unsafe - ${hadoop.version} + 2.7.4 UTF-8 UTF-8 spark-sql-columnar @@ -70,8 +65,7 @@ /usr/local/clickhouse/lib/libch.so /data/tpcds-data-sf1 - 2.13.3 - ${fasterxml.spark33.version} + 2.13.3 4.13.1 0.5.0 @@ -106,9 +100,6 @@ 3.2.2 1.0.0 2.2.0 - spark-sql-columnar-shims-spark32 - spark-sql-columnar-shims-spark33 - spark-sql-columnar-shims-spark34 @@ -118,46 +109,38 @@ true - ${spark32.scala} - 3 - ${spark32.version} - ${delta20.version} + 3.2 + spark32 + spark32 + 3.2.2 + 2.0.1 20 - ${spark32bundle.version} - ${spark32.shim.version} spark-3.3 - ${spark33.scala} - 3 - ${spark33.version} - ${delta22.version} + 3.3 + spark33 + spark33 + 3.3.1 + 2.2.0 22 - ${spark33bundle.version} - ${spark33.shim.version} spark-3.4 - ${spark33.scala} - 3 - ${spark34.version} - ${delta22.version} + 3.4 + spark34 + spark34 + 3.4.1 + 2.2.0 22 - ${spark34bundle.version} - ${spark34.shim.version} hadoop-2.7.4 - - - !hadoop.version - - 2.7.4 @@ -237,6 +220,8 @@ spark-ut gluten-ut + gluten-ut/common + gluten-ut/${spark.test.module} @@ -286,7 +271,7 @@ org.apache.spark - spark-hive-thriftserver_${scala.binary.version} + spark-hive_${scala.binary.version} ${spark.version} provided diff --git a/shims/common/pom.xml b/shims/common/pom.xml index 88c4feaac14f..70ec2a1c2a65 100644 --- a/shims/common/pom.xml +++ b/shims/common/pom.xml @@ -32,13 +32,11 @@ org.apache.spark spark-sql_${scala.binary.version} - ${spark.version} provided org.apache.spark spark-hive_${scala.binary.version} - ${spark.version} provided diff --git a/shims/pom.xml b/shims/pom.xml index de29d4df09e7..520d6c218a20 100644 --- a/shims/pom.xml +++ b/shims/pom.xml @@ -46,7 +46,6 @@ org.apache.hadoop hadoop-client - ${hadoop.version} @@ -64,32 +63,5 @@ - - - - spark-3.2 - - true - - - common - spark32 - - - - spark-3.3 - - common - spark33 - - - - spark-3.4 - - common - spark34 - - - diff --git a/shims/spark32/pom.xml b/shims/spark32/pom.xml index b46255d76067..44eb72dce289 100644 --- a/shims/spark32/pom.xml +++ b/shims/spark32/pom.xml @@ -38,21 +38,18 @@ org.apache.spark spark-sql_${scala.binary.version} - ${spark32.version} provided true org.apache.spark spark-catalyst_2.12 - ${spark32.version} provided true org.apache.spark spark-core_2.12 - ${spark32.version} provided true @@ -72,25 +69,21 @@ org.apache.spark spark-core_${scala.binary.version} - ${spark32.version} test-jar org.apache.spark spark-sql_${scala.binary.version} - ${spark32.version} test-jar org.apache.spark spark-catalyst_${scala.binary.version} - ${spark32.version} test-jar org.apache.spark spark-hive_${scala.binary.version} - ${spark.version} provided diff --git a/shims/spark33/pom.xml b/shims/spark33/pom.xml index 075610347ffc..c9bf97c2fa85 100644 --- a/shims/spark33/pom.xml +++ b/shims/spark33/pom.xml @@ -38,21 +38,18 @@ org.apache.spark spark-sql_${scala.binary.version} - ${spark33.version} provided true org.apache.spark spark-catalyst_2.12 - ${spark33.version} provided true org.apache.spark spark-core_2.12 - ${spark33.version} provided true @@ -72,25 +69,21 @@ org.apache.spark spark-core_${scala.binary.version} - ${spark33.version} test-jar org.apache.spark spark-sql_${scala.binary.version} - ${spark33.version} test-jar org.apache.spark spark-catalyst_${scala.binary.version} - ${spark33.version} test-jar org.apache.spark spark-hive_${scala.binary.version} - ${spark.version} provided diff --git a/shims/spark34/pom.xml b/shims/spark34/pom.xml index 89a73ca4fffd..5b10f8761bbc 100644 --- a/shims/spark34/pom.xml +++ b/shims/spark34/pom.xml @@ -38,21 +38,18 @@ org.apache.spark spark-sql_${scala.binary.version} - ${spark34.version} provided true org.apache.spark spark-catalyst_2.12 - ${spark34.version} provided true org.apache.spark spark-core_2.12 - ${spark34.version} provided true @@ -72,25 +69,21 @@ org.apache.spark spark-core_${scala.binary.version} - ${spark34.version} test-jar org.apache.spark spark-sql_${scala.binary.version} - ${spark34.version} test-jar org.apache.spark spark-catalyst_${scala.binary.version} - ${spark34.version} test-jar org.apache.spark spark-hive_${scala.binary.version} - ${spark.version} provided