You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-commits@hadoop.apache.org by el...@apache.org on 2019/04/12 09:42:35 UTC

[hadoop] branch trunk updated: HDDS-1426. Minor logging improvements for MiniOzoneChaosCluster

This is an automated email from the ASF dual-hosted git repository.

elek pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/hadoop.git


The following commit(s) were added to refs/heads/trunk by this push:
     new fd676e1  HDDS-1426. Minor logging improvements for MiniOzoneChaosCluster
fd676e1 is described below

commit fd676e190a4b575121d55e49357d3d497456f10c
Author: Arpit Agarwal <ar...@apache.org>
AuthorDate: Fri Apr 12 11:34:43 2019 +0200

    HDDS-1426. Minor logging improvements for MiniOzoneChaosCluster
    
    Closes #730
---
 hadoop-ozone/integration-test/src/test/bin/start-chaos.sh        | 2 +-
 .../test/java/org/apache/hadoop/ozone/MiniOzoneChaosCluster.java | 9 +++++++--
 2 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/hadoop-ozone/integration-test/src/test/bin/start-chaos.sh b/hadoop-ozone/integration-test/src/test/bin/start-chaos.sh
index 63e4a95..d98e9ca 100755
--- a/hadoop-ozone/integration-test/src/test/bin/start-chaos.sh
+++ b/hadoop-ozone/integration-test/src/test/bin/start-chaos.sh
@@ -15,7 +15,7 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-date=`date +"%m-%d-%y-%T"`
+date=`date +"%Y-%m-%d--%H-%M-%S-%Z"`
 fileformat=".MiniOzoneChaosCluster.log"
 heapformat=".dump"
 current="/tmp/"
diff --git a/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/MiniOzoneChaosCluster.java b/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/MiniOzoneChaosCluster.java
index 52a2d40..8bef479 100644
--- a/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/MiniOzoneChaosCluster.java
+++ b/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/MiniOzoneChaosCluster.java
@@ -87,11 +87,15 @@ public class MiniOzoneChaosCluster extends MiniOzoneClusterImpl {
   }
 
   private void failNodes() {
-    for (int i = 0; i < getNumberOfNodesToFail(); i++) {
+    final int numNodesToFail = getNumberOfNodesToFail();
+    LOG.info("Will restart {} nodes to simulate failure", numNodesToFail);
+    for (int i = 0; i < numNodesToFail; i++) {
       boolean failureMode = isFastRestart();
       int failedNodeIndex = getNodeToFail();
       try {
+        LOG.info("Restarting DataNodeIndex {}", failedNodeIndex);
         restartHddsDatanode(failedNodeIndex, failureMode);
+        LOG.info("Completed restarting DataNodeIndex {}", failedNodeIndex);
       } catch (Exception e) {
 
       }
@@ -118,7 +122,8 @@ public class MiniOzoneChaosCluster extends MiniOzoneClusterImpl {
   }
 
   void startChaos(long initialDelay, long period, TimeUnit timeUnit) {
-    LOG.info("Starting Chaos with failure period:{} unit:{}", period, timeUnit);
+    LOG.info("Starting Chaos with failure period:{} unit:{} numDataNodes:{}",
+        period, timeUnit, numDatanodes);
     scheduledFuture = executorService.scheduleAtFixedRate(this::fail,
         initialDelay, period, timeUnit);
   }


---------------------------------------------------------------------
To unsubscribe, e-mail: common-commits-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-commits-help@hadoop.apache.org