org.apache.storm.starter.spout

## Class RandomNumberGeneratorSpout

- java.lang.Object
- - org.apache.storm.starter.spout.RandomNumberGeneratorSpout

- All Implemented Interfaces:
    Serializable, IBatchSpout, ITridentDataSource

      public class RandomNumberGeneratorSpout
      extends Object
      implements IBatchSpout

  This spout generates random whole numbers with given `maxNumber` value as maximum with the given `fields`.

  See Also:
    Serialized Form

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `RandomNumberGeneratorSpout(Fields fields, int batchSize, int maxNumber)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `ack(long batchId)`
    `void` | `close()`
    `void` | `emitBatch(long batchId, TridentCollector collector)`
    `Map<String,Object>` | `getComponentConfiguration()`
    `Fields` | `getOutputFields()`
    `void` | `open(Map<String,Object> conf, TopologyContext context)`

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

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

- - ### Constructor Detail

    - #### RandomNumberGeneratorSpout

          public RandomNumberGeneratorSpout(Fields fields,
                                            int batchSize,
                                            int maxNumber)

  - ### Method Detail

    - #### open

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

      Specified by:
        `open` in interface `IBatchSpout`

    - #### emitBatch

          public void emitBatch(long batchId,
                                TridentCollector collector)

      Specified by:
        `emitBatch` in interface `IBatchSpout`

    - #### ack

          public void ack(long batchId)

      Specified by:
        `ack` in interface `IBatchSpout`

    - #### close

          public void close()

      Specified by:
        `close` in interface `IBatchSpout`

    - #### getComponentConfiguration

          public Map<String,Object> getComponentConfiguration()

      Specified by:
        `getComponentConfiguration` in interface `IBatchSpout`

    - #### getOutputFields

          public Fields getOutputFields()

      Specified by:
        `getOutputFields` in interface `IBatchSpout`

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