rkhachatryan commented on code in PR #21981:
URL: https://github.com/apache/flink/pull/21981#discussion_r1113505496
##########
flink-runtime/src/main/java/org/apache/flink/runtime/scheduler/adaptive/allocator/SlotAllocator.java:
##########
@@ -54,6 +54,18 @@ public interface SlotAllocator {
Optional<? extends VertexParallelism> determineParallelism(
JobInformation jobInformation, Collection<? extends SlotInfo>
slots);
+ /**
+ * Same as {@link #determineParallelism(JobInformation, Collection)} but
additionally determine
+ * assignment of slots to execution slot sharing groups.
+ */
+ default Optional<? extends VertexParallelismWithSlotSharing>
Review Comment:
I agree that slot sharing is an implementation detail.
However, one difference that I'd like to expose, is that
`VertexParallelismWithSlotSharing` contains assignments, while
`VertexParallelism` is only about parallelism.
I think the right way to do that is to parameterize `SlotAllocator` with
this type, and let `SlotSharingSlotAllocator` use
`VertexParallelismWithSlotSharing`:
```
interface SlotAllocator<A> {
VertexParallelism determineParallelism(); // for hasResources, canScaleUp
A determineAssignments(...); // for tryReserveResources later
tryReserveResources(A);
}
```
WDYT?
--
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]