Skip to content

Commit 022f52b

Browse files
pan3793yaooqinn
authored andcommitted
[KYUUBI #1460] Bump Hudi 0.10.0
### _Why are the changes needed?_ https://hudi.apache.org/releases/release-0.10.0 Switch test from Hudi 0.9.0 & Spark 3.0 to Hudi 1.10.0 & Spark 3.1. Drop test of Spark 3.0 because 1. Hudi 1.10.0 claims to support Spark 3.0 but requires to build by self with specific maven profile, the published jar only support Spark 3.1 2. Hudi has lots of transitive deps and there are different in different versions, it's hard to maintain multi hudi versions. ### _How was this patch tested?_ - [x] Add some test cases that check the changes thoroughly including negative and positive cases if possible - [ ] Add screenshots for manual tests if appropriate - [x] [Run test](https://kyuubi.readthedocs.io/en/latest/develop_tools/testing.html#running-tests) locally before make a pull request Closes #1460 from pan3793/hudi. Closes #1460 bac633a [Cheng Pan] Update comments 0ab8784 [Cheng Pan] Pin hadoop-common c811e67 [Cheng Pan] Exclude scala-library 63cad3b [Cheng Pan] Exclude hudi-aws a13708f [Cheng Pan] Disable Hudi test on Spark 3.0 4b179ba [Cheng Pan] Enable Hudi test in Spark 3.1 79dca54 [Cheng Pan] Bump Hudi 0.10.0 7198289 [Cheng Pan] Add default Pk col Authored-by: Cheng Pan <chengpan@apache.org> Signed-off-by: Kent Yao <yao@apache.org>
1 parent 77a2787 commit 022f52b

File tree

2 files changed

+43
-4
lines changed

2 files changed

+43
-4
lines changed

kyuubi-common/src/test/scala/org/apache/kyuubi/operation/HudiMetadataTests.scala

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,17 +120,22 @@ trait HudiMetadataTests extends HiveJDBCTestHelper with HudiSuiteMixin {
120120
val cols = dataTypes.zipWithIndex.map { case (dt, idx) => s"c$idx" -> dt }
121121
val (colNames, _) = cols.unzip
122122

123-
val reservedCols = Seq(
123+
val metadataCols = Seq(
124124
"_hoodie_commit_time",
125125
"_hoodie_commit_seqno",
126126
"_hoodie_record_key",
127127
"_hoodie_partition_path",
128128
"_hoodie_file_name")
129129

130+
val defaultPkCol = "uuid"
131+
132+
val reservedCols = metadataCols :+ defaultPkCol
133+
130134
val tableName = "hudi_get_col_operation"
131135
val ddl =
132136
s"""
133137
|CREATE TABLE IF NOT EXISTS $catalog.$defaultSchema.$tableName (
138+
| $defaultPkCol string,
134139
| ${cols.map { case (cn, dt) => cn + " " + dt }.mkString(",\n")}
135140
|)
136141
|USING hudi""".stripMargin

pom.xml

Lines changed: 37 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@
109109
<hadoop.version>3.3.1</hadoop.version>
110110
<hadoop.binary.version>3.2</hadoop.binary.version>
111111
<hive.version>2.3.9</hive.version>
112-
<hudi.version>0.9.0</hudi.version>
112+
<hudi.version>0.10.0</hudi.version>
113113
<iceberg.name>iceberg-spark3-runtime</iceberg.name>
114114
<iceberg.version>0.12.1</iceberg.version>
115115
<jackson.version>2.12.5</jackson.version>
@@ -777,6 +777,27 @@
777777
</dependency>
778778

779779
<!-- Hudi dependency -->
780+
<!--
781+
We don't use hadoop-common directly, it's only for suppressing exception:
782+
Failed to execute goal org.apache.maven.plugins:maven-shade-plugin:3.2.4:shade (default) on project
783+
kyuubi-spark-sql-engine_2.12: Error creating shaded jar: Could not resolve following dependencies:
784+
[jdk.tools:jdk.tools:jar:1.6 (system)]
785+
786+
The issue only occurs on GitHub Action environment with Hudi 0.10.0 and JDK 11.
787+
After few days digging, only found one place introduces jdk.tools,
788+
789+
- org.apache.hudi:hudi-common:jar:0.10.0:test
790+
- org.apache.hbase:hbase-server:jar:1.2.3:test
791+
- org.apache.hadoop:hadoop-common:jar:2.5.1:test
792+
- org.apache.hadoop:hadoop-annotations:jar:2.5.1:test
793+
- jdk.tools:jdk.tools:jar:1.6:system
794+
-->
795+
<dependency>
796+
<groupId>org.apache.hadoop</groupId>
797+
<artifactId>hadoop-common</artifactId>
798+
<version>${hadoop.version}</version>
799+
</dependency>
800+
780801
<dependency>
781802
<groupId>org.apache.parquet</groupId>
782803
<artifactId>parquet-avro</artifactId>
@@ -794,6 +815,10 @@
794815
<artifactId>hudi-spark-common_${scala.binary.version}</artifactId>
795816
<version>${hudi.version}</version>
796817
<exclusions>
818+
<exclusion>
819+
<groupId>org.scala-lang</groupId>
820+
<artifactId>scala-library</artifactId>
821+
</exclusion>
797822
<exclusion>
798823
<groupId>org.apache.hudi</groupId>
799824
<artifactId>hudi-timeline-service</artifactId>
@@ -826,6 +851,10 @@
826851
<groupId>org.apache.orc</groupId>
827852
<artifactId>*</artifactId>
828853
</exclusion>
854+
<exclusion>
855+
<groupId>org.apache.hudi</groupId>
856+
<artifactId>hudi-aws</artifactId>
857+
</exclusion>
829858
</exclusions>
830859
</dependency>
831860

@@ -834,6 +863,10 @@
834863
<artifactId>hudi-spark_${scala.binary.version}</artifactId>
835864
<version>${hudi.version}</version>
836865
<exclusions>
866+
<exclusion>
867+
<groupId>org.scala-lang</groupId>
868+
<artifactId>scala-library</artifactId>
869+
</exclusion>
837870
<exclusion>
838871
<groupId>org.apache.hudi</groupId>
839872
<artifactId>hudi-spark-common_2.11</artifactId>
@@ -1677,7 +1710,8 @@
16771710
<properties>
16781711
<spark.version>3.0.3</spark.version>
16791712
<delta.version>0.8.0</delta.version>
1680-
<maven.plugin.scalatest.exclude.tags>org.apache.kyuubi.tags.ExtendedSQLTest</maven.plugin.scalatest.exclude.tags>
1713+
<!-- Hudi 0.10.0 still support Spark 3.0, but need build by user with specific profile -->
1714+
<maven.plugin.scalatest.exclude.tags>org.apache.kyuubi.tags.ExtendedSQLTest,org.apache.kyuubi.tags.HudiTest</maven.plugin.scalatest.exclude.tags>
16811715
</properties>
16821716
</profile>
16831717

@@ -1686,7 +1720,7 @@
16861720
<properties>
16871721
<spark.version>3.1.2</spark.version>
16881722
<delta.version>1.0.0</delta.version>
1689-
<maven.plugin.scalatest.exclude.tags>org.apache.kyuubi.tags.ExtendedSQLTest,org.apache.kyuubi.tags.HudiTest</maven.plugin.scalatest.exclude.tags>
1723+
<maven.plugin.scalatest.exclude.tags>org.apache.kyuubi.tags.ExtendedSQLTest</maven.plugin.scalatest.exclude.tags>
16901724
</properties>
16911725
<modules>
16921726
<module>dev/kyuubi-extension-spark-common</module>

0 commit comments

Comments
 (0)