hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From st...@apache.org
Subject svn commit: r1504714 - /hbase/trunk/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestHRegionOnCluster.java
Date Thu, 18 Jul 2013 22:57:39 GMT
Author: stack
Date: Thu Jul 18 22:57:39 2013
New Revision: 1504714

URL: http://svn.apache.org/r1504714
Log:
HBASE-8993 TestHRegionOnCluster.testDataCorrectnessReplayingRecoveredEdits fails

Modified:
    hbase/trunk/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestHRegionOnCluster.java

Modified: hbase/trunk/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestHRegionOnCluster.java
URL: http://svn.apache.org/viewvc/hbase/trunk/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestHRegionOnCluster.java?rev=1504714&r1=1504713&r2=1504714&view=diff
==============================================================================
--- hbase/trunk/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestHRegionOnCluster.java
(original)
+++ hbase/trunk/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestHRegionOnCluster.java
Thu Jul 18 22:57:39 2013
@@ -39,6 +39,7 @@ import org.apache.hadoop.hbase.util.Byte
 import org.apache.hadoop.hbase.MediumTests;
 import org.junit.Test;
 import org.junit.experimental.categories.Category;
+import org.mortbay.log.Log;
 
 /**
  * Tests that need to spin up a cluster testing an {@link HRegion}.  Use
@@ -49,7 +50,7 @@ import org.junit.experimental.categories
 public class TestHRegionOnCluster {
   private static final HBaseTestingUtility TEST_UTIL = new HBaseTestingUtility();
 
-  @Test (timeout=180000)
+  @Test (timeout=300000)
   public void testDataCorrectnessReplayingRecoveredEdits() throws Exception {
     final int NUM_MASTERS = 1;
     final int NUM_RS = 3;
@@ -71,6 +72,7 @@ public class TestHRegionOnCluster {
       assertTrue(hbaseAdmin.isTableAvailable(TABLENAME));
 
       // Put data: r1->v1
+      Log.info("Loading r1 to v1 into " + Bytes.toString(TABLENAME));
       HTable table = new HTable(TEST_UTIL.getConfiguration(), TABLENAME);
       putDataAndVerify(table, "r1", FAMILY, "v1", 1);
 
@@ -81,6 +83,7 @@ public class TestHRegionOnCluster {
       int targetServerNum = (originServerNum + 1) % NUM_RS;
       HRegionServer targetServer = cluster.getRegionServer(targetServerNum);
       assertFalse(originServer.equals(targetServer));
+      Log.info("Moving " + regionInfo.getEncodedName() + " to " + targetServer.getServerName());
       hbaseAdmin.move(regionInfo.getEncodedNameAsBytes(),
           Bytes.toBytes(targetServer.getServerName().getServerName()));
       do {
@@ -88,9 +91,11 @@ public class TestHRegionOnCluster {
       } while (cluster.getServerWith(regionInfo.getRegionName()) == originServerNum);
 
       // Put data: r2->v2
+      Log.info("Loading r2 to v2 into " + Bytes.toString(TABLENAME));
       putDataAndVerify(table, "r2", FAMILY, "v2", 2);
 
       // Move region to origin server
+      Log.info("Moving " + regionInfo.getEncodedName() + " to " + originServer.getServerName());
       hbaseAdmin.move(regionInfo.getEncodedNameAsBytes(),
           Bytes.toBytes(originServer.getServerName().getServerName()));
       do {
@@ -98,9 +103,11 @@ public class TestHRegionOnCluster {
       } while (cluster.getServerWith(regionInfo.getRegionName()) == targetServerNum);
 
       // Put data: r3->v3
+      Log.info("Loading r3 to v3 into " + Bytes.toString(TABLENAME));
       putDataAndVerify(table, "r3", FAMILY, "v3", 3);
 
       // Kill target server
+      Log.info("Killing target server " + targetServer.getServerName());
       targetServer.kill();
       cluster.getRegionServerThreads().get(targetServerNum).join();
       // Wait until finish processing of shutdown
@@ -108,10 +115,12 @@ public class TestHRegionOnCluster {
         Thread.sleep(5);
       }
       // Kill origin server
+      Log.info("Killing origin server " + targetServer.getServerName());
       originServer.kill();
       cluster.getRegionServerThreads().get(originServerNum).join();
 
       // Put data: r4->v4
+      Log.info("Loading r4 to v4 into " + Bytes.toString(TABLENAME));
       putDataAndVerify(table, "r4", FAMILY, "v4", 4);
 
     } finally {



Mime
View raw message