hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From zhang...@apache.org
Subject [02/13] hbase git commit: HBASE-19554 Dump thread info before failure
Date Mon, 12 Feb 2018 10:20:52 GMT
HBASE-19554 Dump thread info before failure


Project: http://git-wip-us.apache.org/repos/asf/hbase/repo
Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/8ff783f7
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/8ff783f7
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/8ff783f7

Branch: refs/heads/HBASE-19064
Commit: 8ff783f76d370199b81a24c48feaad1aa980285e
Parents: 629eaf8
Author: zhangduo <zhangduo@apache.org>
Authored: Mon Feb 12 16:01:33 2018 +0800
Committer: zhangduo <zhangduo@apache.org>
Committed: Mon Feb 12 16:03:52 2018 +0800

----------------------------------------------------------------------
 .../org/apache/hadoop/hbase/master/AbstractTestDLS.java | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/8ff783f7/hbase-server/src/test/java/org/apache/hadoop/hbase/master/AbstractTestDLS.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/master/AbstractTestDLS.java
b/hbase-server/src/test/java/org/apache/hadoop/hbase/master/AbstractTestDLS.java
index 73718b9..1f9fc5d 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/master/AbstractTestDLS.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/master/AbstractTestDLS.java
@@ -42,7 +42,6 @@ import java.util.concurrent.Future;
 import java.util.concurrent.TimeUnit;
 import java.util.concurrent.TimeoutException;
 import java.util.concurrent.atomic.LongAdder;
-
 import org.apache.hadoop.conf.Configuration;
 import org.apache.hadoop.fs.FSDataOutputStream;
 import org.apache.hadoop.fs.FileStatus;
@@ -75,6 +74,7 @@ import org.apache.hadoop.hbase.util.Bytes;
 import org.apache.hadoop.hbase.util.FSUtils;
 import org.apache.hadoop.hbase.util.JVMClusterUtil.MasterThread;
 import org.apache.hadoop.hbase.util.JVMClusterUtil.RegionServerThread;
+import org.apache.hadoop.hbase.util.Threads;
 import org.apache.hadoop.hbase.wal.AbstractFSWALProvider;
 import org.apache.hadoop.hbase.wal.WAL;
 import org.apache.hadoop.hbase.wal.WALEdit;
@@ -92,6 +92,7 @@ import org.junit.Test;
 import org.junit.rules.TestName;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
+
 import org.apache.hadoop.hbase.shaded.protobuf.ProtobufUtil;
 
 /**
@@ -398,7 +399,14 @@ public abstract class AbstractTestDLS {
         }
       });
       TEST_UTIL.waitUntilAllRegionsAssigned(tableName);
-      assertEquals(numRegionsToCreate * numRowsPerRegion, TEST_UTIL.countRows(table));
+      int rows;
+      try {
+        rows = TEST_UTIL.countRows(table);
+      } catch (Exception e) {
+        Threads.printThreadInfo(System.out, "Thread dump before fail");
+        throw e;
+      }
+      assertEquals(numRegionsToCreate * numRowsPerRegion, rows);
     }
   }
 


Mime
View raw message