You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by st...@apache.org on 2013/05/25 02:09:53 UTC

svn commit: r1486255 - in /hbase/trunk: hbase-it/src/test/java/org/apache/hadoop/hbase/ hbase-it/src/test/java/org/apache/hadoop/hbase/test/ hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/

Author: stack
Date: Sat May 25 00:09:52 2013
New Revision: 1486255

URL: http://svn.apache.org/r1486255
Log:
HBASE-8583 Create a new IntegrationTestBigLinkedListWithChaosMonkey

Modified:
    hbase/trunk/hbase-it/src/test/java/org/apache/hadoop/hbase/IntegrationTestingUtility.java
    hbase/trunk/hbase-it/src/test/java/org/apache/hadoop/hbase/test/IntegrationTestBigLinkedList.java
    hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java

Modified: hbase/trunk/hbase-it/src/test/java/org/apache/hadoop/hbase/IntegrationTestingUtility.java
URL: http://svn.apache.org/viewvc/hbase/trunk/hbase-it/src/test/java/org/apache/hadoop/hbase/IntegrationTestingUtility.java?rev=1486255&r1=1486254&r2=1486255&view=diff
==============================================================================
--- hbase/trunk/hbase-it/src/test/java/org/apache/hadoop/hbase/IntegrationTestingUtility.java (original)
+++ hbase/trunk/hbase-it/src/test/java/org/apache/hadoop/hbase/IntegrationTestingUtility.java Sat May 25 00:09:52 2013
@@ -116,7 +116,7 @@ public class IntegrationTestingUtility e
    * cluster or a local cluster.
    * @see IntegrationTestingUtility#setUseDistributedCluster(Configuration)
    */
-  private boolean isDistributedCluster() {
+  public boolean isDistributedCluster() {
     Configuration conf = getConfiguration();
     boolean isDistributedCluster = false;
     isDistributedCluster = Boolean.parseBoolean(System.getProperty(IS_DISTRIBUTED_CLUSTER, "false"));

Modified: hbase/trunk/hbase-it/src/test/java/org/apache/hadoop/hbase/test/IntegrationTestBigLinkedList.java
URL: http://svn.apache.org/viewvc/hbase/trunk/hbase-it/src/test/java/org/apache/hadoop/hbase/test/IntegrationTestBigLinkedList.java?rev=1486255&r1=1486254&r2=1486255&view=diff
==============================================================================
--- hbase/trunk/hbase-it/src/test/java/org/apache/hadoop/hbase/test/IntegrationTestBigLinkedList.java (original)
+++ hbase/trunk/hbase-it/src/test/java/org/apache/hadoop/hbase/test/IntegrationTestBigLinkedList.java Sat May 25 00:09:52 2013
@@ -148,9 +148,9 @@ import org.junit.experimental.categories
 @Category(IntegrationTests.class)
 public class IntegrationTestBigLinkedList extends Configured implements Tool {
 
-  private static final String TABLE_NAME_KEY = "IntegrationTestBigLinkedList.table";
+  protected static String TABLE_NAME_KEY = "IntegrationTestBigLinkedList.table";
 
-  private static final String DEFAULT_TABLE_NAME = "IntegrationTestBigLinkedList";
+  protected static String DEFAULT_TABLE_NAME = "IntegrationTestBigLinkedList";
 
   private static byte[] FAMILY_NAME = Bytes.toBytes("meta");
 
@@ -170,6 +170,8 @@ public class IntegrationTestBigLinkedLis
   private static final String GENERATOR_NUM_MAPPERS_KEY
     = "IntegrationTestBigLinkedList.generator.map.tasks";
 
+  protected int NUM_SLAVES_BASE = 3; // number of slaves for the cluster
+
   static class CINode {
     long key;
     long prev;
@@ -648,7 +650,7 @@ public class IntegrationTestBigLinkedLis
    * Executes Generate and Verify in a loop. Data is not cleaned between runs, so each iteration
    * adds more data.
    */
-  private static class Loop extends Configured implements Tool {
+  static class Loop extends Configured implements Tool {
 
     private static final Log LOG = LogFactory.getLog(Loop.class);
 
@@ -916,12 +918,12 @@ public class IntegrationTestBigLinkedLis
     return node;
   }
 
-  private IntegrationTestingUtility util;
+  protected IntegrationTestingUtility util;
 
   @Before
   public void setUp() throws Exception {
     util = getTestingUtil();
-    util.initializeCluster(3);
+    util.initializeCluster(this.NUM_SLAVES_BASE);
     this.setConf(util.getConfiguration());
   }
 
@@ -939,7 +941,7 @@ public class IntegrationTestBigLinkedLis
     org.junit.Assert.assertEquals(0, ret);
   }
 
-  private IntegrationTestingUtility getTestingUtil() {
+  protected IntegrationTestingUtility getTestingUtil() {
     if (this.util == null) {
       if (getConf() == null) {
         this.util = new IntegrationTestingUtility();

Modified: hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java
URL: http://svn.apache.org/viewvc/hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java?rev=1486255&r1=1486254&r2=1486255&view=diff
==============================================================================
--- hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java (original)
+++ hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java Sat May 25 00:09:52 2013
@@ -930,7 +930,7 @@ public class HRegionServer implements Cl
     }
 
     //fsOk flag may be changed when closing regions throws exception.
-    if (!this.killed && this.fsOk) {
+    if (this.fsOk) {
       closeWAL(!abortRequested);
     }