F64116045 commented on code in PR #10928:
URL: https://github.com/apache/ozone/pull/10928#discussion_r3885684322


##########
hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/node/PendingContainerTracker.java:
##########
@@ -79,11 +81,11 @@ public class PendingContainerTracker {
 
   /**
    * Two-window bucket for a single DataNode.
-   * Contains current and previous window sets, plus last roll timestamp.
+   * Contains current and previous window maps, plus last roll timestamp.
    */
   public static class TwoWindowBucket {
-    private Set<ContainerID> currentWindow = new HashSet<>();
-    private Set<ContainerID> previousWindow = new HashSet<>();
+    private Map<ContainerID, StorageType> currentWindow = new HashMap<>();
+    private Map<ContainerID, StorageType> previousWindow = new HashMap<>();

Review Comment:
   Thanks. Changed this to bucket by storage type now : 
[`PendingContainerAllocations`](https://github.com/F64116045/ozone/blob/245d501653b830618826a7dfdf522f24da220539/hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/node/PendingContainerTracker.java#L165-L199).
 I kept unknown storage type separately and count it conservatively for typed 
checks.



##########
hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/node/SCMNodeManager.java:
##########
@@ -1510,7 +1518,7 @@ public boolean test(DatanodeInfo dn) {
      * {@link PendingContainerTracker}) and sufficient Ratis metadata volume 
space.
      */
     private boolean hasEnoughSpaceForNode(DatanodeInfo dn) {
-      if (!tracker.hasAvailableSpace(dn)) {
+      if (!tracker.hasAvailableSpace(dn, 0, null)) {

Review Comment:
   Thanks, removed.



##########
hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/pipeline/PipelineManagerImpl.java:
##########
@@ -703,6 +704,7 @@ private boolean isOpenWithUnregisteredNodes(Pipeline 
pipeline) {
 
   @Override
   public boolean checkSpaceAndRecordAllocation(Pipeline pipeline, ContainerID 
containerID) {
+    StorageType storageType = getStorageTypeForPendingAllocation(pipeline);

Review Comment:
   Renamed it to 
[`getStorageType(pipeline)`](https://github.com/F64116045/ozone/blob/245d501653b830618826a7dfdf522f24da220539/hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/pipeline/PipelineManagerImpl.java#L706-L707).
 



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