Package org.apache.storm.scheduler
Interface SchedulerAssignment
- All Known Implementing Classes:
SchedulerAssignmentImpl
public interface SchedulerAssignment
-
Method Summary
Modifier and TypeMethodDescriptionGet the set of all executors.Get the map of executor to WorkerSlot.Get the total shared off heap node memory mapping.Get the slot to resource mapping.getSlots()
Get the set of all slots that are a part of this.Get the mapping of slot to executors on that slot.Return the ID of the topology.boolean
isExecutorAssigned
(ExecutorDetails executor) Is the executor assigned or not.boolean
isSlotOccupied
(WorkerSlot slot) Is this slot part of this assignment or not.
-
Method Details
-
isSlotOccupied
Is this slot part of this assignment or not.- Parameters:
slot
- the slot to check.- Returns:
- true if the slot is occupied by this assignment else false.
-
isExecutorAssigned
Is the executor assigned or not.- Parameters:
executor
- the executor to check it if is assigned.- Returns:
- true if it is assigned else false
-
getTopologyId
String getTopologyId()Return the ID of the topology.- Returns:
- the topology-id this assignment is for.
-
getExecutorToSlot
Map<ExecutorDetails,WorkerSlot> getExecutorToSlot()Get the map of executor to WorkerSlot.- Returns:
- the executor -> slot map.
-
getExecutors
Set<ExecutorDetails> getExecutors()Get the set of all executors.- Returns:
- the executors covered by this assignments
-
getSlots
Set<WorkerSlot> getSlots()Get the set of all slots that are a part of this.- Returns:
- the set of all slots.
-
getSlotToExecutors
Map<WorkerSlot,Collection<ExecutorDetails>> getSlotToExecutors()Get the mapping of slot to executors on that slot.- Returns:
- the slot to the executors assigned to that slot.
-
getScheduledResources
Map<WorkerSlot,WorkerResources> getScheduledResources()Get the slot to resource mapping.- Returns:
- The slot to resource mapping
-