Details
Description
HMaster crashes at org/apache/hadoop/hbase/regionserver/HRegionServer.java:1044
A private static nested class can not be instantiated via reflection.
code snippet
try { abortTimeoutTask = Class.forName(conf.get(ABORT_TIMEOUT_TASK, SystemExitWhenAbortTimeout.class.getName())) .asSubclass(TimerTask.class).getDeclaredConstructor().newInstance(); } catch (Exception e) { LOG.warn("Initialize abort timeout task failed", e); }
log in product environtment
2019-08-16 18:01:40,737 [WARN ] HRegionServer:1046 Initialize abort timeout task failed java.lang.IllegalAccessException: Class org.apache.hadoop.hbase.regionserver.HRegionServer can not access a member of class org.apache.hadoop.hbase.regionss erver.HRegionServer$SystemExitWhenAbortTimeout with modifiers "private" at sun.reflect.Reflection.ensureMemberAccess(Reflection.java:102) at java.lang.reflect.AccessibleObject.slowCheckMemberAccess(AccessibleObject.java:296) at java.lang.reflect.AccessibleObject.checkAccess(AccessibleObject.java:288) at java.lang.reflect.Constructor.newInstance(Constructor.java:413) at org.apache.hadoop.hbase.regionserver.HRegionServer.run(HRegionServer.java:1044) at org.apache.hadoop.hbase.master.HMaster.run(HMaster.java:598)