HBASE-22870 reflection fails to access a private nested class
Signed-off-by Reid Chan <reidchan@apache.org>
This commit is contained in:
parent
c295fd7c6a
commit
29ed4157b3
|
@ -2480,9 +2480,11 @@ public class HRegionServer extends HasThread implements
|
|||
this.abortMonitor = new Timer("Abort regionserver monitor", true);
|
||||
TimerTask abortTimeoutTask = null;
|
||||
try {
|
||||
abortTimeoutTask =
|
||||
Constructor<? extends TimerTask> timerTaskCtor =
|
||||
Class.forName(conf.get(ABORT_TIMEOUT_TASK, SystemExitWhenAbortTimeout.class.getName()))
|
||||
.asSubclass(TimerTask.class).getDeclaredConstructor().newInstance();
|
||||
.asSubclass(TimerTask.class).getDeclaredConstructor();
|
||||
timerTaskCtor.setAccessible(true);
|
||||
abortTimeoutTask = timerTaskCtor.newInstance();
|
||||
} catch (Exception e) {
|
||||
LOG.warn("Initialize abort timeout task failed", e);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue