public class SharedSlot extends Slot
SimpleSlot instances within itself. This allows to
schedule multiple tasks simultaneously, enabling Flink's streaming capabilities.
IMPORTANT: This class contains no synchronization. Thus, the caller has to guarantee proper
synchronization. In the current implementation, all concurrently modifying operations are
passed through a SlotSharingGroupAssignment object which is responsible for
synchronization.ALLOCATED_AND_ALIVE, CANCELLED, instance, jobID, RELEASED, slotNumber, status, STATUS_UPDATER| Constructor and Description |
|---|
SharedSlot(JobID jobID,
Instance instance,
int slotNumber,
SlotSharingGroupAssignment assignmentGroup,
SharedSlot parent,
AbstractID groupID) |
| Modifier and Type | Method and Description |
|---|---|
SharedSlot |
allocateSharedSlot(AbstractID jID) |
SimpleSlot |
allocateSubSlot(AbstractID jID)
Creates a new sub slot if the slot is not dead, yet.
|
void |
cancel() |
void |
disposeChild(SimpleSlot slot)
Disposes the given sub slot.
|
int |
freeSubSlot(Slot slot)
Removes the simple slot from the
SharedSlot. |
int |
getNumberLeaves() |
Set<Slot> |
getSubSlots() |
void |
releaseSlot()
Release this shared slot.
|
String |
toString() |
getGroupID, getInstance, getJobID, getParent, getRoot, getSlotNumber, hierarchy, isAlive, isCanceled, isDead, isDisposed, isReleased, markCancelled, markDead, markDisposed, markReleasedpublic SharedSlot(JobID jobID, Instance instance, int slotNumber, SlotSharingGroupAssignment assignmentGroup, SharedSlot parent, AbstractID groupID)
public int freeSubSlot(Slot slot)
SharedSlot. Should
only be called through the
SlotSharingGroupAssignment attribute
assignmnetGroup.slot - slot to be removed from the set of sub slots.public int getNumberLeaves()
getNumberLeaves in class Slotpublic void releaseSlot()
releaseSlot in class Slotpublic SimpleSlot allocateSubSlot(AbstractID jID)
jID - id to identify tasks which can be deployed in this sub slotpublic SharedSlot allocateSharedSlot(AbstractID jID)
public void disposeChild(SimpleSlot slot)
slot - sub slot which shall be removed from the shared slotCopyright © 2015 The Apache Software Foundation. All rights reserved.