ferenc-csaky commented on code in PR #27291:
URL: https://github.com/apache/flink/pull/27291#discussion_r2649218797
##########
flink-runtime/src/main/java/org/apache/flink/runtime/resourcemanager/slotmanager/ClusterResourceStatisticsProvider.java:
##########
@@ -21,9 +21,15 @@
import org.apache.flink.runtime.clusterframework.types.ResourceProfile;
import org.apache.flink.runtime.instance.InstanceID;
+import javax.annotation.Nullable;
+
/** Provides statistics of cluster resources. */
public interface ClusterResourceStatisticsProvider {
+ /** Get total number of tasks assigned to the current instance. slots. */
+ @Nullable
+ Integer getAssignedTasks(InstanceID instanceId);
Review Comment:
Any specific reason to make this a nullable object instead of a primitive
`int`, just like the other numeric statistics we already have? And I mean it
for any interface/class we added this, so `SlotManager` and
`TaskManagerSlotInformation` as well.
`getNumberRegisteredSlotsOf(InstanceID instanceId)` is also optional, and we
just return `0` in that case. That's simpler code wise and in this context
`null` means `0`, so it seems to be fine, hence I'm not sure why we handle this
differently.
--
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]