Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DRAFT][BUILD] Test upgrading built-in Hive to 2.3.10 #45372

Closed
wants to merge 15 commits into from

Conversation

pan3793
Copy link
Member

@pan3793 pan3793 commented Mar 4, 2024

What changes were proposed in this pull request?

This PR aims to do a pre-test before the Apache Hive 2.3.10 official release, it includes

Why are the changes needed?

Integration test of Hive 2.3.10 RC1 https://lists.apache.org/thread/3ton9oxlkkb1v7tbqqw1rhjpz9y8ymv5

Does this PR introduce any user-facing change?

No.

How was this patch tested?

Pass GA.

Was this patch authored or co-authored using generative AI tooling?

No

@pan3793
Copy link
Member Author

pan3793 commented Mar 4, 2024

cc @sunchao, so far, the Hive branch-2.3 looks good on the Spark side.

@sunchao
Copy link
Member

sunchao commented Mar 4, 2024

@dongjoon-hyun
Copy link
Member

Thank you for making progress, @pan3793 and @sunchao .

@LuciferYang
Copy link
Contributor

happy to see this hive upgrade, thanks to @pan3793 and @sunchao

pom.xml Outdated
@@ -199,14 +197,14 @@
<!-- org.apache.commons/commons-pool2/-->
<commons-pool2.version>2.12.0</commons-pool2.version>
<datanucleus-core.version>4.1.17</datanucleus-core.version>
<guava.version>14.0.1</guava.version>
<guava.version>33.0.0-jre</guava.version>
Copy link
Contributor

@LuciferYang LuciferYang Mar 5, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@pan3793 If we upgrade the version of Guava, and it is also packaged into the newwork-shuffle and core module through the shaded+relocation method, then we need to package com.google.guava:failureaccess at the same time.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We actually cannot avoid exposing vanilla Guava to classpath, except to Spark internal usage, 3-rd party libs still require Guava to work, e.g. Curator, Hive. Then, should we continue to do shading after upgrading?

@pan3793
Copy link
Member Author

pan3793 commented Mar 21, 2024

@sunchao I checked the JIRA tickets you listed, all are related to LICENSE, I created those PRs except for the last one (obviously it has conflicts with previous patches), should be easy to review, please take a look when you have time.

@dongjoon-hyun dongjoon-hyun marked this pull request as draft March 29, 2024 20:38
@pan3793 pan3793 changed the title [DO-NOT-MERGE] Test Hive pre-2.3.10 [DO-NOT-MERGE] Test Apache Hive 2.3.10 RC0 Apr 21, 2024
@pan3793
Copy link
Member Author

pan3793 commented Apr 21, 2024

@dongjoon-hyun @sunchao @LuciferYang the integration test with Hive 2.3.10 RC0 passed, do you have other concerns or extra cases that need to be verified?

@pan3793
Copy link
Member Author

pan3793 commented Apr 21, 2024

also cc @wangyum @HyukjinKwon @yaooqinn

@@ -33,6 +33,7 @@ breeze-macros_2.13/2.1.0//breeze-macros_2.13-2.1.0.jar
breeze_2.13/2.1.0//breeze_2.13-2.1.0.jar
bundle/2.24.6//bundle-2.24.6.jar
cats-kernel_2.13/2.8.0//cats-kernel_2.13-2.8.0.jar
checker-qual/3.42.0//checker-qual-3.42.0.jar
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this a cascading dependency brought by the new version of Guava?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes.

@@ -952,7 +955,7 @@ object Unsafe {
object DockerIntegrationTests {
// This serves to override the override specified in DependencyOverrides:
lazy val settings = Seq(
dependencyOverrides += "com.google.guava" % "guava" % "33.0.0-jre"
dependencyOverrides += "com.google.guava" % "guava" % "33.1.0-jre"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will similar configurations still be needed after this pr?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR is mainly of PoC, so I just make minimal changes to verify it works. I think we can unify the Guava version in all places after upgrading Hive 2.3.10, in an independent PR.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fine to me

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dongjoon-hyun dongjoon-hyun changed the title [DO-NOT-MERGE] Test Apache Hive 2.3.10 RC0 [SPARK-47018][BUILD] Upgrade built-in Hive to 2.3.10 Apr 22, 2024
Copy link
Member

@dongjoon-hyun dongjoon-hyun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for making a progress on this issue. Since this is Draft PR, I believe it's okay to use the existing JIRA ID.

BTW, as mentioned by Yang Jie. There are several irrelevant updates in this PR. I guess we can minimize them before the official Hive release.

@@ -1626,6 +1625,7 @@ class HiveQuerySuite extends HiveComparisonTest with SQLTestUtils with BeforeAnd

test("SPARK-33084: Add jar support Ivy URI in SQL") {
val testData = TestHive.getHiveFile("data/files/sample.json").toURI
val hiveVersion = "2.3.9" // TODO remove after Hive 2.3.10 jar available in maven central
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ditto. Do you know why DEFAULT_ARTIFACT_REPOSITORY change isn't enough here?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I remember it did not work on my first try, let me try again

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I searched DEFAULT_ARTIFACT_REPOSITORY, it looks like affects multiple places, I addressed the ADD JAR in another approach ec9848f

@dongjoon-hyun
Copy link
Member

For Docker Integration test dependency, I made the following PR with @pan3793 's authorship.

@@ -49,7 +49,7 @@ OLD_VERSION=$($MVN -q \
--non-recursive \
org.codehaus.mojo:exec-maven-plugin:1.6.0:exec | grep -E '[0-9]+\.[0-9]+\.[0-9]+')
# dependency:get for guava and jetty-io are workaround for SPARK-37302.
GUAVA_VERSION=$(build/mvn help:evaluate -Dexpression=guava.version -q -DforceStdout | grep -E "^[0-9.]+$")
GUAVA_VERSION=$(build/mvn help:evaluate -Dexpression=guava.version -q -DforceStdout | grep -E "^[0-9\.]+")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a question. Why do we need this change?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The recent Guava version has the suffix -jre or -android, the change is required to match the new version

dongjoon-hyun pushed a commit that referenced this pull request Apr 22, 2024
…` in Docker IT

### What changes were proposed in this pull request?

This PR aims to upgrade `guava` dependency to `33.1.0-jre` in Docker Integration tests.

### Why are the changes needed?

This is a preparation of the following PR.
- #45372

### Does this PR introduce _any_ user-facing change?

No.

### How was this patch tested?

Pass the CIs.

### Was this patch authored or co-authored using generative AI tooling?

No.

Closes #46167 from dongjoon-hyun/SPARK-47940.

Authored-by: Cheng Pan <chengpan@apache.org>
Signed-off-by: Dongjoon Hyun <dhyun@apple.com>
@dongjoon-hyun
Copy link
Member

Could you update the PR description with RC1 link, @pan3793 ?

@pan3793
Copy link
Member Author

pan3793 commented May 6, 2024

@dongjoon-hyun thanks for checking, updated

@pan3793 pan3793 changed the title [SPARK-47018][BUILD] Upgrade built-in Hive to 2.3.10 [DRAFT][BUILD] Test upgrading built-in Hive to 2.3.10 May 10, 2024
JacobZheng0927 pushed a commit to JacobZheng0927/spark that referenced this pull request May 11, 2024
…` in Docker IT

### What changes were proposed in this pull request?

This PR aims to upgrade `guava` dependency to `33.1.0-jre` in Docker Integration tests.

### Why are the changes needed?

This is a preparation of the following PR.
- apache#45372

### Does this PR introduce _any_ user-facing change?

No.

### How was this patch tested?

Pass the CIs.

### Was this patch authored or co-authored using generative AI tooling?

No.

Closes apache#46167 from dongjoon-hyun/SPARK-47940.

Authored-by: Cheng Pan <chengpan@apache.org>
Signed-off-by: Dongjoon Hyun <dhyun@apple.com>
JacobZheng0927 pushed a commit to JacobZheng0927/spark that referenced this pull request May 11, 2024
### What changes were proposed in this pull request?

This PR aims to bump Spark's built-in Hive from 2.3.9 to Hive 2.3.10, with two additional changes:

- due to API breaking changes of Thrift, `libthrift` is upgraded from `0.12` to `0.16`.
- remove version management of `commons-lang:2.6`, it comes from Hive transitive deps, Hive 2.3.10 drops it in apache/hive#4892

This is the first part of apache#45372

### Why are the changes needed?

Bump Hive to the latest version of 2.3, prepare for upgrading Guava, and dropping vulnerable dependencies like Jackson 1.x / Jodd

### Does this PR introduce _any_ user-facing change?

No.

### How was this patch tested?

Pass GA. (wait for sunchao to complete the 2.3.10 release to make jars visible on Maven Central)

### Was this patch authored or co-authored using generative AI tooling?

No.

Closes apache#45372

Closes apache#46468 from pan3793/SPARK-47018.

Lead-authored-by: Cheng Pan <chengpan@apache.org>
Co-authored-by: Dongjoon Hyun <dongjoon@apache.org>
Signed-off-by: Dongjoon Hyun <dhyun@apple.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants