org.apache.storm.grouping

## Class PartialKeyGrouping.BalancedTargetSelector

- java.lang.Object
- - org.apache.storm.grouping.PartialKeyGrouping.BalancedTargetSelector

- All Implemented Interfaces:
    Serializable, PartialKeyGrouping.TargetSelector
  Enclosing class:
    PartialKeyGrouping

      public static class PartialKeyGrouping.BalancedTargetSelector
      extends Object
      implements PartialKeyGrouping.TargetSelector

  A basic implementation of target selection. This strategy chooses the task within the assignment that has received the fewest Tuples overall from this instance of the grouping.

  See Also:
    Serialized Form

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `BalancedTargetSelector()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `Integer` | `chooseTask(int[] assignedTasks)` Chooses one of the incoming tasks and selects the one that has been selected the fewest times so far.

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

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

- - ### Constructor Detail

    - #### BalancedTargetSelector

          public BalancedTargetSelector()

  - ### Method Detail

    - #### chooseTask

          public Integer chooseTask(int[] assignedTasks)

      Chooses one of the incoming tasks and selects the one that has been selected the fewest times so far.

      Specified by:
        `chooseTask` in interface `PartialKeyGrouping.TargetSelector`

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