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:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionchooseTask
(int[] assignedTasks) Chooses one of the incoming tasks and selects the one that has been selected the fewest times so far.
-
Constructor Details
-
BalancedTargetSelector
public BalancedTargetSelector()
-
-
Method Details
-
chooseTask
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
-