This is an automated email from the ASF dual-hosted git repository. reidchan pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/hbase.git
The following commit(s) were added to refs/heads/master by this push: new 7697d48 HBASE-22870 reflection fails to access a private nested class 7697d48 is described below commit 7697d48cd7b636396d5f73be43326a4501a9ea43 Author: satanson <ranp...@gmail.com> AuthorDate: Sun Aug 18 09:47:06 2019 +0800 HBASE-22870 reflection fails to access a private nested class Signed-off-by Reid Chan <reidc...@apache.org> --- .../java/org/apache/hadoop/hbase/regionserver/HRegionServer.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java index 61361be..a0a6b4c 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java @@ -2475,9 +2475,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); }