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() |
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)
slot - executors - public void unassignBySlot(WorkerSlot slot)
slot - public boolean isSlotOccupied(WorkerSlot slot)
isSlotOccupied in interface SchedulerAssignmentslot - public boolean isExecutorAssigned(ExecutorDetails executor)
SchedulerAssignmentisExecutorAssigned in interface SchedulerAssignmentpublic String getTopologyId()
SchedulerAssignmentgetTopologyId in interface SchedulerAssignmentpublic Map<ExecutorDetails,WorkerSlot> getExecutorToSlot()
SchedulerAssignmentgetExecutorToSlot in interface SchedulerAssignmentpublic Set<ExecutorDetails> getExecutors()
getExecutors in interface SchedulerAssignmentCopyright © 2015. All rights reserved.