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

Javascript Strategies are Broken in Java 17 #17445

Open
boaz-wiesner opened this issue Nov 4, 2024 · 1 comment
Open

Javascript Strategies are Broken in Java 17 #17445

boaz-wiesner opened this issue Nov 4, 2024 · 1 comment

Comments

@boaz-wiesner
Copy link

boaz-wiesner commented Nov 4, 2024

It seems that in Java 17 the javascript runtime is no longer built in. When a javascript strategy, such as the overlord affinity strategy, is evaluated at runtime, the strategy fails to run (and the task fails), saying that "engine" is null.

final ScriptEngine engine = new ScriptEngineManager().getEngineByName("javascript");

This may be expected behavior, and may be out of context for Druid to solve, however as Java 17 is the recommended runtime, there should probably be documentation on how to load the required libraries to allow Javascript functionality.

In the case that this is a distribution based issue, we're using openjdk-17-jre-headless.

Either way, for those looking for a quick workaround, like we were, reverting the overlord back to Java 8 works.

@jakubmatyszewski
Copy link
Contributor

There was a PR regarding this issue: #14795 but it's stale and in current form it would introduce backwards incompatible implementation for users still runing JDKs before version 11.

However I 100% agree that it would be nice if there was a clear declaration on this matter from Druid maintainers.

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

No branches or pull requests

2 participants