Github user StefanRRichter commented on a diff in the pull request:
https://github.com/apache/flink/pull/6208#discussion_r198121746
--- Diff:
flink-runtime/src/main/java/org/apache/flink/runtime/jobmaster/JobMaster.java
---
@@ -280,12 +281,7 @@ public JobMaster(
resourceManagerLeaderRetriever =
highAvailabilityServices.getResourceManagerLeaderRetriever();
- this.slotPool = new SlotPool(
- rpcService,
- jobGraph.getJobID(),
- SystemClock.getInstance(),
- rpcTimeout,
- jobMasterConfiguration.getSlotIdleTimeout());
+ this.slotPool =
checkNotNull(slotPoolFactory).createSlotPool(jobGraph.getJobID());
--- End diff --
It seems like you could also construct the `SlotPool` outside just pass it
directly into the constructor. The factory is only used to deliver the
`SlotPool`-object and no reference is kept.
---