public class AllocatedSlot extends Object
AllocatedSlot
represents a slot that the JobManager allocated from a TaskManager.
It represents a slice of allocated resources from the TaskManager.
To allocate an AllocatedSlot
, the requests a slot from the ResourceManager. The
ResourceManager picks (or starts) a TaskManager that will then allocate the slot to the
JobManager and notify the JobManager.
Note: Prior to the resource management changes introduced in (Flink Improvement Proposal 6), an AllocatedSlot was allocated to the JobManager as soon as the TaskManager registered at the JobManager. All slots had a default unknown resource profile.
Constructor and Description |
---|
AllocatedSlot(AllocatedSlot other) |
AllocatedSlot(AllocationID slotAllocationId,
JobID jobID,
TaskManagerLocation location,
int slotNumber,
ResourceProfile resourceProfile,
TaskManagerGateway taskManagerGateway) |
Modifier and Type | Method and Description |
---|---|
JobID |
getJobID()
Returns the ID of the job this allocated slot belongs to.
|
ResourceProfile |
getResourceProfile()
Gets the resource profile of the slot.
|
AllocationID |
getSlotAllocationId()
Gets the ID under which the slot is allocated, which uniquely identifies the slot.
|
int |
getSlotNumber()
Gets the number of the slot.
|
TaskManagerGateway |
getTaskManagerGateway()
Gets the actor gateway that can be used to send messages to the TaskManager.
|
TaskManagerLocation |
getTaskManagerLocation()
Gets the location info of the TaskManager that offers this slot.
|
String |
toString() |
public AllocatedSlot(AllocationID slotAllocationId, JobID jobID, TaskManagerLocation location, int slotNumber, ResourceProfile resourceProfile, TaskManagerGateway taskManagerGateway)
public AllocatedSlot(AllocatedSlot other)
public AllocationID getSlotAllocationId()
public JobID getJobID()
public int getSlotNumber()
public ResourceProfile getResourceProfile()
public TaskManagerLocation getTaskManagerLocation()
public TaskManagerGateway getTaskManagerGateway()
This method should be removed once the new interface-based RPC abstraction is in place
Copyright © 2014–2017 The Apache Software Foundation. All rights reserved.