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, getComponentConfiguration
addConfiguration, setCPULoad, setDebug, setMaxSpoutPending, setMaxTaskParallelism, setMemoryLoad, setMemoryLoad, setNumTasks
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addConfiguration, addConfigurations, addResource, addResources, getComponentConfiguration, setDebug, setMaxSpoutPending, setMaxTaskParallelism, setNumTasks
addSharedMemory, setCPULoad, setMemoryLoad, setMemoryLoad
public BoltGetter(String boltId)
public BoltDeclarer fieldsGrouping(String componentId, Fields fields)
InputDeclarer
The stream is partitioned by the fields specified in the grouping.
fieldsGrouping
in interface InputDeclarer<BoltDeclarer>
public BoltDeclarer fieldsGrouping(String componentId, String streamId, Fields fields)
InputDeclarer
The stream is partitioned by the fields specified in the grouping.
fieldsGrouping
in interface InputDeclarer<BoltDeclarer>
public BoltDeclarer globalGrouping(String componentId)
InputDeclarer
The 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)
InputDeclarer
The 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)
InputDeclarer
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.
shuffleGrouping
in interface InputDeclarer<BoltDeclarer>
public BoltDeclarer shuffleGrouping(String componentId, String streamId)
InputDeclarer
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.
shuffleGrouping
in interface InputDeclarer<BoltDeclarer>
public BoltDeclarer localOrShuffleGrouping(String componentId)
InputDeclarer
If 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)
InputDeclarer
If 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)
InputDeclarer
This grouping specifies that you don’t care how the stream is grouped.
noneGrouping
in interface InputDeclarer<BoltDeclarer>
public BoltDeclarer noneGrouping(String componentId, String streamId)
InputDeclarer
This grouping specifies that you don’t care how the stream is grouped.
noneGrouping
in interface InputDeclarer<BoltDeclarer>
public BoltDeclarer allGrouping(String componentId)
InputDeclarer
The 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)
InputDeclarer
The stream is replicated across all the bolt’s tasks. Use this grouping with care.
allGrouping
in interface InputDeclarer<BoltDeclarer>
public BoltDeclarer directGrouping(String componentId)
InputDeclarer
A 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)
InputDeclarer
A 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)
InputDeclarer
Tuples 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)
InputDeclarer
Tuples 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)
InputDeclarer
A custom stream grouping by implementing the CustomStreamGrouping interface.
customGrouping
in interface InputDeclarer<BoltDeclarer>
public BoltDeclarer customGrouping(String componentId, String streamId, CustomStreamGrouping grouping)
InputDeclarer
A custom stream grouping by implementing the CustomStreamGrouping interface.
customGrouping
in interface InputDeclarer<BoltDeclarer>
Copyright © 2022 The Apache Software Foundation. All rights reserved.