[ https://issues.apache.org/jira/browse/HBASE-29234?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Istvan Toth resolved HBASE-29234. --------------------------------- Fix Version/s: 2.7.0 3.0.0-beta-2 2.6.3 2.5.12 Resolution: Fixed Committed to all active branches. Thanks for the review [~zhangduo] . > Handle java.lang.reflect.InaccessibleObjectException in HFileSystem > ------------------------------------------------------------------- > > Key: HBASE-29234 > URL: https://issues.apache.org/jira/browse/HBASE-29234 > Project: HBase > Issue Type: Bug > Reporter: Istvan Toth > Assignee: Istvan Toth > Priority: Major > Labels: pull-request-available > Fix For: 2.7.0, 3.0.0-beta-2, 2.6.3, 2.5.12 > > > This is from the Hadoop test suite, but the problem is in HBase: > {noformat} > [ERROR] > org.apache.hadoop.yarn.server.timelineservice.storage.TestTimelineReaderHBaseDown.testTimelineReaderDetectsHBaseDown > Time elapsed: 0.282 s <<< ERROR! > java.lang.reflect.InaccessibleObjectException: Unable to make private native > java.lang.reflect.Field[] java.lang.Class.getDeclaredFields0(boolean) > accessible: module java.base does not "opens java.lang" to unnamed module > @541e4305 > at > java.base/java.lang.reflect.AccessibleObject.throwInaccessibleObjectException(AccessibleObject.java:353) > at > java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:329) > at > java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:277) > at > java.base/java.lang.reflect.Method.checkCanSetAccessible(Method.java:182) > at java.base/java.lang.reflect.Method.setAccessible(Method.java:176) > at > org.apache.hadoop.hbase.util.ReflectionUtils.getModifiersField(ReflectionUtils.java:286) > at > org.apache.hadoop.hbase.fs.HFileSystem.addLocationsOrderInterceptor(HFileSystem.java:326) > at > org.apache.hadoop.hbase.fs.HFileSystem.addLocationsOrderInterceptor(HFileSystem.java:285) > at org.apache.hadoop.hbase.fs.HFileSystem.<init>(HFileSystem.java:96) > at org.apache.hadoop.hbase.fs.HFileSystem.get(HFileSystem.java:453) > {noformat} > Due to JEP416, we are no longer able to set the LocationsOrderInterceptor on > JDK18+. > While the code is supposed to catch these instances and still work (just not > optimally), it does not catch InaccessibleObjectException. > Catching InaccessibleObjectException is not real fix, but it allows for > running with JDK18+. > The real fix would either be avoiding reflection for this (which probably > requires Hadoop support), or using the sanity-draining workaround for JEP416 > which floats around on stackoverflow. -- This message was sent by Atlassian Jira (v8.20.10#820010)