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(AllocationID slotAllocationId,
JobID jobID,
TaskManagerLocation location,
int slotNumber,
ResourceProfile resourceProfile,
TaskManagerGateway taskManagerGateway) |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj)
This always checks based on reference equality.
|
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.
|
ResourceID |
getTaskManagerId()
Gets the ID of the TaskManager on which this slot was allocated.
|
TaskManagerLocation |
getTaskManagerLocation()
Gets the location info of the TaskManager that offers this slot.
|
int |
hashCode()
This always returns a reference hash code.
|
String |
toString() |
public AllocatedSlot(AllocationID slotAllocationId, JobID jobID, TaskManagerLocation location, int slotNumber, ResourceProfile resourceProfile, TaskManagerGateway taskManagerGateway)
public AllocationID getSlotAllocationId()
public ResourceID getTaskManagerId()
This is equivalent to #getTaskManagerLocation()#getTaskManagerId()
.
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
public final int hashCode()
public final boolean equals(Object obj)
Copyright © 2014–2018 The Apache Software Foundation. All rights reserved.