tillrohrmann commented on a change in pull request #17059:
URL: https://github.com/apache/flink/pull/17059#discussion_r699387325



##########
File path: 
flink-runtime/src/main/java/org/apache/flink/runtime/jobmaster/slotpool/DefaultAllocatedSlotPool.java
##########
@@ -234,4 +241,30 @@ private static DefaultFreeSlotInfo create(
                     Preconditions.checkNotNull(slotInfoWithUtilization), 
idleSince);
         }
     }
+
+    private static final class DefaultAllocatedSlotsAndReservationStatus
+            implements AllocatedSlotsAndReservationStatus {
+
+        private final Map<AllocatedSlot, ReservationStatus> 
slotsAndReservationStatus;

Review comment:
       `AllocatedSlot` is not intended to be a key for hash maps. Hence, it 
does not implement a proper `hashCode` method. I would suggest to use the 
`AllocationID`.

##########
File path: 
flink-runtime/src/test/java/org/apache/flink/runtime/jobmaster/slotpool/DefaultDeclarativeSlotPoolTest.java
##########
@@ -739,4 +821,15 @@ public void describeTo(Description description) {
             return result;
         }
     }
+
+    private static class TestPhysicalSlotPayload implements 
PhysicalSlot.Payload {
+
+        @Override
+        public void release(Throwable cause) {}
+
+        @Override
+        public boolean willOccupySlotIndefinitely() {
+            return false;
+        }
+    }

Review comment:
       The same class also exists in `SharedSlotTest`. Maybe we can unify them.




-- 
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: issues-unsubscr...@flink.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to