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> priorAllocations) |
Modifier and Type | Method and Description |
---|---|
Collection<TaskManagerLocation> |
getPreferredLocations()
Returns the preferred locations for the slot.
|
Collection<AllocationID> |
getPriorAllocations()
Returns the desired allocation ids for the slot.
|
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> priorAllocations)
@Nonnull public ResourceProfile getResourceProfile()
@Nonnull public Collection<TaskManagerLocation> getPreferredLocations()
@Nonnull public Collection<AllocationID> getPriorAllocations()
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–2019 The Apache Software Foundation. All rights reserved.