siddhantsangwan commented on code in PR #7008:
URL: https://github.com/apache/ozone/pull/7008#discussion_r1853815232


##########
hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/safemode/ContainerSafeModeRule.java:
##########
@@ -50,10 +57,14 @@ public class ContainerSafeModeRule extends
   // Required cutoff % for containers with at least 1 reported replica.
   private double safeModeCutoff;
   // Containers read from scm db (excluding containers in ALLOCATED state).
-  private Map<Long, ContainerInfo> containerMap;
-  private double maxContainer;
-
-  private AtomicLong containerWithMinReplicas = new AtomicLong(0);
+  private Map<Long, Integer> ratisContainerMinReplicaMap;
+  private Map<Long, Set<UUID>> ratisContainerDNsMap;
+  private Map<Long, Integer> ecContainerMinReplicaMap;

Review Comment:
   We don't need to maintain this mapping either, as far as I can tell. 
Whenever we have the container id and need the replication factor of that 
container, we can use a container manager method to get it. That'll be a 
constant time (O(1)) lookup for container manager on average.



-- 
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.

To unsubscribe, e-mail: [email protected]

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