public final class AllocatedResource extends Object
ExecutionVertex for
executing a task. The allocated resource is comprised of an Instance
which identifies the node the task is scheduled to run on as well as an
AllocationID which determines the resources the task is scheduled to
allocate within the node.
The class is thread-safe.
| Constructor and Description |
|---|
AllocatedResource(Instance instance,
AllocationID allocationID)
Constructs a new allocated resource object.
|
| Modifier and Type | Method and Description |
|---|---|
Iterator<ExecutionVertex> |
assignedVertices()
Returns an iterator over all execution vertices currently assigned to this allocated resource.
|
void |
assignVertexToResource(ExecutionVertex vertex)
Assigns the given execution vertex to this allocated resource.
|
boolean |
equals(Object obj) |
AllocationID |
getAllocationID()
Returns the allocation ID which identifies the resource allocated within the assigned instance.
|
Instance |
getInstance()
Returns the instance a task is scheduled to run on.
|
int |
hashCode() |
void |
removeVertexFromResource(ExecutionVertex vertex)
Removes the given execution vertex from this allocated resource.
|
public AllocatedResource(Instance instance, AllocationID allocationID)
instance - the instance a task is scheduled to run on.allocationID - the allocation ID identifying the allocated resources within the instancepublic Instance getInstance()
public AllocationID getAllocationID()
null if the assigned instance is of type DummyInstancepublic void assignVertexToResource(ExecutionVertex vertex)
vertex - the vertex to assign to this resourcepublic Iterator<ExecutionVertex> assignedVertices()
public void removeVertexFromResource(ExecutionVertex vertex)
vertex - the execution to be removedCopyright © 2014 The Apache Software Foundation. All rights reserved.