use of org.apache.flink.runtime.scheduler.SharedSlotProfileRetriever.SharedSlotProfileRetrieverFactory in project flink by apache.
the class SlotSharingExecutionSlotAllocatorFactory method createInstance.
@Override
public ExecutionSlotAllocator createInstance(final ExecutionSlotAllocationContext context) {
SlotSharingStrategy slotSharingStrategy = slotSharingStrategyFactory.create(context.getSchedulingTopology(), context.getLogicalSlotSharingGroups(), context.getCoLocationGroups());
SyncPreferredLocationsRetriever preferredLocationsRetriever = new DefaultSyncPreferredLocationsRetriever(context, context);
SharedSlotProfileRetrieverFactory sharedSlotProfileRetrieverFactory = new MergingSharedSlotProfileRetrieverFactory(preferredLocationsRetriever, context::findPriorAllocationId, context::getReservedAllocations);
return new SlotSharingExecutionSlotAllocator(slotProvider, slotWillBeOccupiedIndefinitely, slotSharingStrategy, sharedSlotProfileRetrieverFactory, bulkChecker, allocationTimeout, context::getResourceProfile);
}
Aggregations