org.apache.storm.scheduler.multitenant

## Class NodePool.RoundRobinSlotScheduler

- java.lang.Object
- - org.apache.storm.scheduler.multitenant.NodePool.RoundRobinSlotScheduler

- Enclosing class:
    NodePool

      public static class NodePool.RoundRobinSlotScheduler
      extends Object

  Place executors into slots in a round robin way, taking into account component spreading among different hosts.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `RoundRobinSlotScheduler(TopologyDetails td, int slotsToUse, Cluster cluster)` Create a new scheduler for a given topology.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `assignSlotTo(Node n)` Assign a slot to the given node.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### RoundRobinSlotScheduler

          public RoundRobinSlotScheduler(TopologyDetails td,
                                         int slotsToUse,
                                         Cluster cluster)

      Create a new scheduler for a given topology.

      Parameters:
        `td` - the topology to schedule
        `slotsToUse` - the number of slots to use for the executors left to schedule.
        `cluster` - the cluster to schedule this on.

  - ### Method Detail

    - #### assignSlotTo

          public boolean assignSlotTo(Node n)

      Assign a slot to the given node.

      Parameters:
        `n` - the node to assign a slot to.
      Returns:
        true if there are more slots to assign else false.

Copyright © 2021 The Apache Software Foundation. All rights reserved.