Package org.apache.storm.loadgen

# Class InputStream

java.lang.Object
org.apache.storm.loadgen.InputStream

All Implemented Interfaces:
  `Serializable`

public class InputStream extends Object implements Serializable
A set of measurements about a stream so we can statistically reproduce it.

See Also:
  - Serialized Form

- ## Nested Class Summary

  Nested Classes
  Modifier and Type
  Class
  Description
  `static class`
  `InputStream.Builder`

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `final NormalDistStats`
  `execTime`
  `final String`
  `fromComponent`
  `final GroupingType`
  `groupingType`
  `final String`
  `id`
  `final NormalDistStats`
  `processTime`
  `final String`
  `toComponent`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `InputStream(String fromComponent, String toComponent, String id, NormalDistStats execTime, NormalDistStats processTime, GroupingType groupingType)`
  Create a new input stream to a bolt.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `static InputStream`
  `fromConf(Map<String,Object> conf)`
  Create an output stream from a config.
  `GlobalStreamId`
  `gsid()`
  Get the global stream id for this input stream.
  `InputStream`
  `remap(Map<String,String> remappedComponents, Map<GlobalStreamId,GlobalStreamId> remappedStreams)`
  Remap the names of components.
  `InputStream`
  `replaceShuffleWithLocalOrShuffle()`
  Replace all SHUFFLE groupings with LOCAL_OR_SHUFFLE.
  `Map<String,Object>`
  `toConf()`
  Convert this to a conf.

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

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

- ## Field Details

  - ### fromComponent

    public final String fromComponent

  - ### toComponent

    public final String toComponent

  - ### id

    public final String id

  - ### execTime

    public final NormalDistStats execTime

  - ### processTime

    public final NormalDistStats processTime

  - ### groupingType

    public final GroupingType groupingType

- ## Constructor Details

  - ### InputStream

    public InputStream(String fromComponent, String toComponent, String id, NormalDistStats execTime, NormalDistStats processTime, GroupingType groupingType)
    Create a new input stream to a bolt.
    Parameters:
      `fromComponent` - the source component of the stream.
      `id` - the id of the stream
      `execTime` - exec time stats
      `processTime` - process time stats

- ## Method Details

  - ### fromConf

    public static InputStream fromConf(Map<String,Object> conf)
    Create an output stream from a config.
    Parameters:
      `conf` - the config to read from.
    Returns:
      the read OutputStream.

  - ### toConf

    public Map<String,Object> toConf()
    Convert this to a conf.
    Returns:
      the conf.

  - ### gsid

    public GlobalStreamId gsid()
    Get the global stream id for this input stream.
    Returns:
      the GlobalStreamId for this input stream.

  - ### remap

    public InputStream remap(Map<String,String> remappedComponents, Map<GlobalStreamId,GlobalStreamId> remappedStreams)
    Remap the names of components.
    Parameters:
      `remappedComponents` - old name to new name of components.
      `remappedStreams` - old ID to new ID of streams.
    Returns:
      a modified version of this with names remapped.

  - ### replaceShuffleWithLocalOrShuffle

    public InputStream replaceShuffleWithLocalOrShuffle()
    Replace all SHUFFLE groupings with LOCAL_OR_SHUFFLE.
    Returns:
      a modified copy of this