protected class TopologyBuilder.BoltGetter extends TopologyBuilder.ConfigGetter<BoltDeclarer> implements BoltDeclarer
| Constructor and Description |
|---|
BoltGetter(String boltId) |
| Modifier and Type | Method and Description |
|---|---|
BoltDeclarer |
allGrouping(String componentId)
The stream is replicated across all the bolt’s tasks.
|
BoltDeclarer |
allGrouping(String componentId,
String streamId)
The stream is replicated across all the bolt’s tasks.
|
BoltDeclarer |
customGrouping(String componentId,
CustomStreamGrouping grouping)
A custom stream grouping by implementing the CustomStreamGrouping interface.
|
BoltDeclarer |
customGrouping(String componentId,
String streamId,
CustomStreamGrouping grouping)
A custom stream grouping by implementing the CustomStreamGrouping interface.
|
BoltDeclarer |
directGrouping(String componentId)
A stream grouped this way means that the producer of the tuple decides which task of the consumer will receive this tuple.
|
BoltDeclarer |
directGrouping(String componentId,
String streamId)
A stream grouped this way means that the producer of the tuple decides which task of the consumer will receive this tuple.
|
BoltDeclarer |
fieldsGrouping(String componentId,
Fields fields)
The stream is partitioned by the fields specified in the grouping.
|
BoltDeclarer |
fieldsGrouping(String componentId,
String streamId,
Fields fields)
The stream is partitioned by the fields specified in the grouping.
|
BoltDeclarer |
globalGrouping(String componentId)
The entire stream goes to a single one of the bolt’s tasks.
|
BoltDeclarer |
globalGrouping(String componentId,
String streamId)
The entire stream goes to a single one of the bolt’s tasks.
|
BoltDeclarer |
grouping(GlobalStreamId id,
Grouping grouping) |
BoltDeclarer |
localOrShuffleGrouping(String componentId)
If the target bolt has one or more tasks in the same worker process, tuples will be shuffled to just those in-process tasks.
|
BoltDeclarer |
localOrShuffleGrouping(String componentId,
String streamId)
If the target bolt has one or more tasks in the same worker process, tuples will be shuffled to just those in-process tasks.
|
BoltDeclarer |
noneGrouping(String componentId)
This grouping specifies that you don’t care how the stream is grouped.
|
BoltDeclarer |
noneGrouping(String componentId,
String streamId)
This grouping specifies that you don’t care how the stream is grouped.
|
BoltDeclarer |
partialKeyGrouping(String componentId,
Fields fields)
Tuples are passed to two hashing functions and each target task is decided based on the comparison of the state of candidate nodes.
|
BoltDeclarer |
partialKeyGrouping(String componentId,
String streamId,
Fields fields)
Tuples are passed to two hashing functions and each target task is decided based on the comparison of the state of candidate nodes.
|
BoltDeclarer |
shuffleGrouping(String componentId)
Tuples are randomly distributed across the bolt’s tasks in a way such that each bolt is guaranteed to get an equal number of tuples.
|
BoltDeclarer |
shuffleGrouping(String componentId,
String streamId)
Tuples are randomly distributed across the bolt’s tasks in a way such that each bolt is guaranteed to get an equal number of tuples.
|
addConfigurations, addResource, addResources, addSharedMemory, getComponentConfigurationaddConfiguration, setCPULoad, setDebug, setMaxSpoutPending, setMaxTaskParallelism, setMemoryLoad, setMemoryLoad, setNumTasksclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaddConfiguration, addConfigurations, addResource, addResources, getComponentConfiguration, setDebug, setMaxSpoutPending, setMaxTaskParallelism, setNumTasksaddSharedMemory, setCPULoad, setMemoryLoad, setMemoryLoadpublic BoltGetter(String boltId)
public BoltDeclarer fieldsGrouping(String componentId, Fields fields)
InputDeclarerThe stream is partitioned by the fields specified in the grouping.
fieldsGrouping in interface InputDeclarer<BoltDeclarer>public BoltDeclarer fieldsGrouping(String componentId, String streamId, Fields fields)
InputDeclarerThe stream is partitioned by the fields specified in the grouping.
fieldsGrouping in interface InputDeclarer<BoltDeclarer>public BoltDeclarer globalGrouping(String componentId)
InputDeclarerThe entire stream goes to a single one of the bolt’s tasks. Specifically, it goes to the task with the lowest id.
globalGrouping in interface InputDeclarer<BoltDeclarer>public BoltDeclarer globalGrouping(String componentId, String streamId)
InputDeclarerThe entire stream goes to a single one of the bolt’s tasks. Specifically, it goes to the task with the lowest id.
globalGrouping in interface InputDeclarer<BoltDeclarer>public BoltDeclarer shuffleGrouping(String componentId)
InputDeclarerTuples are randomly distributed across the bolt’s tasks in a way such that each bolt is guaranteed to get an equal number of tuples.
shuffleGrouping in interface InputDeclarer<BoltDeclarer>public BoltDeclarer shuffleGrouping(String componentId, String streamId)
InputDeclarerTuples are randomly distributed across the bolt’s tasks in a way such that each bolt is guaranteed to get an equal number of tuples.
shuffleGrouping in interface InputDeclarer<BoltDeclarer>public BoltDeclarer localOrShuffleGrouping(String componentId)
InputDeclarerIf the target bolt has one or more tasks in the same worker process, tuples will be shuffled to just those in-process tasks. Otherwise, this acts like a normal shuffle grouping.
localOrShuffleGrouping in interface InputDeclarer<BoltDeclarer>public BoltDeclarer localOrShuffleGrouping(String componentId, String streamId)
InputDeclarerIf the target bolt has one or more tasks in the same worker process, tuples will be shuffled to just those in-process tasks. Otherwise, this acts like a normal shuffle grouping.
localOrShuffleGrouping in interface InputDeclarer<BoltDeclarer>public BoltDeclarer noneGrouping(String componentId)
InputDeclarerThis grouping specifies that you don’t care how the stream is grouped.
noneGrouping in interface InputDeclarer<BoltDeclarer>public BoltDeclarer noneGrouping(String componentId, String streamId)
InputDeclarerThis grouping specifies that you don’t care how the stream is grouped.
noneGrouping in interface InputDeclarer<BoltDeclarer>public BoltDeclarer allGrouping(String componentId)
InputDeclarerThe stream is replicated across all the bolt’s tasks. Use this grouping with care.
allGrouping in interface InputDeclarer<BoltDeclarer>public BoltDeclarer allGrouping(String componentId, String streamId)
InputDeclarerThe stream is replicated across all the bolt’s tasks. Use this grouping with care.
allGrouping in interface InputDeclarer<BoltDeclarer>public BoltDeclarer directGrouping(String componentId)
InputDeclarerA stream grouped this way means that the producer of the tuple decides which task of the consumer will receive this tuple.
directGrouping in interface InputDeclarer<BoltDeclarer>public BoltDeclarer directGrouping(String componentId, String streamId)
InputDeclarerA stream grouped this way means that the producer of the tuple decides which task of the consumer will receive this tuple.
directGrouping in interface InputDeclarer<BoltDeclarer>public BoltDeclarer grouping(GlobalStreamId id, Grouping grouping)
grouping in interface InputDeclarer<BoltDeclarer>public BoltDeclarer partialKeyGrouping(String componentId, Fields fields)
InputDeclarerTuples are passed to two hashing functions and each target task is decided based on the comparison of the state of candidate nodes.
See https://melmeric.files.wordpress.com/2014/11/the-power-of-both-choices-practical-load-balancing-for-distributed-stream -processing-engines.pdf
partialKeyGrouping in interface InputDeclarer<BoltDeclarer>public BoltDeclarer partialKeyGrouping(String componentId, String streamId, Fields fields)
InputDeclarerTuples are passed to two hashing functions and each target task is decided based on the comparison of the state of candidate nodes.
See https://melmeric.files.wordpress.com/2014/11/the-power-of-both-choices-practical-load-balancing-for-distributed-stream -processing-engines.pdf
partialKeyGrouping in interface InputDeclarer<BoltDeclarer>public BoltDeclarer customGrouping(String componentId, CustomStreamGrouping grouping)
InputDeclarerA custom stream grouping by implementing the CustomStreamGrouping interface.
customGrouping in interface InputDeclarer<BoltDeclarer>public BoltDeclarer customGrouping(String componentId, String streamId, CustomStreamGrouping grouping)
InputDeclarerA custom stream grouping by implementing the CustomStreamGrouping interface.
customGrouping in interface InputDeclarer<BoltDeclarer>Copyright © 2021 The Apache Software Foundation. All rights reserved.