Package 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 Description BalancedTargetSelector()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Integer
chooseTask(int[] assignedTasks)
Chooses one of the incoming tasks and selects the one that has been selected the fewest times so far.
-
-
-
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 interfacePartialKeyGrouping.TargetSelector
-
-