public class SlotSharingGroupAssignment extends Object implements Serializable
| Constructor and Description |
|---|
SlotSharingGroupAssignment() |
| Modifier and Type | Method and Description |
|---|---|
SimpleSlot |
addSharedSlotAndAllocateSubSlot(SharedSlot sharedSlot,
Locality locality,
AbstractID groupId,
CoLocationConstraint constraint) |
int |
getNumberOfAvailableSlotsForJid(JobVertexID jid) |
int |
getNumberOfSlots() |
SimpleSlot |
getSlotForTask(ExecutionVertex vertex)
Gets a slot suitable for the given task vertex.
|
SimpleSlot |
getSlotForTask(ExecutionVertex vertex,
CoLocationConstraint constraint) |
void |
releaseSharedSlot(SharedSlot sharedSlot)
Releases the shared slot from the assignment group.
|
void |
releaseSimpleSlot(SimpleSlot simpleSlot)
Releases the simple slot from the assignment group.
|
public SimpleSlot addSharedSlotAndAllocateSubSlot(SharedSlot sharedSlot, Locality locality, AbstractID groupId, CoLocationConstraint constraint)
public SimpleSlot getSlotForTask(ExecutionVertex vertex)
ExecutionVertex.getPreferredLocations()), but will return non local
slots if no local slot is available. The method returns null, when no slot is available for the
given JobVertexID at all.vertex - public SimpleSlot getSlotForTask(ExecutionVertex vertex, CoLocationConstraint constraint)
public void releaseSharedSlot(SharedSlot sharedSlot)
sharedSlot - The SharedSlot to be releasedpublic void releaseSimpleSlot(SimpleSlot simpleSlot)
simpleSlot - The SimpleSlot to be releasedpublic int getNumberOfSlots()
public int getNumberOfAvailableSlotsForJid(JobVertexID jid)
Copyright © 2015 The Apache Software Foundation. All rights reserved.