Skip to content

[hive] Avoid binding to HiveConf.ConfVars constants renamed in Hive 4 - #9403

Merged
JingsongLi merged 1 commit into
apache:masterfrom
leosanqing:feature/hive4-support-master
Aug 26, 2026
Merged

[hive] Avoid binding to HiveConf.ConfVars constants renamed in Hive 4#9403
JingsongLi merged 1 commit into
apache:masterfrom
leosanqing:feature/hive4-support-master

Conversation

@leosanqing

Copy link
Copy Markdown
Contributor

Purpose

Fix hive 4 client error:

java.lang.NoSuchFieldError: Class org.apache.hadoop.hive.conf.HiveConf$ConfVars
    does not have member field 'org.apache.hadoop.hive.conf.HiveConf$ConfVars METASTOREURIS'
    at org.apache.paimon.hive.HiveCatalog.createHiveConf(HiveCatalog.java:1997)
    at org.apache.paimon.hive.HiveCatalog.createHiveCatalog(HiveCatalog.java:1959)
    at org.apache.paimon.hive.HiveCatalogFactory.create(HiveCatalogFactory.java:37)

Hive 4 renamed a number of HiveConf.ConfVars enum constants in HIVE-27925,
for example METASTOREURIS → METASTORE_URIS
and METASTOREWAREHOUSE → METASTORE_WAREHOUSE.

The build target is unchanged (hive.version 2.3.10, Java 8). No new module, no new dependency,
no JDK bump. Hive 2.1 / 2.2 / 2.3 / 3.1 keep working exactly as before.

Prior art in Apache Spark

Spark hit the very same incompatibility and fixed it the same way. Its Hive 4 work landed in this
order, which is also the order proposed here:

SPARK-47679apache/spark#45804
"Use HiveConf.getConfVars or Hive conf names directly" — removes the ConfVars symbol binding. This PR is the direct analogue.

Related issues

Partially addresses:

Tests

  • Existing paimon-hive-catalog and paimon-hive-connector-common tests.

  • End-to-end against a real Hive 4 metastore. Using the released
    paimon-spark-4.1_2.13-2.0.0 bundle with a Hive 4.0.1 client on the classpath

@JingsongLi

Copy link
Copy Markdown
Contributor

+1

@JingsongLi
JingsongLi merged commit 5d6a49c into apache:master Aug 26, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants