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

RANGER-4076: Support Java 17 for build and runtime #420

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

Conversation

RakeshGuptaDev
Copy link
Contributor

@RakeshGuptaDev RakeshGuptaDev commented Dec 3, 2024

What changes were proposed in this pull request?

Support for Java 17 has been added in both build and runtime environments, along with support for Java 8 and 11 in both environments.

How was this patch tested?

This patch has been successfully tested and verified on Java versions 8, 11, and 17. The verification process involved both manual testing and a Docker-based setup. We can now build and run the patch on the same JDK version.

Maven Build Verification

JDK 8:
mvn clean compile package install

JDK 11:
mvn clean compile package install

JDK 17:
mvn clean compile package install -Pranger-all-modules-jdk17

Validated policy enforcement for below scenario :

Scenario 1: JDK 8 Build and Runtime
Successfully validated Usersync, Tagsync, and Policy Enforcement (including policy conditions) for HDFS, HBase, and Hive services using Ranger with JDK 8 for both build and runtime environments.

Scenario 2: JDK 8 Build and JDK 17 Runtime
Successfully validated Usersync, Tagsync, and Policy Enforcement (including policy conditions) for HDFS, HBase, and Hive services using Ranger with JDK 8 for the build and JDK 17 for the runtime environment.

Scenario 3: JDK 17 Build and Runtime
Successfully validated Usersync, Tagsync, and Policy Enforcement (including policy conditions) for HDFS, HBase, and Hive services using Ranger with JDK 17 for both build and runtime environments.

@mneethiraj
Copy link
Contributor

Good work @RakeshGuptaDev! One concern is that many Ranger plugins need to run in JDK version prior to 17 (JDK8 or JDK 11 or JDK15) - like HDFS, Hive, HBase. This wouldn't allow us to switch to Graal script engine, as it is only available in JDK17 onwards (https://www.graalvm.org/jdk17/docs/).

One option to consider building Ranger libraries used by plugins (agents-common, agents-audit, agents-cred, all plugins) with JDK8 and servers (admin, usersync, tagsync, KMS) with JDK17.

@RakeshGuptaDev
Copy link
Contributor Author

Hi @mneethiraj,

Thank you for your feedback. I understand your concern that Ranger plugins need to support JDK versions prior to 17, including JDK 8, JDK 11, and JDK 15.

In the current patch, I have used GraalVM version 21.3.x, which is compatible with JDK 8 (https://www.graalvm.org/21.3/docs/introduction/index.html#available-distributions). I have also successfully validated plugins like HDFS, HBase, and Hive across JDK 8 and JDK 11.

For JDK 17 and later, I have used the latest available GraalVM version.

To address this compatibility challenge, we can consider the following approach:

Replace Nashorn:

  • Use GraalVM version 21.3.x for JDK 8.
  • Upgrade to the latest available GraalVM version for JDK 15 and later.

This approach aims to maintain compatibility across all supported JDK versions. Please share your thoughts or suggest any alternative solutions.

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