XComp commented on a change in pull request #13547:
URL: https://github.com/apache/flink/pull/13547#discussion_r505387654



##########
File path: 
flink-runtime/src/main/java/org/apache/flink/runtime/taskexecutor/slot/TaskSlotTable.java
##########
@@ -199,10 +208,11 @@ default int freeSlot(AllocationID allocationId) throws 
SlotNotFoundException {
        /**
         * Return an iterator of allocated slots for the given job id.
         *
-        * @param jobId for which to return the allocated slots
+        * @param jobId for which to return the allocated slots. If {@code 
null} is passed,
+        * all allocated slots held by this {@code TaskSlotTable} are returned.
         * @return Iterator of allocated slots.
         */
-       Iterator<TaskSlot<T>> getAllocatedSlots(JobID jobId);
+       Iterator<TaskSlot<T>> getAllocatedSlots(@Nullable JobID jobId);

Review comment:
       I added the annotation since the functionality of the `TaskSlotIterator` 
changed. I wanted to make it explicit that there is a semantic behind passing 
`null` now other than returning an empty iterator (which would be the expected 
behavior in my opinion). Or are you saying that the JavaDoc description is 
enough to stress on that?




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


Reply via email to