Author: stack Date: Sat May 25 00:10:21 2013 New Revision: 1486256 URL: http://svn.apache.org/r1486256 Log: HBASE-8583 Create a new IntegrationTestBigLinkedListWithChaosMonkey
Modified: hbase/branches/0.95/hbase-it/src/test/java/org/apache/hadoop/hbase/IntegrationTestingUtility.java hbase/branches/0.95/hbase-it/src/test/java/org/apache/hadoop/hbase/test/IntegrationTestBigLinkedList.java hbase/branches/0.95/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java Modified: hbase/branches/0.95/hbase-it/src/test/java/org/apache/hadoop/hbase/IntegrationTestingUtility.java URL: http://svn.apache.org/viewvc/hbase/branches/0.95/hbase-it/src/test/java/org/apache/hadoop/hbase/IntegrationTestingUtility.java?rev=1486256&r1=1486255&r2=1486256&view=diff ============================================================================== --- hbase/branches/0.95/hbase-it/src/test/java/org/apache/hadoop/hbase/IntegrationTestingUtility.java (original) +++ hbase/branches/0.95/hbase-it/src/test/java/org/apache/hadoop/hbase/IntegrationTestingUtility.java Sat May 25 00:10:21 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/branches/0.95/hbase-it/src/test/java/org/apache/hadoop/hbase/test/IntegrationTestBigLinkedList.java URL: http://svn.apache.org/viewvc/hbase/branches/0.95/hbase-it/src/test/java/org/apache/hadoop/hbase/test/IntegrationTestBigLinkedList.java?rev=1486256&r1=1486255&r2=1486256&view=diff ============================================================================== --- hbase/branches/0.95/hbase-it/src/test/java/org/apache/hadoop/hbase/test/IntegrationTestBigLinkedList.java (original) +++ hbase/branches/0.95/hbase-it/src/test/java/org/apache/hadoop/hbase/test/IntegrationTestBigLinkedList.java Sat May 25 00:10:21 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/branches/0.95/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java URL: http://svn.apache.org/viewvc/hbase/branches/0.95/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java?rev=1486256&r1=1486255&r2=1486256&view=diff ============================================================================== --- hbase/branches/0.95/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java (original) +++ hbase/branches/0.95/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java Sat May 25 00:10:21 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); }