You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by GitBox <gi...@apache.org> on 2020/04/26 09:27:10 UTC

[GitHub] [hadoop-ozone] mukul1987 commented on a change in pull request #842: HDDS-3455. Change MiniLoadGenerator to a pluggable model.

mukul1987 commented on a change in pull request #842:
URL: https://github.com/apache/hadoop-ozone/pull/842#discussion_r415264475



##########
File path: hadoop-ozone/fault-injection-test/mini-chaos-tests/src/test/java/org/apache/hadoop/ozone/loadgenerators/LoadExecutors.java
##########
@@ -70,15 +73,19 @@ private void load(long runTimeMillis) {
 
 
   public void startLoad(long time) {
-    LOG.info("Starting {} threads for {}", numThreads, generator);
-    try {
-      generator.initialize();
-      for (int i = 0; i < numThreads; i++) {
-        futures.add(CompletableFuture.runAsync(
-            () -> load(time), executor));
+    LOG.info("Starting {} threads for {} genrators", numThreads,
+        generators.size());
+    for (LoadGenerator gen : generators) {
+      try {
+        LOG.info("Initializing {} generator", gen);
+        gen.initialize();
+      } catch (Throwable t) {
+        LOG.error("Failed to initialize loadgen:{}", gen, t);
       }
-    } catch (Throwable t) {
-      LOG.error("Failed to initialize loadgen:{}", generator, t);
+    }
+
+    for (int i = 0; i < numThreads; i++) {
+      futures.add(CompletableFuture.runAsync(() -> load(time), executor));

Review comment:
       done, if the initialization fails. ane exception is thrown to stop the chaos cluster.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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