public class OutputStream extends Object implements Serializable
A set of measurements about a stream so we can statistically reproduce it.
Modifier and Type | Class and Description |
---|---|
static class |
OutputStream.Builder |
Modifier and Type | Field and Description |
---|---|
boolean |
areKeysSkewed |
String |
id |
NormalDistStats |
rate |
Constructor and Description |
---|
OutputStream(String id,
NormalDistStats rate,
boolean areKeysSkewed)
Create a new stream with stats.
|
Modifier and Type | Method and 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.
|
public final String id
public final NormalDistStats rate
public final boolean areKeysSkewed
public OutputStream(String id, NormalDistStats rate, boolean areKeysSkewed)
Create a new stream with stats.
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.public static OutputStream fromConf(Map<String,Object> conf)
Create an output stream from a config.
conf
- the config to read from.public OutputStream remap(String origId, Map<GlobalStreamId,GlobalStreamId> remappedStreams)
public OutputStream scaleThroughput(double v)
Copyright © 2022 The Apache Software Foundation. All rights reserved.