public class SlotProfile extends Object
SlotContext
against the slot profile and, potentially,
further requirements.Constructor and Description |
---|
SlotProfile(ResourceProfile resourceProfile,
Collection<TaskManagerLocation> preferredLocations,
Collection<AllocationID> preferredAllocations) |
SlotProfile(ResourceProfile resourceProfile,
Collection<TaskManagerLocation> preferredLocations,
Collection<AllocationID> preferredAllocations,
Set<AllocationID> previousExecutionGraphAllocations) |
Modifier and Type | Method and Description |
---|---|
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 |
getResourceProfile()
Returns the desired resource profile for the 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 resourceProfile,
Collection<AllocationID> priorAllocations)
Returns a slot profile for the given resource profile and the prior allocations.
|
public SlotProfile(@Nonnull ResourceProfile resourceProfile, @Nonnull Collection<TaskManagerLocation> preferredLocations, @Nonnull Collection<AllocationID> preferredAllocations)
public SlotProfile(@Nonnull ResourceProfile resourceProfile, @Nonnull Collection<TaskManagerLocation> preferredLocations, @Nonnull Collection<AllocationID> preferredAllocations, @Nonnull Set<AllocationID> previousExecutionGraphAllocations)
@Nonnull public ResourceProfile getResourceProfile()
@Nonnull public Collection<TaskManagerLocation> getPreferredLocations()
@Nonnull public Collection<AllocationID> getPreferredAllocations()
@Nonnull public Set<AllocationID> getPreviousExecutionGraphAllocations()
public static SlotProfile noRequirements()
public static SlotProfile noLocality(ResourceProfile resourceProfile)
public static SlotProfile preferredLocality(ResourceProfile resourceProfile, Collection<TaskManagerLocation> preferredLocations)
resourceProfile
- specifying the slot requirementspreferredLocations
- specifying the preferred locationspublic static SlotProfile priorAllocation(ResourceProfile resourceProfile, Collection<AllocationID> priorAllocations)
resourceProfile
- specifying the slot requirementspriorAllocations
- specifying the prior allocationsCopyright © 2014–2020 The Apache Software Foundation. All rights reserved.