abhishekrb19 commented on code in PR #15941:
URL: https://github.com/apache/druid/pull/15941#discussion_r1500196043


##########
server/src/main/java/org/apache/druid/server/coordinator/duty/KillUnusedSegments.java:
##########
@@ -282,41 +300,16 @@ private Interval findIntervalForKill(String dataSource, 
DateTime maxUsedStatusLa
 
   private int getAvailableKillTaskSlots(int killTaskCapacity, int 
numActiveKillTasks)
   {
-    return Math.max(
-        0,
-        killTaskCapacity - numActiveKillTasks
-    );
+    return Math.max(0, killTaskCapacity - numActiveKillTasks);
   }
 
   private boolean canDutyRun()
   {
     return lastKillTime == null || 
!DateTimes.nowUtc().isBefore(lastKillTime.plus(period));
   }
 
-  @VisibleForTesting
-  static int getKillTaskCapacity(int totalWorkerCapacity, double 
killTaskSlotRatio, int maxKillTaskSlots)
+  private static int getKillTaskCapacity(int totalWorkerCapacity, double 
killTaskSlotRatio, int maxKillTaskSlots)

Review Comment:
   Yeah, good point. Removed `static` and also folded this function with the 
other helper.



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