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:
  • Constructor Details

    • FixedBatchSpout

      public FixedBatchSpout(int maxBatchSizeArg)
      Creates a new fixed batch spout.
      Parameters:
      maxBatchSizeArg - the maximum batch size to set
  • Method Details

    • 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