nozjkoitop commented on code in PR #16889:
URL: https://github.com/apache/druid/pull/16889#discussion_r1776874188
##########
indexing-service/src/main/java/org/apache/druid/indexing/overlord/config/WorkerTaskRunnerConfig.java:
##########
@@ -48,4 +56,36 @@ public double getParallelIndexTaskSlotRatio()
{
return parallelIndexTaskSlotRatio;
}
+
+ /**
+ * Returns a map where each key is a task type (`String`), and the value is
an `Integer`
+ * representing the absolute limit on the number of task slots that tasks of
this type can occupy.
+ * <p>
+ * This absolute limit specifies the maximum number of task slots available
to a specific task type.
+ * <p>
+ * If both an absolute limit and a ratio (from {@link #getTaskSlotRatios()})
are specified for the same task type,
+ * the effective limit will be the smaller of the two.
+ *
+ * @return A map of task types with their corresponding absolute slot limits.
+ */
+ public Map<String, Integer> getTaskSlotLimits()
+ {
+ return taskSlotLimits;
+ }
+
+ /**
+ * Returns a map where each key is a task type (`String`), and the value is
a `Double` which should be in the
+ * range [0, 1], representing the ratio of available task slots that tasks
of this type can occupy.
+ * <p>
+ * This ratio defines the proportion of total task slots a task type can
use, calculated as `ratio * totalSlots`.
+ * <p>
+ * If both a ratio and an absolute limit (from {@link #getTaskSlotLimits()})
are specified for the same task type,
+ * the effective limit will be the smaller of the two.
+ *
+ * @return A map of task types with their corresponding slot ratios.
Review Comment:
Added, thanks
##########
indexing-service/src/main/java/org/apache/druid/indexing/overlord/ImmutableWorkerInfo.java:
##########
@@ -260,12 +381,20 @@ public boolean equals(Object o)
: that.blacklistedUntil != null);
}
+ public Map<String, Integer> incrementTypeSpecificCapacity(String type, int
capacityToAdd)
Review Comment:
Added
--
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]