xintongsong commented on a change in pull request #10330:
[FLINK-14189][runtime] Extend TaskExecutor to support dynamic slot allocation
URL: https://github.com/apache/flink/pull/10330#discussion_r352451400
##########
File path:
flink-runtime/src/main/java/org/apache/flink/runtime/taskexecutor/slot/TaskSlotTable.java
##########
@@ -205,10 +221,11 @@ public SlotReport createSlotReport(ResourceID
resourceId) {
// ---------------------------------------------------------------------
/**
- * Allocate the slot with the given index for the given job and
allocation id. Returns true if
- * the slot could be allocated. Otherwise it returns false.
+ * Allocate the slot with the given index for the given job and
allocation id. If negative index is
+ * given, a new auto increasing index will be generated. Returns true
if the slot could be allocated.
Review comment:
I think eventually we are going to remove `SlotID` and use `AllocationID` to
identify the slots. But maybe not now, since we still need `SlotID` for the
legacy RM.
Since we're not removing the `SlotID` at the moment, I'm in favor of keep
the `SlotID` of dynamic slots valid, in other words each slot has a unique
`SlotID`. Thus, we need to crate a unique id for each dynamic slot anyway, no
matter positive or negative.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services