jtuglu1 commented on code in PR #18480:
URL: https://github.com/apache/druid/pull/18480#discussion_r2325443828


##########
indexing-service/src/main/java/org/apache/druid/indexing/seekablestream/supervisor/autoscaler/LagBasedAutoScalerConfig.java:
##########
@@ -100,6 +103,9 @@ public LagBasedAutoScalerConfig(
     this.scaleOutStep = scaleOutStep != null ? scaleOutStep : 2;
     this.minTriggerScaleActionFrequencyMillis = 
minTriggerScaleActionFrequencyMillis
         != null ? minTriggerScaleActionFrequencyMillis : 600000;
+
+    Preconditions.checkArgument(stopTaskCountPercent == null || 
(stopTaskCountPercent > 0.0 && stopTaskCountPercent <= 1.0), "0.0 < 
stopTaskCountPercent <= 1.0");

Review Comment:
   Value range is (0, 1.]. I don't really like the idea of using an int field 
for this kind of thing. I'll switch the name to ratio.



##########
indexing-service/src/main/java/org/apache/druid/indexing/seekablestream/supervisor/autoscaler/LagBasedAutoScalerConfig.java:
##########
@@ -100,6 +103,9 @@ public LagBasedAutoScalerConfig(
     this.scaleOutStep = scaleOutStep != null ? scaleOutStep : 2;
     this.minTriggerScaleActionFrequencyMillis = 
minTriggerScaleActionFrequencyMillis
         != null ? minTriggerScaleActionFrequencyMillis : 600000;
+
+    Preconditions.checkArgument(stopTaskCountPercent == null || 
(stopTaskCountPercent > 0.0 && stopTaskCountPercent <= 1.0), "0.0 < 
stopTaskCountPercent <= 1.0");

Review Comment:
   Value range is (0, 1.0]. I don't really like the idea of using an int field 
for this kind of thing. I'll switch the name to ratio.



-- 
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: commits-unsubscr...@druid.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@druid.apache.org
For additional commands, e-mail: commits-h...@druid.apache.org

Reply via email to