zhuzhurk commented on a change in pull request #13590:
URL: https://github.com/apache/flink/pull/13590#discussion_r503309517
##########
File path:
flink-runtime/src/test/java/org/apache/flink/runtime/jobmanager/scheduler/ScheduleWithCoLocationHintTest.java
##########
@@ -306,25 +306,25 @@ public void testGetsNonLocalFromSharingGroupFirst()
throws Exception {
// schedule something into the shared group so that both
instances are in the sharing group
LogicalSlot s1 = testingSlotProvider.allocateSlot(
- new ScheduledUnit(getExecution(jid1, 0, 2,
sharingGroup, loc1), sharingGroup.getSlotSharingGroupId()),
slotProfileForLocation(loc1), TestingUtils.infiniteTime()).get();
+ new ScheduledUnit(getExecution(jid1, 0, 2,
sharingGroup), sharingGroup.getSlotSharingGroupId()),
slotProfileForLocation(loc1), TestingUtils.infiniteTime()).get();
LogicalSlot s2 = testingSlotProvider.allocateSlot(
- new ScheduledUnit(getExecution(jid1, 1, 2,
sharingGroup, loc2), sharingGroup.getSlotSharingGroupId()),
slotProfileForLocation(loc2), TestingUtils.infiniteTime()).get();
+ new ScheduledUnit(getExecution(jid1, 1, 2,
sharingGroup), sharingGroup.getSlotSharingGroupId()),
slotProfileForLocation(loc2), TestingUtils.infiniteTime()).get();
// schedule one locally to instance 1
LogicalSlot s3 = testingSlotProvider.allocateSlot(
- new ScheduledUnit(getExecution(jid2, 0, 2,
sharingGroup, loc1), sharingGroup.getSlotSharingGroupId(), cc1),
slotProfileForLocation(loc1), TestingUtils.infiniteTime()).get();
+ new ScheduledUnit(getExecution(jid2, 0, 2,
sharingGroup), sharingGroup.getSlotSharingGroupId(), cc1),
slotProfileForLocation(loc1), TestingUtils.infiniteTime()).get();
// schedule with co location constraint (yet unassigned) and a
preference for
// instance 1, but it can only get instance 2
LogicalSlot s4 = testingSlotProvider.allocateSlot(
- new ScheduledUnit(getExecution(jid2, 1, 2,
sharingGroup, loc1), sharingGroup.getSlotSharingGroupId(), cc2),
slotProfileForLocation(loc1), TestingUtils.infiniteTime()).get();
+ new ScheduledUnit(getExecution(jid2, 1, 2,
sharingGroup), sharingGroup.getSlotSharingGroupId(), cc2),
slotProfileForLocation(loc1), TestingUtils.infiniteTime()).get();
// schedule something into the assigned co-location constraints
and check that they override the
// other preferences
LogicalSlot s5 = testingSlotProvider.allocateSlot(
- new ScheduledUnit(getExecution(jid3, 0, 2,
sharingGroup, loc2), sharingGroup.getSlotSharingGroupId(), cc1),
slotProfileForLocation(loc2), TestingUtils.infiniteTime()).get();
+ new ScheduledUnit(getExecution(jid3, 0, 2,
sharingGroup), sharingGroup.getSlotSharingGroupId(), cc1),
slotProfileForLocation(loc2), TestingUtils.infiniteTime()).get();
LogicalSlot s6 = testingSlotProvider.allocateSlot(
- new ScheduledUnit(getExecution(jid3, 1, 2,
sharingGroup, loc1), sharingGroup.getSlotSharingGroupId(), cc2),
slotProfileForLocation(loc1), TestingUtils.infiniteTime()).get();
Review comment:
The `SlotSharingGroup` param of `getExecution()` also does not take
effect .
I think we can simplify `ScheduledUnit` constructors to get rid of the
`Execution` to avoid such confusion.
But maybe a bit later because it can have lots of conflicts with the ongoing
changes of FLINK-17760.
----------------------------------------------------------------
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]