From c8566f1ae6a277c86cdfb5147fcd20d0079fe58a Mon Sep 17 00:00:00 2001 From: sershe Date: Tue, 9 Apr 2013 18:05:02 +0000 Subject: [PATCH] HBASE-8239 ChaosMonkey action for root is irrelevant git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1466163 13f79535-47bb-0310-9956-ffa450edef68 --- .../org/apache/hadoop/hbase/HRegionInfo.java | 2 +- .../hadoop/hbase/DistributedHBaseCluster.java | 2 +- ...grationTestDataIngestSlowDeterministic.java | 4 +--- .../apache/hadoop/hbase/util/ChaosMonkey.java | 18 ------------------ 4 files changed, 3 insertions(+), 23 deletions(-) diff --git a/hbase-client/src/main/java/org/apache/hadoop/hbase/HRegionInfo.java b/hbase-client/src/main/java/org/apache/hadoop/hbase/HRegionInfo.java index 39fea4b3b47..84d4be25af8 100644 --- a/hbase-client/src/main/java/org/apache/hadoop/hbase/HRegionInfo.java +++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/HRegionInfo.java @@ -154,7 +154,7 @@ public class HRegionInfo implements Comparable { /** * Use logging. * @param encodedRegionName The encoded regionname. - * @return .META. if passed 1028785192 else returns + * @return .META. if passed 1028785192 else returns * encodedRegionName */ public static String prettyPrint(final String encodedRegionName) { diff --git a/hbase-it/src/test/java/org/apache/hadoop/hbase/DistributedHBaseCluster.java b/hbase-it/src/test/java/org/apache/hadoop/hbase/DistributedHBaseCluster.java index 05b3e86b6f5..639b12618c1 100644 --- a/hbase-it/src/test/java/org/apache/hadoop/hbase/DistributedHBaseCluster.java +++ b/hbase-it/src/test/java/org/apache/hadoop/hbase/DistributedHBaseCluster.java @@ -290,4 +290,4 @@ public class DistributedHBaseCluster extends HBaseCluster { stopRegionServer(currentServers.get(hostname)); } } -} \ No newline at end of file +} diff --git a/hbase-it/src/test/java/org/apache/hadoop/hbase/IntegrationTestDataIngestSlowDeterministic.java b/hbase-it/src/test/java/org/apache/hadoop/hbase/IntegrationTestDataIngestSlowDeterministic.java index 9520791ecc9..a5224ff678c 100644 --- a/hbase-it/src/test/java/org/apache/hadoop/hbase/IntegrationTestDataIngestSlowDeterministic.java +++ b/hbase-it/src/test/java/org/apache/hadoop/hbase/IntegrationTestDataIngestSlowDeterministic.java @@ -22,7 +22,6 @@ import org.apache.hadoop.hbase.util.ChaosMonkey.BatchRestartRs; import org.apache.hadoop.hbase.util.ChaosMonkey.RestartActiveMaster; import org.apache.hadoop.hbase.util.ChaosMonkey.RestartRandomRs; import org.apache.hadoop.hbase.util.ChaosMonkey.RestartRsHoldingMeta; -import org.apache.hadoop.hbase.util.ChaosMonkey.RestartRsHoldingRoot; import org.apache.hadoop.hbase.util.ChaosMonkey.RollingBatchRestartRs; import org.junit.After; import org.junit.Before; @@ -51,8 +50,7 @@ public class IntegrationTestDataIngestSlowDeterministic extends IngestIntegratio new BatchRestartRs(5000, 0.5f), new RestartActiveMaster(5000), new RollingBatchRestartRs(5000, 1.0f), - new RestartRsHoldingMeta(35000), - new RestartRsHoldingRoot(35000) + new RestartRsHoldingMeta(35000) }; monkey = new ChaosMonkey(util, new ChaosMonkey.CompositeSequentialPolicy( new ChaosMonkey.DoActionsOncePolicy(CHAOS_EVERY_MS, actions), diff --git a/hbase-it/src/test/java/org/apache/hadoop/hbase/util/ChaosMonkey.java b/hbase-it/src/test/java/org/apache/hadoop/hbase/util/ChaosMonkey.java index 984de1a8efa..06896536914 100644 --- a/hbase-it/src/test/java/org/apache/hadoop/hbase/util/ChaosMonkey.java +++ b/hbase-it/src/test/java/org/apache/hadoop/hbase/util/ChaosMonkey.java @@ -294,22 +294,6 @@ public class ChaosMonkey extends AbstractHBaseTool implements Stoppable { } } - public static class RestartRsHoldingRoot extends RestartRandomRs { - public RestartRsHoldingRoot(long sleepTime) { - super(sleepTime); - } - @Override - protected void perform() throws Exception { - LOG.info("Performing action: Restart region server holding ROOT"); - ServerName server = cluster.getServerHoldingRoot(); - if (server == null) { - LOG.warn("No server is holding -ROOT- right now."); - return; - } - restartRs(server, sleepTime); - } - } - /** * Restarts a ratio of the running regionservers at the same time */ @@ -659,7 +643,6 @@ public class ChaosMonkey extends AbstractHBaseTool implements Stoppable { * - Restart random regionserver (sleep 5 sec) : 2 * - Restart random regionserver (sleep 60 sec) : 2 * - Restart META regionserver (sleep 5 sec) : 1 - * - Restart ROOT regionserver (sleep 5 sec) : 1 * - Batch restart of 50% of regionservers (sleep 5 sec) : 2 * - Rolling restart of 100% of regionservers (sleep 5 sec) : 2 */ @@ -669,7 +652,6 @@ public class ChaosMonkey extends AbstractHBaseTool implements Stoppable { new Pair(new RestartRandomRs(FIVE_SEC), 2), new Pair(new RestartRandomRs(ONE_MIN), 2), new Pair(new RestartRsHoldingMeta(FIVE_SEC), 1), - new Pair(new RestartRsHoldingRoot(FIVE_SEC), 1), new Pair(new BatchRestartRs(FIVE_SEC, 0.5f), 2), new Pair(new RollingBatchRestartRs(FIVE_SEC, 1.0f), 2) );