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 classOutputStream.Builder
-
Field Summary
Fields Modifier and Type Field Description booleanareKeysSkewedStringidNormalDistStatsrate
-
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 OutputStreamfromConf(Map<String,Object> conf)Create an output stream from a config.OutputStreamremap(String origId, Map<GlobalStreamId,GlobalStreamId> remappedStreams)OutputStreamscaleThroughput(double v)Map<String,Object>toConf()Convert this to a conf.
-
-
-
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 streamrate- the rate of tuples being emitted on this streamareKeysSkewed- 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.
-
remap
public OutputStream remap(String origId, Map<GlobalStreamId,GlobalStreamId> remappedStreams)
-
scaleThroughput
public OutputStream scaleThroughput(double v)
-
-