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
    --- | --- | ---
    `boolean` | `areKeysSkewed` |
    `String` | `id` |
    `NormalDistStats` | `rate` |

  - ### Constructor Summary

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

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    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 Detail

    - #### id

          public final String id

    - #### rate

          public final NormalDistStats rate

    - #### areKeysSkewed

          public final boolean areKeysSkewed

  - ### Constructor Detail

    - #### 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 Detail

    - #### 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)