Package org.apache.storm.loadgen

# Class OutputStream

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

All Implemented Interfaces:
  `Serializable`

public class OutputStream 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`
  `OutputStream.Builder`

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `final boolean`
  `areKeysSkewed`
  `final String`
  `id`
  `final NormalDistStats`
  `rate`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `OutputStream(String id, NormalDistStats rate, boolean areKeysSkewed)`
  Create a new stream with stats.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `static OutputStream`
  `fromConf(Map<String,Object> conf)`
  Create an output stream from a config.
  `OutputStream`
  `remap(String origId, Map<GlobalStreamId,GlobalStreamId> remappedStreams)`
  `OutputStream`
  `scaleThroughput(double v)`
  `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

  - ### id

    public final String id

  - ### rate

    public final NormalDistStats rate

  - ### areKeysSkewed

    public final boolean areKeysSkewed

- ## Constructor Details

  - ### OutputStream

    public OutputStream(String id, NormalDistStats rate, boolean areKeysSkewed)
    Create a new stream with stats.
    Parameters:
      `id` - the id of the stream
      `rate` - the rate of tuples being emitted on this stream
      `areKeysSkewed` - true if keys are skewed else false. For skewed keys we only simulate it by using a gaussian distribution to the keys instead of an even distribution. Tere is no effort made right not to measure the skewness and reproduce it.

- ## Method Details

  - ### fromConf

    public static OutputStream 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.

  - ### remap

    public OutputStream remap(String origId, Map<GlobalStreamId,GlobalStreamId> remappedStreams)

  - ### scaleThroughput

    public OutputStream scaleThroughput(double v)