zachjsh commented on code in PR #14769:
URL: https://github.com/apache/druid/pull/14769#discussion_r1286595213


##########
server/src/main/java/org/apache/druid/server/coordinator/CoordinatorDynamicConfig.java:
##########
@@ -158,6 +164,20 @@ public CoordinatorDynamicConfig(
     this.balancerComputeThreads = Math.max(balancerComputeThreads, 1);
     this.specificDataSourcesToKillUnusedSegmentsIn
         = parseJsonStringOrArray(specificDataSourcesToKillUnusedSegmentsIn);
+    if (null != killTaskSlotRatio && (killTaskSlotRatio < 0 || 
killTaskSlotRatio > 1)) {
+      throw InvalidInput.exception(
+          "killTaskSlotRatio [%.2f] is invalid. It must be >= 0 and <= 1.",
+          killTaskSlotRatio
+      );
+    }
+    this.killTaskSlotRatio = killTaskSlotRatio != null ? killTaskSlotRatio : 
Defaults.KILL_TASK_SLOT_RATIO;
+    if (null != maxKillTaskSlots && maxKillTaskSlots < 0) {
+      throw InvalidInput.exception(
+          "maxKillTaskSlots [%d] is invalid. It must be > 0.",

Review Comment:
   fixed



##########
server/src/main/java/org/apache/druid/server/coordinator/CoordinatorDynamicConfig.java:
##########
@@ -495,6 +533,8 @@ private static class Defaults
     static final int MAX_NON_PRIMARY_REPLICANTS_TO_LOAD = Integer.MAX_VALUE;
     static final boolean USE_ROUND_ROBIN_ASSIGNMENT = true;
     static final boolean SMART_SEGMENT_LOADING = true;
+    static final double KILL_TASK_SLOT_RATIO = 1.0;
+    static final int MAX_KILL_TASK_SLOTS = Integer.MAX_VALUE;

Review Comment:
   added, thanks



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