nandakumar131 commented on a change in pull request #1274:
URL: https://github.com/apache/hadoop-ozone/pull/1274#discussion_r496111822



##########
File path: 
hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/node/DatanodeInfo.java
##########
@@ -121,6 +143,19 @@ public int getHealthyVolumeCount() {
     }
   }
 
+  /**
+   * Returns count of healthy raft log volumes reported from datanode.
+   * @return count of healthy raft log volumes
+   */
+  public int getRaftLogVolumeCount() {

Review comment:
       Rename suggestion: `getMetadataVolumeCount()`

##########
File path: 
hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/container/SCMContainerManager.java
##########
@@ -101,12 +103,23 @@ public SCMContainerManager(
     this.numContainerPerVolume = conf
         .getInt(ScmConfigKeys.OZONE_SCM_PIPELINE_OWNER_CONTAINER_COUNT,
             ScmConfigKeys.OZONE_SCM_PIPELINE_OWNER_CONTAINER_COUNT_DEFAULT);
+    this.numPipelinesPerRaftLogDisk = conf
+        .getInt(ScmConfigKeys.OZONE_SCM_PIPELINE_PER_RAFT_LOG_DISK,
+            ScmConfigKeys.OZONE_SCM_PIPELINE_PER_RAFT_LOG_DISK_DEFAULT);
 
     loadExistingContainers();
 
     scmContainerManagerMetrics = SCMContainerManagerMetrics.create();
   }
 
+  private int getOpenContainerCountPerPipeline(Pipeline pipeline) {
+    int totalContainerCountPerDn = numContainerPerVolume *
+        pipelineManager.getNumHealthyVolumes(pipeline);
+    int maxPipelineCountPerDn = pipelineManager.maxPipelineLimit(pipeline);
+    return (int) Math.ceil(
+        ((double) totalContainerCountPerDn / maxPipelineCountPerDn));
+  }
+

Review comment:
       Will this work in case of heterogeneous datanodes, where one datanode 
has 1 Raft log disk with 2 data disk and the other datanode has 5 Raft log disk 
with 10 data disk?
   
   According to the current logic `getOpenContainerCountPerPipeline` will 
return 10, if `numContainerPerVolume` and `numPipelinesPerRaftLogDisk` are set 
to 2.
   
   
   
   




----------------------------------------------------------------
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:
us...@infra.apache.org



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

Reply via email to