From 413d4b2d0fa78c3877ac1422f20a32e0508f741c Mon Sep 17 00:00:00 2001 From: BukrosSzabolcs Date: Thu, 12 Dec 2019 23:32:26 +0100 Subject: [PATCH] HBASE-23566: Fix package/packet terminology problem in chaos monkeys (#933) s/package/packet/g Signed-off-by: Sean Busbey --- ...dAction.java => CorruptPacketsCommandAction.java} | 16 ++++++++-------- ...andAction.java => DelayPacketsCommandAction.java} | 10 +++++----- ...ction.java => DuplicatePacketsCommandAction.java} | 16 ++++++++-------- ...mandAction.java => LosePacketsCommandAction.java} | 16 ++++++++-------- ...dAction.java => ReorderPacketsCommandAction.java} | 18 +++++++++--------- .../factories/DistributedIssuesMonkeyFactory.java | 20 ++++++++++---------- 6 files changed, 48 insertions(+), 48 deletions(-) rename hbase-it/src/test/java/org/apache/hadoop/hbase/chaos/actions/{CorruptPackagesCommandAction.java => CorruptPacketsCommandAction.java} (81%) rename hbase-it/src/test/java/org/apache/hadoop/hbase/chaos/actions/{DelayPackagesCommandAction.java => DelayPacketsCommandAction.java} (88%) rename hbase-it/src/test/java/org/apache/hadoop/hbase/chaos/actions/{DuplicatePackagesCommandAction.java => DuplicatePacketsCommandAction.java} (81%) rename hbase-it/src/test/java/org/apache/hadoop/hbase/chaos/actions/{LosePackagesCommandAction.java => LosePacketsCommandAction.java} (82%) rename hbase-it/src/test/java/org/apache/hadoop/hbase/chaos/actions/{ReorderPackagesCommandAction.java => ReorderPacketsCommandAction.java} (82%) diff --git a/hbase-it/src/test/java/org/apache/hadoop/hbase/chaos/actions/CorruptPackagesCommandAction.java b/hbase-it/src/test/java/org/apache/hadoop/hbase/chaos/actions/CorruptPacketsCommandAction.java similarity index 81% rename from hbase-it/src/test/java/org/apache/hadoop/hbase/chaos/actions/CorruptPackagesCommandAction.java rename to hbase-it/src/test/java/org/apache/hadoop/hbase/chaos/actions/CorruptPacketsCommandAction.java index a89d5587a7..965bcbb6d4 100644 --- a/hbase-it/src/test/java/org/apache/hadoop/hbase/chaos/actions/CorruptPackagesCommandAction.java +++ b/hbase-it/src/test/java/org/apache/hadoop/hbase/chaos/actions/CorruptPacketsCommandAction.java @@ -27,29 +27,29 @@ import org.slf4j.LoggerFactory; /** * - * Corrupt network packages on a random regionserver. + * Corrupt network packets on a random regionserver. */ -public class CorruptPackagesCommandAction extends TCCommandAction { - private static final Logger LOG = LoggerFactory.getLogger(CorruptPackagesCommandAction.class); +public class CorruptPacketsCommandAction extends TCCommandAction { + private static final Logger LOG = LoggerFactory.getLogger(CorruptPacketsCommandAction.class); private float ratio; private long duration; /** - * Corrupt network packages on a random regionserver. + * Corrupt network packets on a random regionserver. * - * @param ratio the ratio of packages corrupted + * @param ratio the ratio of packets corrupted * @param duration the time this issue persists in milliseconds * @param timeout the timeout for executing required commands on the region server in milliseconds * @param network network interface the regionserver uses for communication */ - public CorruptPackagesCommandAction(float ratio, long duration, long timeout, String network) { + public CorruptPacketsCommandAction(float ratio, long duration, long timeout, String network) { super(timeout, network); this.ratio = ratio; this.duration = duration; } protected void localPerform() throws IOException { - LOG.info("Starting to execute CorruptPackagesCommandAction"); + LOG.info("Starting to execute CorruptPacketsCommandAction"); ServerName server = PolicyBasedChaosMonkey.selectRandomItem(getCurrentServers()); String hostname = server.getHostname(); @@ -62,7 +62,7 @@ public class CorruptPackagesCommandAction extends TCCommandAction { clusterManager.execSudoWithRetries(hostname, timeout, getCommand(DELETE)); } - LOG.info("Finished to execute CorruptPackagesCommandAction"); + LOG.info("Finished to execute CorruptPacketsCommandAction"); } private String getCommand(String operation){ diff --git a/hbase-it/src/test/java/org/apache/hadoop/hbase/chaos/actions/DelayPackagesCommandAction.java b/hbase-it/src/test/java/org/apache/hadoop/hbase/chaos/actions/DelayPacketsCommandAction.java similarity index 88% rename from hbase-it/src/test/java/org/apache/hadoop/hbase/chaos/actions/DelayPackagesCommandAction.java rename to hbase-it/src/test/java/org/apache/hadoop/hbase/chaos/actions/DelayPacketsCommandAction.java index e4de0a270a..38578d8690 100644 --- a/hbase-it/src/test/java/org/apache/hadoop/hbase/chaos/actions/DelayPackagesCommandAction.java +++ b/hbase-it/src/test/java/org/apache/hadoop/hbase/chaos/actions/DelayPacketsCommandAction.java @@ -28,8 +28,8 @@ import org.slf4j.LoggerFactory; /** * Action adds latency to communication on a random regionserver. */ -public class DelayPackagesCommandAction extends TCCommandAction { - private static final Logger LOG = LoggerFactory.getLogger(DelayPackagesCommandAction.class); +public class DelayPacketsCommandAction extends TCCommandAction { + private static final Logger LOG = LoggerFactory.getLogger(DelayPacketsCommandAction.class); private long delay; private long duration; @@ -41,14 +41,14 @@ public class DelayPackagesCommandAction extends TCCommandAction { * @param timeout the timeout for executing required commands on the region server in milliseconds * @param network network interface the regionserver uses for communication */ - public DelayPackagesCommandAction(long delay, long duration, long timeout, String network) { + public DelayPacketsCommandAction(long delay, long duration, long timeout, String network) { super(timeout, network); this.delay = delay; this.duration = duration; } protected void localPerform() throws IOException { - LOG.info("Starting to execute DelayPackagesCommandAction"); + LOG.info("Starting to execute DelayPacketsCommandAction"); ServerName server = PolicyBasedChaosMonkey.selectRandomItem(getCurrentServers()); String hostname = server.getHostname(); @@ -61,7 +61,7 @@ public class DelayPackagesCommandAction extends TCCommandAction { clusterManager.execSudoWithRetries(hostname, timeout, getCommand(DELETE)); } - LOG.info("Finished to execute DelayPackagesCommandAction"); + LOG.info("Finished to execute DelayPacketsCommandAction"); } private String getCommand(String operation){ diff --git a/hbase-it/src/test/java/org/apache/hadoop/hbase/chaos/actions/DuplicatePackagesCommandAction.java b/hbase-it/src/test/java/org/apache/hadoop/hbase/chaos/actions/DuplicatePacketsCommandAction.java similarity index 81% rename from hbase-it/src/test/java/org/apache/hadoop/hbase/chaos/actions/DuplicatePackagesCommandAction.java rename to hbase-it/src/test/java/org/apache/hadoop/hbase/chaos/actions/DuplicatePacketsCommandAction.java index f3d54f1898..7ed74ec4cd 100644 --- a/hbase-it/src/test/java/org/apache/hadoop/hbase/chaos/actions/DuplicatePackagesCommandAction.java +++ b/hbase-it/src/test/java/org/apache/hadoop/hbase/chaos/actions/DuplicatePacketsCommandAction.java @@ -27,29 +27,29 @@ import org.slf4j.LoggerFactory; /** * - * Duplicate network packages on a random regionserver. + * Duplicate network packets on a random regionserver. */ -public class DuplicatePackagesCommandAction extends TCCommandAction { - private static final Logger LOG = LoggerFactory.getLogger(DuplicatePackagesCommandAction.class); +public class DuplicatePacketsCommandAction extends TCCommandAction { + private static final Logger LOG = LoggerFactory.getLogger(DuplicatePacketsCommandAction.class); private float ratio; private long duration; /** - * Duplicate network packages on a random regionserver. + * Duplicate network packets on a random regionserver. * - * @param ratio the ratio of packages duplicated + * @param ratio the ratio of packets duplicated * @param duration the time this issue persists in milliseconds * @param timeout the timeout for executing required commands on the region server in milliseconds * @param network network interface the regionserver uses for communication */ - public DuplicatePackagesCommandAction(float ratio, long duration, long timeout, String network) { + public DuplicatePacketsCommandAction(float ratio, long duration, long timeout, String network) { super(timeout, network); this.ratio = ratio; this.duration = duration; } protected void localPerform() throws IOException { - LOG.info("Starting to execute DuplicatePackagesCommandAction"); + LOG.info("Starting to execute DuplicatePacketsCommandAction"); ServerName server = PolicyBasedChaosMonkey.selectRandomItem(getCurrentServers()); String hostname = server.getHostname(); @@ -62,7 +62,7 @@ public class DuplicatePackagesCommandAction extends TCCommandAction { clusterManager.execSudoWithRetries(hostname, timeout, getCommand(DELETE)); } - LOG.info("Finished to execute DuplicatePackagesCommandAction"); + LOG.info("Finished to execute DuplicatePacketsCommandAction"); } private String getCommand(String operation){ diff --git a/hbase-it/src/test/java/org/apache/hadoop/hbase/chaos/actions/LosePackagesCommandAction.java b/hbase-it/src/test/java/org/apache/hadoop/hbase/chaos/actions/LosePacketsCommandAction.java similarity index 82% rename from hbase-it/src/test/java/org/apache/hadoop/hbase/chaos/actions/LosePackagesCommandAction.java rename to hbase-it/src/test/java/org/apache/hadoop/hbase/chaos/actions/LosePacketsCommandAction.java index e44cac7ade..8b09daf4cf 100644 --- a/hbase-it/src/test/java/org/apache/hadoop/hbase/chaos/actions/LosePackagesCommandAction.java +++ b/hbase-it/src/test/java/org/apache/hadoop/hbase/chaos/actions/LosePacketsCommandAction.java @@ -27,29 +27,29 @@ import org.slf4j.LoggerFactory; /** * - * Lose network packages on a random regionserver. + * Lose network packets on a random regionserver. */ -public class LosePackagesCommandAction extends TCCommandAction { - private static final Logger LOG = LoggerFactory.getLogger(LosePackagesCommandAction.class); +public class LosePacketsCommandAction extends TCCommandAction { + private static final Logger LOG = LoggerFactory.getLogger(LosePacketsCommandAction.class); private float ratio; private long duration; /** - * Lose network packages on a random regionserver. + * Lose network packets on a random regionserver. * - * @param ratio the ratio of packages lost + * @param ratio the ratio of packets lost * @param duration the time this issue persists in milliseconds * @param timeout the timeout for executing required commands on the region server in milliseconds * @param network network interface the regionserver uses for communication */ - public LosePackagesCommandAction(float ratio, long duration, long timeout, String network) { + public LosePacketsCommandAction(float ratio, long duration, long timeout, String network) { super(timeout, network); this.ratio = ratio; this.duration = duration; } protected void localPerform() throws IOException { - LOG.info("Starting to execute LosePackagesCommandAction"); + LOG.info("Starting to execute LosePacketsCommandAction"); ServerName server = PolicyBasedChaosMonkey.selectRandomItem(getCurrentServers()); String hostname = server.getHostname(); @@ -62,7 +62,7 @@ public class LosePackagesCommandAction extends TCCommandAction { clusterManager.execSudoWithRetries(hostname, timeout, getCommand(DELETE)); } - LOG.info("Finished to execute LosePackagesCommandAction"); + LOG.info("Finished to execute LosePacketsCommandAction"); } private String getCommand(String operation){ diff --git a/hbase-it/src/test/java/org/apache/hadoop/hbase/chaos/actions/ReorderPackagesCommandAction.java b/hbase-it/src/test/java/org/apache/hadoop/hbase/chaos/actions/ReorderPacketsCommandAction.java similarity index 82% rename from hbase-it/src/test/java/org/apache/hadoop/hbase/chaos/actions/ReorderPackagesCommandAction.java rename to hbase-it/src/test/java/org/apache/hadoop/hbase/chaos/actions/ReorderPacketsCommandAction.java index 01166a5b12..1bb7969bb7 100644 --- a/hbase-it/src/test/java/org/apache/hadoop/hbase/chaos/actions/ReorderPackagesCommandAction.java +++ b/hbase-it/src/test/java/org/apache/hadoop/hbase/chaos/actions/ReorderPacketsCommandAction.java @@ -27,24 +27,24 @@ import org.slf4j.LoggerFactory; /** * - * Reorder network packages on a random regionserver. + * Reorder network packets on a random regionserver. */ -public class ReorderPackagesCommandAction extends TCCommandAction { - private static final Logger LOG = LoggerFactory.getLogger(ReorderPackagesCommandAction.class); +public class ReorderPacketsCommandAction extends TCCommandAction { + private static final Logger LOG = LoggerFactory.getLogger(ReorderPacketsCommandAction.class); private float ratio; private long duration; private long delay; /** - * Reorder network packages on a random regionserver. + * Reorder network packets on a random regionserver. * - * @param ratio the ratio of packages reordered + * @param ratio the ratio of packets reordered * @param duration the time this issue persists in milliseconds - * @param delay the delay between reordered and non-reordered packages in milliseconds + * @param delay the delay between reordered and non-reordered packets in milliseconds * @param timeout the timeout for executing required commands on the region server in milliseconds * @param network network interface the regionserver uses for communication */ - public ReorderPackagesCommandAction(float ratio, long duration, long delay, long timeout, + public ReorderPacketsCommandAction(float ratio, long duration, long delay, long timeout, String network) { super(timeout, network); this.ratio = ratio; @@ -53,7 +53,7 @@ public class ReorderPackagesCommandAction extends TCCommandAction { } protected void localPerform() throws IOException { - LOG.info("Starting to execute ReorderPackagesCommandAction"); + LOG.info("Starting to execute ReorderPacketsCommandAction"); ServerName server = PolicyBasedChaosMonkey.selectRandomItem(getCurrentServers()); String hostname = server.getHostname(); @@ -66,7 +66,7 @@ public class ReorderPackagesCommandAction extends TCCommandAction { clusterManager.execSudoWithRetries(hostname, timeout, getCommand(DELETE)); } - LOG.info("Finished to execute ReorderPackagesCommandAction"); + LOG.info("Finished to execute ReorderPacketsCommandAction"); } private String getCommand(String operation){ diff --git a/hbase-it/src/test/java/org/apache/hadoop/hbase/chaos/factories/DistributedIssuesMonkeyFactory.java b/hbase-it/src/test/java/org/apache/hadoop/hbase/chaos/factories/DistributedIssuesMonkeyFactory.java index 745f1b9aae..3091fa5557 100644 --- a/hbase-it/src/test/java/org/apache/hadoop/hbase/chaos/factories/DistributedIssuesMonkeyFactory.java +++ b/hbase-it/src/test/java/org/apache/hadoop/hbase/chaos/factories/DistributedIssuesMonkeyFactory.java @@ -20,13 +20,13 @@ package org.apache.hadoop.hbase.chaos.factories; import org.apache.hadoop.hbase.chaos.actions.Action; import org.apache.hadoop.hbase.chaos.actions.AddCPULoadAction; -import org.apache.hadoop.hbase.chaos.actions.CorruptPackagesCommandAction; -import org.apache.hadoop.hbase.chaos.actions.DelayPackagesCommandAction; +import org.apache.hadoop.hbase.chaos.actions.CorruptPacketsCommandAction; +import org.apache.hadoop.hbase.chaos.actions.DelayPacketsCommandAction; import org.apache.hadoop.hbase.chaos.actions.DumpClusterStatusAction; -import org.apache.hadoop.hbase.chaos.actions.DuplicatePackagesCommandAction; +import org.apache.hadoop.hbase.chaos.actions.DuplicatePacketsCommandAction; import org.apache.hadoop.hbase.chaos.actions.FillDiskCommandAction; -import org.apache.hadoop.hbase.chaos.actions.LosePackagesCommandAction; -import org.apache.hadoop.hbase.chaos.actions.ReorderPackagesCommandAction; +import org.apache.hadoop.hbase.chaos.actions.LosePacketsCommandAction; +import org.apache.hadoop.hbase.chaos.actions.ReorderPacketsCommandAction; import org.apache.hadoop.hbase.chaos.monkies.ChaosMonkey; import org.apache.hadoop.hbase.chaos.monkies.PolicyBasedChaosMonkey; import org.apache.hadoop.hbase.chaos.policies.PeriodicRandomActionPolicy; @@ -57,15 +57,15 @@ public class DistributedIssuesMonkeyFactory extends MonkeyFactory { Action[] actions1 = new Action[] { new AddCPULoadAction(cpuLoadDuration, cpuLoadProcesses, networkIssueTimeout), - new CorruptPackagesCommandAction(networkIssueRation, networkIssueDuration, + new CorruptPacketsCommandAction(networkIssueRation, networkIssueDuration, networkIssueTimeout, networkIssueInterface), - new DuplicatePackagesCommandAction(networkIssueRation, networkIssueDuration, + new DuplicatePacketsCommandAction(networkIssueRation, networkIssueDuration, networkIssueTimeout, networkIssueInterface), - new LosePackagesCommandAction(networkIssueRation, networkIssueDuration, + new LosePacketsCommandAction(networkIssueRation, networkIssueDuration, networkIssueTimeout, networkIssueInterface), - new DelayPackagesCommandAction(networkIssueDelay, networkIssueDuration, + new DelayPacketsCommandAction(networkIssueDelay, networkIssueDuration, networkIssueTimeout, networkIssueInterface), - new ReorderPackagesCommandAction(networkIssueRation, networkIssueDuration, + new ReorderPacketsCommandAction(networkIssueRation, networkIssueDuration, networkIssueDelay, networkIssueTimeout, networkIssueInterface), new FillDiskCommandAction(fillDiskFileSize, fillDiskIssueduration, fillDiskPath, fillDiskTimeout)}; -- 2.11.4.GIT