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



##########
File path: 
hadoop-ozone/fault-injection-test/mini-chaos-tests/src/test/java/org/apache/hadoop/ozone/MiniOzoneChaosCluster.java
##########
@@ -358,6 +233,11 @@ protected void initializeConfiguration() throws 
IOException {
       conf.setInt("hdds.scm.replication.event.timeout", 20 * 1000);
       conf.setInt(OzoneConfigKeys.DFS_RATIS_SNAPSHOT_THRESHOLD_KEY, 100);
       conf.setInt(OzoneConfigKeys.DFS_CONTAINER_RATIS_LOG_PURGE_GAP, 100);
+
+      conf.setInt(OMConfigKeys.
+              OZONE_OM_RATIS_SNAPSHOT_AUTO_TRIGGER_THRESHOLD_KEY, 100);
+      conf.setInt(OMConfigKeys.
+              OZONE_OM_RATIS_SNAPSHOT_AUTO_TRIGGER_THRESHOLD_KEY, 100);

Review comment:
       yes, this was supposed to be purge gap.

##########
File path: 
hadoop-ozone/fault-injection-test/mini-chaos-tests/src/test/java/org/apache/hadoop/ozone/MiniOzoneChaosCluster.java
##########
@@ -406,19 +280,71 @@ public MiniOzoneChaosCluster build() throws IOException {
       final List<HddsDatanodeService> hddsDatanodes = createHddsDatanodes(
           scm, null);
 
-      MiniOzoneChaosCluster cluster;
-      if (failureService == FailureService.DATANODE) {
-        cluster = new MiniOzoneDatanodeChaosCluster(conf, omList, scm,
-            hddsDatanodes, omServiceId);
-      } else {
-        cluster = new MiniOzoneOMChaosCluster(conf, omList, scm,
-            hddsDatanodes, omServiceId);
-      }
+      MiniOzoneChaosCluster cluster =
+          new MiniOzoneChaosCluster(conf, omList, scm, hddsDatanodes,
+              omServiceId, clazzes);
 
       if (startDataNodes) {
         cluster.startHddsDatanodes();
       }
       return cluster;
     }
   }
+
+  // OzoneManager specifc
+  public List<OzoneManager> omToFail() {
+    int numNodesToFail = FailureManager.getNumberOfOmToFail();
+    if (failedOmSet.size() >= numOzoneManagers/2) {
+      return Collections.emptyList();
+    }
+
+    int numOms = getOzoneManagersList().size();
+    List<OzoneManager> oms = new ArrayList<>(numNodesToFail);
+    for (int i = 0; i < numNodesToFail; i++) {
+      int failedNodeIndex = FailureManager.getBoundedRandomIndex(numOms);
+      oms.add(getOzoneManager(failedNodeIndex));

Review comment:
       Coverted into hashset.




----------------------------------------------------------------
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:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to