public class SlotProfile extends Object
SlotContext
against the slot profile and, potentially, further requirements.Modifier and Type | Method and Description |
---|---|
ResourceProfile |
getPhysicalSlotResourceProfile()
Returns the desired resource profile for the physical slot to host this task slot.
|
Collection<AllocationID> |
getPreferredAllocations()
Returns the desired allocation ids for the slot.
|
Collection<TaskManagerLocation> |
getPreferredLocations()
Returns the preferred locations for the slot.
|
Set<AllocationID> |
getPreviousExecutionGraphAllocations()
Returns a set of all previous allocation ids from the execution graph.
|
ResourceProfile |
getTaskResourceProfile()
Returns the desired resource profile for the task slot.
|
static SlotProfile |
noLocality(ResourceProfile resourceProfile)
Returns a slot profile for the given resource profile, without any locality requirements.
|
static SlotProfile |
noRequirements()
Returns a slot profile that has no requirements.
|
static SlotProfile |
preferredLocality(ResourceProfile resourceProfile,
Collection<TaskManagerLocation> preferredLocations)
Returns a slot profile for the given resource profile and the preferred locations.
|
static SlotProfile |
priorAllocation(ResourceProfile taskResourceProfile,
ResourceProfile physicalSlotResourceProfile,
Collection<TaskManagerLocation> preferredLocations,
Collection<AllocationID> priorAllocations,
Set<AllocationID> previousExecutionGraphAllocations)
Returns a slot profile for the given resource profile, prior allocations and all prior
allocation ids from the whole execution graph.
|
public ResourceProfile getTaskResourceProfile()
public ResourceProfile getPhysicalSlotResourceProfile()
public Collection<TaskManagerLocation> getPreferredLocations()
public Collection<AllocationID> getPreferredAllocations()
public Set<AllocationID> getPreviousExecutionGraphAllocations()
This is optional and can be empty if unused.
@VisibleForTesting public static SlotProfile noRequirements()
@VisibleForTesting public static SlotProfile noLocality(ResourceProfile resourceProfile)
@VisibleForTesting public static SlotProfile preferredLocality(ResourceProfile resourceProfile, Collection<TaskManagerLocation> preferredLocations)
resourceProfile
- specifying the slot requirementspreferredLocations
- specifying the preferred locationspublic static SlotProfile priorAllocation(ResourceProfile taskResourceProfile, ResourceProfile physicalSlotResourceProfile, Collection<TaskManagerLocation> preferredLocations, Collection<AllocationID> priorAllocations, Set<AllocationID> previousExecutionGraphAllocations)
taskResourceProfile
- specifying the required resources for the task slotphysicalSlotResourceProfile
- specifying the required resources for the physical slot to
host this task slotpreferredLocations
- specifying the preferred locationspriorAllocations
- specifying the prior allocationspreviousExecutionGraphAllocations
- specifying all prior allocation ids from the whole
execution graphCopyright © 2014–2021 The Apache Software Foundation. All rights reserved.