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

Fix Hadoop Indexing CLI for versions JDK v9+ #17569

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jtuglu-netflix
Copy link
Contributor

@jtuglu-netflix jtuglu-netflix commented Dec 14, 2024

Fixes #17574.

Description

For JDK v9+ this job will fail as URLClassloader is no longer the default classloader. Additionally, with the introduction of the jmod system, the job failed to find the correct JDK-included modules because the new classloader constructed for the job didn't reference the system classloader. Adding ClassLoader.getSystemClassLoader() as the parent classloader fixes this.

Release note

Fix Hadoop Indexing CLI for versions JDK v9+


Key changed/added classes in this PR
  • services/src/main/java/org/apache/druid/cli/CliHadoopIndexer.java

This PR has:

  • been self-reviewed.
  • added documentation for new or modified features or behaviors.
  • a release note entry in the PR description.
  • added Javadocs for most classes and all non-trivial methods. Linked related entities via Javadoc links.
  • added or updated version, license, or notice information in licenses.yaml
  • added comments explaining the "why" and the intent of the code wherever would not be obvious for an unfamiliar reader.
  • added unit tests or modified existing tests to cover new code paths, ensuring the threshold for code coverage is met.
  • added integration tests.
  • been tested in a test Druid cluster.

@jtuglu-netflix jtuglu-netflix changed the title Fix hadoop indexing via cli for jdk versions higher than 8 Fix hadoop indexing via cli for Java > 8 Dec 14, 2024
@jtuglu-netflix jtuglu-netflix changed the title Fix hadoop indexing via cli for Java > 8 Fix hadoop indexing via cli for versions higher than Java 8 Dec 14, 2024
@jtuglu-netflix jtuglu-netflix changed the title Fix hadoop indexing via cli for versions higher than Java 8 Fix Hadoop Indexing via cli for versions higher than Java 8 Dec 14, 2024
@jtuglu-netflix jtuglu-netflix marked this pull request as ready for review December 16, 2024 17:02
@jtuglu-netflix jtuglu-netflix changed the title Fix Hadoop Indexing via cli for versions higher than Java 8 Fix Hadoop Indexing CLI for versions > JDK v8 Dec 16, 2024
@jtuglu-netflix jtuglu-netflix changed the title Fix Hadoop Indexing CLI for versions > JDK v8 Fix Hadoop Indexing CLI for versions JDK v9+ Dec 16, 2024
For JDK v9+ this job will fail as URLClassloader is no longer the default classloader. Additionally, with the introduction of the jmod system, the job failed to find the correct JDK-included modules because the new classloader constructed for the job didn't reference the system classloader. Adding ClassLoader.getSystemClassLoader() as the parent classloader fixes this.
@jtuglu-netflix jtuglu-netflix force-pushed the fix-hadoop-indexing-via-cli-for-jdk-versions-higher-than-8 branch from 9457f1e to dec1188 Compare December 16, 2024 17:10
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.

Fix Hadoop Indexing CLI for versions JDK v9+
3 participants