Details
-
Sub-task
-
Status: Open
-
Minor
-
Resolution: Unresolved
-
None
-
None
-
None
-
None
Description
Our UTs will print out lots of WARNINGs if we run on JDK17:
WARNING: A terminally deprecated method in java.lang.System has been called WARNING: System::setSecurityManager has been called by org.apache.hadoop.hbase.SystemExitRule (file:/Users/tianhang.tang/workspaces/apache/hbase/hbase-common/target/test-classes/) WARNING: Please consider reporting this to the maintainers of org.apache.hadoop.hbase.SystemExitRule WARNING: System::setSecurityManager will be removed in a future release
This is because [JEP 411|https://openjdk.org/jeps/411,] Security Manager is deprecated since JDK17, and will removed in the future version after JDK18.
We introduced the SecurityManager in HBASE-24185, mainly using checkExit to ensure that the JVM does not exit during testing. JDK-8199704 may provide an API in the future, but at the moment we really don't seem to have an alternative available.
In short, this WARNING does not have any practical impact at present, what we need to do is to refactor HBASE-24185 in the future. But the large amount of logging is still annoying, and I haven't found a way to turn it off yet.
Attachments
Issue Links
- relates to
-
HBASE-24185 Junit tests do not behave well with System.exit or Runtime.halt or JVM exits in general.
- Resolved