public class SchedulerAssignmentImpl extends Object implements SchedulerAssignment
| Constructor and Description |
|---|
SchedulerAssignmentImpl(String topologyId,
Map<ExecutorDetails,WorkerSlot> executorToSlots) |
| Modifier and Type | Method and Description |
|---|---|
void |
assign(WorkerSlot slot,
Collection<ExecutorDetails> executors)
Assign the slot to executors.
|
Set<ExecutorDetails> |
getExecutors()
Return the executors covered by this assignments
|
Map<ExecutorDetails,WorkerSlot> |
getExecutorToSlot()
get the executor -> slot map.
|
Set<WorkerSlot> |
getSlots() |
Map<WorkerSlot,Collection<ExecutorDetails>> |
getSlotToExecutors() |
String |
getTopologyId()
get the topology-id this assignment is for.
|
boolean |
isExecutorAssigned(ExecutorDetails executor)
is the executor assigned?
|
boolean |
isSlotOccupied(WorkerSlot slot)
Does this slot occupied by this assignment?
|
void |
unassignBySlot(WorkerSlot slot)
Release the slot occupied by this assignment.
|
public SchedulerAssignmentImpl(String topologyId, Map<ExecutorDetails,WorkerSlot> executorToSlots)
public Set<WorkerSlot> getSlots()
getSlots in interface SchedulerAssignmentpublic void assign(WorkerSlot slot, Collection<ExecutorDetails> executors)
Assign the slot to executors.
public void unassignBySlot(WorkerSlot slot)
Release the slot occupied by this assignment.
public boolean isSlotOccupied(WorkerSlot slot)
SchedulerAssignmentDoes this slot occupied by this assignment?
isSlotOccupied in interface SchedulerAssignmentslot - public boolean isExecutorAssigned(ExecutorDetails executor)
SchedulerAssignmentis the executor assigned?
isExecutorAssigned in interface SchedulerAssignmentpublic String getTopologyId()
SchedulerAssignmentget the topology-id this assignment is for.
getTopologyId in interface SchedulerAssignmentpublic Map<ExecutorDetails,WorkerSlot> getExecutorToSlot()
SchedulerAssignmentget the executor -> slot map.
getExecutorToSlot in interface SchedulerAssignmentpublic Set<ExecutorDetails> getExecutors()
SchedulerAssignmentReturn the executors covered by this assignments
getExecutors in interface SchedulerAssignmentpublic Map<WorkerSlot,Collection<ExecutorDetails>> getSlotToExecutors()
getSlotToExecutors in interface SchedulerAssignmentCopyright © 2019 The Apache Software Foundation. All Rights Reserved.