bharatviswa504 commented on a change in pull request #534: HDDS-1193. Refactor 
ContainerChillModeRule and DatanodeChillMode rule.
URL: https://github.com/apache/hadoop/pull/534#discussion_r262249732
 
 

 ##########
 File path: 
hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/chillmode/ContainerChillModeRule.java
 ##########
 @@ -84,10 +84,6 @@ public double getCurrentContainerThreshold() {
 
   @Override
   public void process(NodeRegistrationContainerReport reportsProto) {
-    if (maxContainer == 0) {
 
 Review comment:
   In validate(), we call getCurrentContainerThreshold(),
   
   ```
    public double getCurrentContainerThreshold() {
       if (maxContainer == 0) {
         return 1;
       }
       return (containerWithMinReplicas.doubleValue() / maxContainer);
     }
   
     public boolean validate() {
       return getCurrentContainerThreshold() >= chillModeCutoff;
     }
   ```
   
   So, if maxContainer=0, in validate() call, we get 1 from 
getCurrentContainerThreshold() and do >= check. 

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


With regards,
Apache Git Services

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

Reply via email to