org.apache.storm.elasticsearch.trident

## Class TridentEsTopology.FixedBatchSpout

- java.lang.Object
- - org.apache.storm.elasticsearch.trident.TridentEsTopology.FixedBatchSpout

- All Implemented Interfaces:
    Serializable, IBatchSpout, ITridentDataSource
  Enclosing class:
    TridentEsTopology

      public static class TridentEsTopology.FixedBatchSpout
      extends Object
      implements IBatchSpout

  A fixed batch spout.

  See Also:
    Serialized Form

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `FixedBatchSpout(int maxBatchSizeArg)` Creates a new fixed batch spout.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `ack(long batchId)` Acknowledges the message with id `msgId`.
    `void` | `close()` Closes the spout.
    `void` | `emitBatch(long batchId, TridentCollector collector)` Emits a batch.
    `Map<String,Object>` | `getComponentConfiguration()` Get the component configuration.
    `Fields` | `getOutputFields()` Gets the output fields.
    `void` | `open(Map<String,Object> conf, TopologyContext context)` Opens the spout.

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

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

- - ### Constructor Detail

    - #### FixedBatchSpout

          public FixedBatchSpout(int maxBatchSizeArg)

      Creates a new fixed batch spout.

      Parameters:
        `maxBatchSizeArg` - the maximum batch size to set

  - ### Method Detail

    - #### getOutputFields

          public Fields getOutputFields()

      Gets the output fields.

      Specified by:
        `getOutputFields` in interface `IBatchSpout`
      Returns:
        the output fields.

    - #### open

          public void open(Map<String,Object> conf,
                           TopologyContext context)

      Opens the spout.

      Specified by:
        `open` in interface `IBatchSpout`
      Parameters:
        `conf` - the configuration to use for opening
        `context` - the context to use for opening

    - #### emitBatch

          public void emitBatch(long batchId,
                                TridentCollector collector)

      Emits a batch.

      Specified by:
        `emitBatch` in interface `IBatchSpout`
      Parameters:
        `batchId` - the batch id to use
        `collector` - the collector to emit to

    - #### ack

          public void ack(long batchId)

      Acknowledges the message with id `msgId`.

      Specified by:
        `ack` in interface `IBatchSpout`
      Parameters:
        `batchId` - the message id

    - #### close

          public void close()

      Closes the spout.

      Specified by:
        `close` in interface `IBatchSpout`

    - #### getComponentConfiguration

          public Map<String,Object> getComponentConfiguration()

      Get the component configuration.

      Specified by:
        `getComponentConfiguration` in interface `IBatchSpout`
      Returns:
        the component configuration

Copyright © 2019 The Apache Software Foundation. All rights reserved.