public interface CustomStreamGrouping
extends java.io.Serializable
Modifier and Type | Method and Description |
---|---|
java.util.List<java.lang.Integer> |
chooseTasks(int taskId,
java.util.List<java.lang.Object> values)
This function implements a custom stream grouping.
|
void |
prepare(WorkerTopologyContext context,
GlobalStreamId stream,
java.util.List<java.lang.Integer> targetTasks)
Tells the stream grouping at runtime the tasks in the target bolt.
|
void prepare(WorkerTopologyContext context, GlobalStreamId stream, java.util.List<java.lang.Integer> targetTasks)
It also tells the grouping the metadata on the stream this grouping will be used on.
java.util.List<java.lang.Integer> chooseTasks(int taskId, java.util.List<java.lang.Object> values)
values
- the values to group on