okumin commented on code in PR #5809: URL: https://github.com/apache/hive/pull/5809#discussion_r2084393979
########## hcatalog/webhcat/svr/src/main/java/org/apache/hive/hcatalog/templeton/tool/TempletonControllerJob.java: ########## @@ -167,6 +167,39 @@ public int run(String[] args) throws IOException, InterruptedException, ClassNot } return 0; } + private String addJavaOpensPackages(String amJavaOpts) { + final int JAVA_SPEC_VER = + Math.max(8, Integer.parseInt(System.getProperty("java.specification.version").split("\\.")[0])); + if (JAVA_SPEC_VER >= 9) { + return String.join(" ", amJavaOpts, getJavaAddOpenOptions()); + } else { + return amJavaOpts; + } + } + private String getJavaAddOpenOptions() { + return String.join(" ", + "-XX:+IgnoreUnrecognizedVMOptions", + "--add-opens=java.base/java.net=ALL-UNNAMED", + "--add-opens=java.base/java.util=ALL-UNNAMED", + "--add-opens=java.base/java.util.concurrent=ALL-UNNAMED", + "--add-opens=java.base/java.util.concurrent.atomic=ALL-UNNAMED", + "--add-opens=java.base/java.lang=ALL-UNNAMED", + "--add-opens=java.base/java.io=ALL-UNNAMED", + "--add-opens=java.base/java.lang.invoke=ALL-UNNAMED", + "--add-opens=java.base/java.lang.reflect=ALL-UNNAMED", + "--add-opens=java.base/java.math=ALL-UNNAMED", + "--add-opens=java.base/java.nio=ALL-UNNAMED", + "--add-opens=java.base/java.text=ALL-UNNAMED", + "--add-opens=java.base/java.time=ALL-UNNAMED", + "--add-opens=java.base/jdk.internal.ref=ALL-UNNAMED", + "--add-opens=java.base/jdk.internal.reflect=ALL-UNNAMED", + "--add-opens=java.sql/java.sql=ALL-UNNAMED", + "--add-opens=java.base/sun.nio.ch=ALL-UNNAMED", + "--add-opens=java.base/sun.nio.cs=ALL-UNNAMED", + "--add-opens=java.base/java.util.regex=ALL-UNNAMED" Review Comment: Just for your information, we are adding `java.base/java.security=ALL-UNNAMED` and `java.base/sun.security.provider=ALL-UNNAMED` as well in our JDK 11 environment. I'm not confident that we're too defensive, or we really needed them. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: gitbox-unsubscr...@hive.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: gitbox-unsubscr...@hive.apache.org For additional commands, e-mail: gitbox-h...@hive.apache.org