swagle commented on a change in pull request #558: HDDS-1217. Refactor 
ChillMode rules and chillmode manager.
URL: https://github.com/apache/hadoop/pull/558#discussion_r263220972
 
 

 ##########
 File path: 
hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/chillmode/ContainerChillModeRule.java
 ##########
 @@ -46,14 +46,20 @@
   private double maxContainer;
 
   private AtomicLong containerWithMinReplicas = new AtomicLong(0);
-  private final SCMChillModeManager chillModeManager;
 
-  public ContainerChillModeRule(Configuration conf,
+  public ContainerChillModeRule(String ruleName, EventQueue eventQueue,
+      Configuration conf,
       List<ContainerInfo> containers, SCMChillModeManager manager) {
+    super(manager, ruleName);
     chillModeCutoff = conf.getDouble(
         HddsConfigKeys.HDDS_SCM_CHILLMODE_THRESHOLD_PCT,
         HddsConfigKeys.HDDS_SCM_CHILLMODE_THRESHOLD_PCT_DEFAULT);
-    chillModeManager = manager;
+
+    if (chillModeCutoff > 1.0 || chillModeCutoff < 0.0) {
 
 Review comment:
   FFT: Guava preconditions might improve readability here.

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


With regards,
Apache Git Services

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

Reply via email to