Skip to content

revert: downgrade from Java 21/Hive 4 to Java 17/Hive 2.3.9 + integration test metrics#58

Draft
jamespfaulkner wants to merge 11 commits into
mainfrom
revert/java21-migration
Draft

revert: downgrade from Java 21/Hive 4 to Java 17/Hive 2.3.9 + integration test metrics#58
jamespfaulkner wants to merge 11 commits into
mainfrom
revert/java21-migration

Conversation

@jamespfaulkner

Copy link
Copy Markdown
Contributor

Summary

  • Reverts the Java 21 / Hive 4 migration (PR Upgrade JDK to Java 21 #55) which introduced 11 classpath shim
    classes, --add-opens JVM flags, Spring Boot 3 / Jakarta namespace changes, and a
    Hive 4.x dependency stack that adds ongoing maintenance friction
  • Targets Java 17 (LTS) rather than rolling back to Java 8 — same clean result with
    a supported runtime
  • Carries forward the integration test metrics work from feat/integration-test-metrics

Dependency changes

Component Before (Java 21 branch) After (this PR)
Java / JDK 21 17
Spring Boot 3.4.13 (Jakarta / Spring 6) 2.7.10 (javax / Spring 5.3)
Hive Metastore 4.0.1 2.3.9
Apiary Extensions 8.2.0 6.0.2
Docker base image amazoncorretto:21-al2023 amazoncorretto:17-al2023

What was removed

  • 11 classpath shim classes under drone-fly-app/src/main/java/org/apache/hadoop/hive/metastore/
  • .mvn/jvm.config (--add-exports flags for google-java-format on JDK 21)
  • --add-opens flags in Surefire argLine and Jib container config
  • JAVA21_MIGRATION.md
  • jakarta.annotation.PreDestroy → restored to javax.annotation.PreDestroy
  • Hive 4.x event constructor signatures → restored to Hive 3.x signatures

Note for child images

Any Dockerfile that extends drone-fly-app and overrides the Jib ENTRYPOINT with
--add-opens flags (e.g. egdp-docker-glue-sync-listener) can have that block removed.
Leaving it in place is harmless — the flags are a no-op with Hive 2.x on Java 17.

Test plan

  • mvn clean verify passes with Java 17
  • Integration test (DroneFlyIntegrationTest) passes
  • No org/apache/hadoop/hive/metastore/ shim directory in build output
  • CI (GitHub Actions) green

jamespfaulkner and others added 11 commits June 25, 2026 15:03
…vements

- Add SpringMetricsUtils and GlueSync metrics integration tests
- Move integration test support classes into .support sub-package
- Replace race-prone await on DummyListener with Kafka fetch metric
  guard + awaitOffsetCommitted via AdminClient for reliable sync
- DummyListener: ArrayList → CopyOnWriteArrayList (JMM data race fix)
- DroneFly: remove ApplicationContextAware and static context field
  to prevent Spring test context clobbering
- AsyncApplicationRunner: log runner failures instead of swallowing
- DroneFlyIntegrationTest: remove dead records/container infrastructure
- SpringMetricsUtils.metricValue: replace manual URI string-building
  with UriComponentsBuilder (fixes trailing & and silent tag-skip)
- Add .editorconfig, update .sdkmanrc to JDK 21
- Pin apiary.extensions.version to stable 8.2.0 (was SNAPSHOT)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Update all three CI workflows (build, main, release) to use
Amazon Corretto 17 to match the reverted Java 17 pom.xml target.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
v2 of setup-java does not support the corretto distribution; v4 does.
Also upgrades checkout to v4 to avoid Node 20 deprecation warnings.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…listener dep

The gluesync smoke test was written against Hive 4.x (standalone HMSHandler,
4-arg CreateTableEvent, MetricConstants from apiary 8.x) and cannot run against
Hive 2.3.9. The apiary-gluesync-listener:all jar does not exist at 6.x.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Use HiveMetaStore.HMSHandler (inner class) instead of standalone HMSHandler
- Drop 4th arg from CreateTableEvent constructors (3-arg Hive 2.x signature)
- Pin apiary-gluesync-listener to 8.1.13 (hardcoded, all classifier)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
spotless-maven-plugin:2.4.1 bundles a google-java-format version that
accesses com.sun.tools.javac.util, which is not exported by jdk.compiler
on Java 17+. Skip it rather than upgrading the plugin.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
jacoco 0.8.6 from eg-oss-parent does not understand class file major
version 61 (Java 17). 0.8.7+ is required; use 0.8.13 to align with
the integration-tests module override.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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.

1 participant