You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by jx...@apache.org on 2013/11/14 05:38:12 UTC
svn commit: r1541812 - in /hbase/branches/0.96:
hbase-common/src/main/resources/
hbase-it/src/test/java/org/apache/hadoop/hbase/chaos/actions/
hbase-it/src/test/java/org/apache/hadoop/hbase/chaos/factories/
hbase-it/src/test/java/org/apache/hadoop/hbas...
Author: jxiang
Date: Thu Nov 14 04:38:12 2013
New Revision: 1541812
URL: http://svn.apache.org/r1541812
Log:
HBASE-9757 Reenable fast region move in SlowDeterministicMonkey
Modified:
hbase/branches/0.96/hbase-common/src/main/resources/hbase-default.xml
hbase/branches/0.96/hbase-it/src/test/java/org/apache/hadoop/hbase/chaos/actions/ChangeEncodingAction.java
hbase/branches/0.96/hbase-it/src/test/java/org/apache/hadoop/hbase/chaos/factories/SlowDeterministicMonkeyFactory.java
hbase/branches/0.96/hbase-it/src/test/java/org/apache/hadoop/hbase/test/IntegrationTestBigLinkedList.java
Modified: hbase/branches/0.96/hbase-common/src/main/resources/hbase-default.xml
URL: http://svn.apache.org/viewvc/hbase/branches/0.96/hbase-common/src/main/resources/hbase-default.xml?rev=1541812&r1=1541811&r2=1541812&view=diff
==============================================================================
--- hbase/branches/0.96/hbase-common/src/main/resources/hbase-default.xml (original)
+++ hbase/branches/0.96/hbase-common/src/main/resources/hbase-default.xml Thu Nov 14 04:38:12 2013
@@ -874,7 +874,7 @@ possible configurations would overwhelm
</property>
<property>
<name>hbase.online.schema.update.enable</name>
- <value>false</value>
+ <value>true</value>
<description>Set true to enable online schema changes.</description>
</property>
<property>
Modified: hbase/branches/0.96/hbase-it/src/test/java/org/apache/hadoop/hbase/chaos/actions/ChangeEncodingAction.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.96/hbase-it/src/test/java/org/apache/hadoop/hbase/chaos/actions/ChangeEncodingAction.java?rev=1541812&r1=1541811&r2=1541812&view=diff
==============================================================================
--- hbase/branches/0.96/hbase-it/src/test/java/org/apache/hadoop/hbase/chaos/actions/ChangeEncodingAction.java (original)
+++ hbase/branches/0.96/hbase-it/src/test/java/org/apache/hadoop/hbase/chaos/actions/ChangeEncodingAction.java Thu Nov 14 04:38:12 2013
@@ -60,7 +60,7 @@ public class ChangeEncodingAction extend
LOG.debug("Performing action: Changing encodings on " + tableNameString);
// possible DataBlockEncoding id's
- int[] possibleIds = {0, 2, 3, 4, 6};
+ int[] possibleIds = {0, 2, 3, 4/*, 6*/};
for (HColumnDescriptor descriptor : columnDescriptors) {
short id = (short) possibleIds[random.nextInt(possibleIds.length)];
descriptor.setDataBlockEncoding(DataBlockEncoding.getEncodingById(id));
Modified: hbase/branches/0.96/hbase-it/src/test/java/org/apache/hadoop/hbase/chaos/factories/SlowDeterministicMonkeyFactory.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.96/hbase-it/src/test/java/org/apache/hadoop/hbase/chaos/factories/SlowDeterministicMonkeyFactory.java?rev=1541812&r1=1541811&r2=1541812&view=diff
==============================================================================
--- hbase/branches/0.96/hbase-it/src/test/java/org/apache/hadoop/hbase/chaos/factories/SlowDeterministicMonkeyFactory.java (original)
+++ hbase/branches/0.96/hbase-it/src/test/java/org/apache/hadoop/hbase/chaos/factories/SlowDeterministicMonkeyFactory.java Thu Nov 14 04:38:12 2013
@@ -55,7 +55,8 @@ public class SlowDeterministicMonkeyFact
new CompactTableAction(tableName, 0.5f),
new CompactRandomRegionOfTableAction(tableName, 0.6f),
new FlushTableAction(tableName),
- new FlushRandomRegionOfTableAction(tableName)
+ new FlushRandomRegionOfTableAction(tableName),
+ new MoveRandomRegionOfTableAction(tableName)
};
// Actions such as split/merge/snapshot.
@@ -64,18 +65,22 @@ public class SlowDeterministicMonkeyFact
Action[] actions2 = new Action[] {
new SplitRandomRegionOfTableAction(tableName),
new MergeRandomAdjacentRegionsOfTableAction(tableName),
- new SnapshotTableAction(tableName)
+ new SnapshotTableAction(tableName),
+ new AddColumnAction(tableName),
+ new RemoveColumnAction(tableName, columnFamilies),
+ new ChangeEncodingAction(tableName),
+ new ChangeVersionsAction(tableName)
};
// Destructive actions to mess things around.
Action[] actions3 = new Action[] {
- new MoveRegionsOfTableAction(20000, tableName),
- new MoveRandomRegionOfTableAction(20000, tableName),
+ new MoveRegionsOfTableAction(800, tableName),
+ new MoveRandomRegionOfTableAction(800, tableName),
new RestartRandomRsAction(60000),
- new BatchRestartRsAction(60000, 0.5f),
+ new BatchRestartRsAction(5000, 0.5f),
new RestartActiveMasterAction(5000),
new RollingBatchRestartRsAction(5000, 1.0f),
- new RestartRsHoldingMetaAction(35000),
+ new RestartRsHoldingMetaAction(35000)
};
// Action to log more info for debugging
Modified: hbase/branches/0.96/hbase-it/src/test/java/org/apache/hadoop/hbase/test/IntegrationTestBigLinkedList.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.96/hbase-it/src/test/java/org/apache/hadoop/hbase/test/IntegrationTestBigLinkedList.java?rev=1541812&r1=1541811&r2=1541812&view=diff
==============================================================================
--- hbase/branches/0.96/hbase-it/src/test/java/org/apache/hadoop/hbase/test/IntegrationTestBigLinkedList.java (original)
+++ hbase/branches/0.96/hbase-it/src/test/java/org/apache/hadoop/hbase/test/IntegrationTestBigLinkedList.java Thu Nov 14 04:38:12 2013
@@ -48,7 +48,6 @@ import org.apache.hadoop.hbase.Integrati
import org.apache.hadoop.hbase.IntegrationTestingUtility;
import org.apache.hadoop.hbase.IntegrationTests;
import org.apache.hadoop.hbase.TableName;
-import org.apache.hadoop.hbase.chaos.monkies.CalmChaosMonkey;
import org.apache.hadoop.hbase.client.Get;
import org.apache.hadoop.hbase.client.HBaseAdmin;
import org.apache.hadoop.hbase.client.HConnection;
@@ -65,7 +64,6 @@ import org.apache.hadoop.hbase.mapreduce
import org.apache.hadoop.hbase.mapreduce.TableRecordReaderImpl;
import org.apache.hadoop.hbase.util.AbstractHBaseTool;
import org.apache.hadoop.hbase.util.Bytes;
-import org.apache.hadoop.hbase.util.HBaseFsck;
import org.apache.hadoop.io.BytesWritable;
import org.apache.hadoop.io.NullWritable;
import org.apache.hadoop.io.Text;
@@ -754,7 +752,7 @@ public class IntegrationTestBigLinkedLis
}
}
- protected boolean runVerify(String outputDir,
+ protected void runVerify(String outputDir,
int numReducers, long expectedNumNodes) throws Exception {
Path outputPath = new Path(outputDir);
UUID uuid = UUID.randomUUID(); //create a random UUID.
@@ -768,19 +766,10 @@ public class IntegrationTestBigLinkedLis
}
if (!verify.verify(expectedNumNodes)) {
- try {
- HBaseFsck fsck = new HBaseFsck(getConf());
- HBaseFsck.setDisplayFullReport();
- fsck.connect();
- fsck.onlineHbck();
- } catch (Throwable t) {
- LOG.error("Failed to run hbck", t);
- }
- return false;
+ throw new RuntimeException("Verify.verify failed");
}
LOG.info("Verify finished with succees. Total nodes=" + expectedNumNodes);
- return true;
}
@Override
@@ -810,17 +799,7 @@ public class IntegrationTestBigLinkedLis
runGenerator(numMappers, numNodes, outputDir, width, wrapMuplitplier);
expectedNumNodes += numMappers * numNodes;
- if (!runVerify(outputDir, numReducers, expectedNumNodes)) {
- if (it.monkey != null && !(it.monkey instanceof CalmChaosMonkey)) {
- LOG.info("Verify.verify failed, let's stop CM and verify again");
- it.cleanUpMonkey("Stop monkey before verify again after verify failed");
- if (!runVerify(outputDir, numReducers, expectedNumNodes)) {
- LOG.info("Verify.verify failed even without CM, verify one more");
- runVerify(outputDir, numReducers, expectedNumNodes);
- }
- }
- throw new RuntimeException("Verify.verify failed");
- }
+ runVerify(outputDir, numReducers, expectedNumNodes);
}
return 0;