JunRuiLee commented on code in PR #25596:
URL: https://github.com/apache/flink/pull/25596#discussion_r1830459540


##########
flink-runtime/src/main/java/org/apache/flink/runtime/scheduler/ExecutionSlotSharingGroup.java:
##########
@@ -31,18 +31,19 @@
 import java.util.Set;
 
 /** Represents execution vertices that will run the same shared slot. */
-class ExecutionSlotSharingGroup {
+public class ExecutionSlotSharingGroup {
 
     private final Set<ExecutionVertexID> executionVertexIds;
 
     @Nonnull private final SlotSharingGroup slotSharingGroup;
 
-    ExecutionSlotSharingGroup(@Nonnull SlotSharingGroup slotSharingGroup) {
+    @VisibleForTesting

Review Comment:
   VisibleForTesting declares that a function, field, constructor, or entire 
type is only visible for testing purposes. Therefore, there is no need to add 
this annotation here.



##########
flink-runtime/src/test/java/org/apache/flink/runtime/jobmaster/slotpool/TestingPhysicalSlotRequestBulkBuilder.java:
##########
@@ -19,35 +19,43 @@
 package org.apache.flink.runtime.jobmaster.slotpool;
 
 import org.apache.flink.runtime.clusterframework.types.ResourceProfile;
-import org.apache.flink.runtime.jobmaster.SlotRequestId;
+import org.apache.flink.runtime.scheduler.ExecutionSlotSharingGroup;
+import org.apache.flink.runtime.scheduler.SharingPhysicalSlotRequestBulk;
+import org.apache.flink.runtime.scheduler.strategy.ExecutionVertexID;
 
+import java.util.ArrayList;
 import java.util.HashMap;
+import java.util.List;
 import java.util.Map;
 import java.util.function.BiConsumer;
 
 class TestingPhysicalSlotRequestBulkBuilder {
-    private static final BiConsumer<SlotRequestId, Throwable> EMPTY_CANCELLER 
= (r, t) -> {};
-    private Map<SlotRequestId, ResourceProfile> pendingRequests = new 
HashMap<>();
-    private BiConsumer<SlotRequestId, Throwable> canceller = EMPTY_CANCELLER;
+    private static final BiConsumer<ExecutionVertexID, Throwable> 
EMPTY_CANCELLER = (r, t) -> {};
+    private Map<ExecutionSlotSharingGroup, List<ExecutionVertexID>> executions 
= new HashMap<>();
+    private Map<ExecutionSlotSharingGroup, ResourceProfile> pendingRequests = 
new HashMap<>();

Review Comment:
   executions and pendingRequests can be final.



##########
flink-runtime/src/main/java/org/apache/flink/runtime/scheduler/SharingPhysicalSlotRequestBulk.java:
##########
@@ -57,7 +58,8 @@ class SharingPhysicalSlotRequestBulk implements 
PhysicalSlotRequestBulk {
 
     private final BiConsumer<ExecutionVertexID, Throwable> 
logicalSlotRequestCanceller;
 
-    SharingPhysicalSlotRequestBulk(
+    @VisibleForTesting

Review Comment:
   ditto



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

Reply via email to