Class FreePool
java.lang.Object
org.apache.storm.scheduler.multitenant.NodePool
org.apache.storm.scheduler.multitenant.FreePool
All of the machines that currently have nothing assigned to them.
- 
Nested Class SummaryNested classes/interfaces inherited from class org.apache.storm.scheduler.multitenant.NodePoolNodePool.NodeAndSlotCounts, NodePool.RoundRobinSlotScheduler
- 
Field SummaryFields inherited from class org.apache.storm.scheduler.multitenant.NodePoolcluster, nodeIdToNode
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionvoidAdd a topology to the pool.booleanCheck if this topology can be added to this pool.getNodeAndSlotCountIfSlotsWereTaken(int slotsNeeded) Get the number of nodes and slots this would provide to get the slots needed.voidInitialize the pool.intGet the number of available nodes.voidscheduleAsNeeded(NodePool... lesserPools) Reschedule any topologies as needed.intGet number of available slots.takeNodes(int nodesNeeded) Take up to nodesNeeded from this pool.takeNodesBySlots(int slotsNeeded) Take nodes from this pool that can fulfill possibly up to the slotsNeeded.toString()Methods inherited from class org.apache.storm.scheduler.multitenant.NodePoolgetNodeCountIfSlotsWereTaken, nodesAvailable, slotsAvailable, takeNodes, takeNodesBySlot
- 
Constructor Details- 
FreePoolpublic FreePool()
 
- 
- 
Method Details- 
initDescription copied from class:NodePoolInitialize the pool.
- 
addTopologyDescription copied from class:NodePoolAdd a topology to the pool.- Specified by:
- addTopologyin class- NodePool
- Parameters:
- td- the topology to add
 
- 
canAddDescription copied from class:NodePoolCheck if this topology can be added to this pool.
- 
takeNodesDescription copied from class:NodePoolTake up to nodesNeeded from this pool.
- 
nodesAvailablepublic int nodesAvailable()Description copied from class:NodePoolGet the number of available nodes.- Specified by:
- nodesAvailablein class- NodePool
- Returns:
- the number of nodes that are available to be taken
 
- 
slotsAvailablepublic int slotsAvailable()Description copied from class:NodePoolGet number of available slots.- Specified by:
- slotsAvailablein class- NodePool
- Returns:
- the number of slots that are available to be taken
 
- 
takeNodesBySlotsDescription copied from class:NodePoolTake nodes from this pool that can fulfill possibly up to the slotsNeeded.- Specified by:
- takeNodesBySlotsin class- NodePool
- Parameters:
- slotsNeeded- the number of slots that are needed.
- Returns:
- a Collection of nodes with the removed nodes in it. This may be empty, but should not be null.
 
- 
getNodeAndSlotCountIfSlotsWereTakenDescription copied from class:NodePoolGet the number of nodes and slots this would provide to get the slots needed.- Specified by:
- getNodeAndSlotCountIfSlotsWereTakenin class- NodePool
- Parameters:
- slotsNeeded- the number of slots needed
- Returns:
- the number of nodes and slots that would be returned.
 
- 
scheduleAsNeededDescription copied from class:NodePoolReschedule any topologies as needed.- Specified by:
- scheduleAsNeededin class- NodePool
- Parameters:
- lesserPools- pools that may be used to steal nodes from.
 
- 
toString
 
-