hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From st...@apache.org
Subject git commit: HBASE-12165 TestEndToEndSplitTransaction.testFromClientSideWhileSplitting fails -- DEBUGGING STRINGS
Date Fri, 03 Oct 2014 04:10:50 GMT
Repository: hbase
Updated Branches:
  refs/heads/master a17614d5b -> da9f2434b


HBASE-12165 TestEndToEndSplitTransaction.testFromClientSideWhileSplitting fails -- DEBUGGING
STRINGS


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

Branch: refs/heads/master
Commit: da9f2434b2ad9e85a7f726bb5334568ac772ec90
Parents: a17614d
Author: stack <stack@apache.org>
Authored: Thu Oct 2 21:10:45 2014 -0700
Committer: stack <stack@apache.org>
Committed: Thu Oct 2 21:10:45 2014 -0700

----------------------------------------------------------------------
 .../TestEndToEndSplitTransaction.java            | 19 +++++++++++++------
 1 file changed, 13 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/da9f2434/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestEndToEndSplitTransaction.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestEndToEndSplitTransaction.java
b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestEndToEndSplitTransaction.java
index 67a8f19..d2164d1 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestEndToEndSplitTransaction.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestEndToEndSplitTransaction.java
@@ -235,7 +235,7 @@ public class TestEndToEndSplitTransaction {
     public void run() {
       try {
         Random random = new Random();
-        for (int i=0; i< 5; i++) {
+        for (int i= 0; i< 5; i++) {
           NavigableMap<HRegionInfo, ServerName> regions = MetaScanner.allTableRegions(conf,
null,
               tableName, false);
           if (regions.size() == 0) {
@@ -341,7 +341,7 @@ public class TestEndToEndSplitTransaction {
     }
 
     void verifyTableRegions(Set<HRegionInfo> regions) {
-      log("Verifying " + regions.size() + " regions");
+      log("Verifying " + regions.size() + " regions: " + regions);
 
       byte[][] startKeys = new byte[regions.size()][];
       byte[][] endKeys = new byte[regions.size()][];
@@ -428,14 +428,16 @@ public class TestEndToEndSplitTransaction {
     Table metaTable = new HTable(conf, TableName.META_TABLE_NAME);
 
     try {
-      while (System.currentTimeMillis() - start < timeout) {
-        Result result = getRegionRow(metaTable, regionName);
+      Result result = null;
+      HRegionInfo region = null;
+      while ((System.currentTimeMillis() - start) < timeout) {
+        result = getRegionRow(metaTable, regionName);
         if (result == null) {
           break;
         }
 
-        HRegionInfo region = HRegionInfo.getHRegionInfo(result);
-        if(region.isSplitParent()) {
+        region = HRegionInfo.getHRegionInfo(result);
+        if (region.isSplitParent()) {
           log("found parent region: " + region.toString());
           PairOfSameType<HRegionInfo> pair = HRegionInfo.getDaughterRegions(result);
           daughterA = pair.getFirst();
@@ -444,6 +446,11 @@ public class TestEndToEndSplitTransaction {
         }
         Threads.sleep(100);
       }
+      if (daughterA == null || daughterB == null) {
+        throw new IOException("Failed to get daughters, daughterA=" + daughterA + ", daughterB="
+
+          daughterB + ", timeout=" + timeout + ", result=" + result + ", regionName=" + regionName
+
+          ", region=" + region);
+      }
 
       //if we are here, this means the region split is complete or timed out
       if (waitForDaughters) {


Mime
View raw message