From 7723a3d60d9c13a3f0919cf7b435e1bae73d54a8 Mon Sep 17 00:00:00 2001 From: Michael Stack Date: Mon, 5 Feb 2018 12:37:48 -0800 Subject: [PATCH] HBASE-19940 TestMetaShutdownHandler flakey --- .../org/apache/hadoop/hbase/util/JVMClusterUtil.java | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/util/JVMClusterUtil.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/util/JVMClusterUtil.java index a85e89e595a..172c170b920 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/util/JVMClusterUtil.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/util/JVMClusterUtil.java @@ -296,7 +296,15 @@ public class JVMClusterUtil { if (!atLeastOneLiveServer) break; for (RegionServerThread t : regionservers) { if (t.isAlive()) { - LOG.warn("RegionServerThreads taking too long to stop, interrupting"); + LOG.warn("RegionServerThreads taking too long to stop, interrupting; thread dump " + + "if > three attempts"); + if (i > 3) { + try { + Threads.threadDumpingIsAlive(t.getRegionServer().getThread()); + } catch (InterruptedException e) { + e.printStackTrace(); + } + } t.interrupt(); } }