Package org.apache.storm.topology

## Class TopologyBuilder.BoltGetter

- java.lang.Object
- - org.apache.storm.topology.BaseConfigurationDeclarer<T>
  - - org.apache.storm.topology.TopologyBuilder.ConfigGetter<BoltDeclarer>
    - - org.apache.storm.topology.TopologyBuilder.BoltGetter

- All Implemented Interfaces:
    `BoltDeclarer`, `ComponentConfigurationDeclarer<BoltDeclarer>`, `InputDeclarer<BoltDeclarer>`, `ResourceDeclarer<BoltDeclarer>`
  Enclosing class:
    TopologyBuilder

      protected class TopologyBuilder.BoltGetter
      extends TopologyBuilder.ConfigGetter<BoltDeclarer>
      implements BoltDeclarer

- - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `BoltGetter​(String boltId)` |

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | 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, String streamId, CustomStreamGrouping grouping)` | A custom stream grouping by implementing the CustomStreamGrouping interface.
    `BoltDeclarer` | `customGrouping​(String componentId, 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, String streamId, Fields fields)` | The stream is partitioned by the fields specified in the grouping.
    `BoltDeclarer` | `fieldsGrouping​(String componentId, 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, 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` | `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` | `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.

    - ### Methods inherited from class org.apache.storm.topology.TopologyBuilder.ConfigGetter

      `addConfigurations, addResource, addResources, addSharedMemory, getComponentConfiguration`

    - ### Methods inherited from class org.apache.storm.topology.BaseConfigurationDeclarer

      `addConfiguration, setCPULoad, setDebug, setMaxSpoutPending, setMaxTaskParallelism, setMemoryLoad, setMemoryLoad, setNumTasks`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

    - ### Methods inherited from interface org.apache.storm.topology.ComponentConfigurationDeclarer

      `addConfiguration, addConfigurations, addResource, addResources, getComponentConfiguration, setDebug, setMaxSpoutPending, setMaxTaskParallelism, setNumTasks`

    - ### Methods inherited from interface org.apache.storm.topology.ResourceDeclarer

      `addSharedMemory, setCPULoad, setMemoryLoad, setMemoryLoad`

- - ### Constructor Detail

    - #### BoltGetter

          public BoltGetter​(String boltId)

  - ### Method Detail

    - #### fieldsGrouping

          public BoltDeclarer fieldsGrouping​(String componentId,
                                             Fields fields)

      Description copied from interface: `InputDeclarer`
      The stream is partitioned by the fields specified in the grouping.
      Specified by:
        `fieldsGrouping` in interface `InputDeclarer<BoltDeclarer>`

    - #### fieldsGrouping

          public BoltDeclarer fieldsGrouping​(String componentId,
                                             String streamId,
                                             Fields fields)

      Description copied from interface: `InputDeclarer`
      The stream is partitioned by the fields specified in the grouping.
      Specified by:
        `fieldsGrouping` in interface `InputDeclarer<BoltDeclarer>`

    - #### globalGrouping

          public BoltDeclarer globalGrouping​(String componentId)

      Description copied from interface: `InputDeclarer`
      The entire stream goes to a single one of the bolt's tasks. Specifically, it goes to the task with the lowest id.
      Specified by:
        `globalGrouping` in interface `InputDeclarer<BoltDeclarer>`

    - #### globalGrouping

          public BoltDeclarer globalGrouping​(String componentId,
                                             String streamId)

      Description copied from interface: `InputDeclarer`
      The entire stream goes to a single one of the bolt's tasks. Specifically, it goes to the task with the lowest id.
      Specified by:
        `globalGrouping` in interface `InputDeclarer<BoltDeclarer>`

    - #### shuffleGrouping

          public BoltDeclarer shuffleGrouping​(String componentId)

      Description copied from interface: `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.
      Specified by:
        `shuffleGrouping` in interface `InputDeclarer<BoltDeclarer>`

    - #### shuffleGrouping

          public BoltDeclarer shuffleGrouping​(String componentId,
                                              String streamId)

      Description copied from interface: `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.
      Specified by:
        `shuffleGrouping` in interface `InputDeclarer<BoltDeclarer>`

    - #### localOrShuffleGrouping

          public BoltDeclarer localOrShuffleGrouping​(String componentId)

      Description copied from interface: `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.
      Specified by:
        `localOrShuffleGrouping` in interface `InputDeclarer<BoltDeclarer>`

    - #### localOrShuffleGrouping

          public BoltDeclarer localOrShuffleGrouping​(String componentId,
                                                     String streamId)

      Description copied from interface: `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.
      Specified by:
        `localOrShuffleGrouping` in interface `InputDeclarer<BoltDeclarer>`

    - #### noneGrouping

          public BoltDeclarer noneGrouping​(String componentId)

      Description copied from interface: `InputDeclarer`
      This grouping specifies that you don't care how the stream is grouped.
      Specified by:
        `noneGrouping` in interface `InputDeclarer<BoltDeclarer>`

    - #### noneGrouping

          public BoltDeclarer noneGrouping​(String componentId,
                                           String streamId)

      Description copied from interface: `InputDeclarer`
      This grouping specifies that you don't care how the stream is grouped.
      Specified by:
        `noneGrouping` in interface `InputDeclarer<BoltDeclarer>`

    - #### allGrouping

          public BoltDeclarer allGrouping​(String componentId)

      Description copied from interface: `InputDeclarer`
      The stream is replicated across all the bolt's tasks. Use this grouping with care.
      Specified by:
        `allGrouping` in interface `InputDeclarer<BoltDeclarer>`

    - #### allGrouping

          public BoltDeclarer allGrouping​(String componentId,
                                          String streamId)

      Description copied from interface: `InputDeclarer`
      The stream is replicated across all the bolt's tasks. Use this grouping with care.
      Specified by:
        `allGrouping` in interface `InputDeclarer<BoltDeclarer>`

    - #### directGrouping

          public BoltDeclarer directGrouping​(String componentId)

      Description copied from interface: `InputDeclarer`
      A stream grouped this way means that the producer of the tuple decides which task of the consumer will receive this tuple.
      Specified by:
        `directGrouping` in interface `InputDeclarer<BoltDeclarer>`

    - #### directGrouping

          public BoltDeclarer directGrouping​(String componentId,
                                             String streamId)

      Description copied from interface: `InputDeclarer`
      A stream grouped this way means that the producer of the tuple decides which task of the consumer will receive this tuple.
      Specified by:
        `directGrouping` in interface `InputDeclarer<BoltDeclarer>`

    - #### grouping

          public BoltDeclarer grouping​(GlobalStreamId id,
                                       Grouping grouping)

      Specified by:
        `grouping` in interface `InputDeclarer<BoltDeclarer>`

    - #### partialKeyGrouping

          public BoltDeclarer partialKeyGrouping​(String componentId,
                                                 Fields fields)

      Description copied from interface: `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

      Specified by:
        `partialKeyGrouping` in interface `InputDeclarer<BoltDeclarer>`

    - #### partialKeyGrouping

          public BoltDeclarer partialKeyGrouping​(String componentId,
                                                 String streamId,
                                                 Fields fields)

      Description copied from interface: `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

      Specified by:
        `partialKeyGrouping` in interface `InputDeclarer<BoltDeclarer>`

    - #### customGrouping

          public BoltDeclarer customGrouping​(String componentId,
                                             CustomStreamGrouping grouping)

      Description copied from interface: `InputDeclarer`
      A custom stream grouping by implementing the CustomStreamGrouping interface.
      Specified by:
        `customGrouping` in interface `InputDeclarer<BoltDeclarer>`

    - #### customGrouping

          public BoltDeclarer customGrouping​(String componentId,
                                             String streamId,
                                             CustomStreamGrouping grouping)

      Description copied from interface: `InputDeclarer`
      A custom stream grouping by implementing the CustomStreamGrouping interface.
      Specified by:
        `customGrouping` in interface `InputDeclarer<BoltDeclarer>`