public class SyntheticOptions
extends java.lang.Object
implements java.io.Serializable
SyntheticOptions class provides common parameterizable synthetic options that are
used by SyntheticBoundedSource and SyntheticUnboundedSource.| Modifier and Type | Class and Description |
|---|---|
static class |
SyntheticOptions.DelayType
The type of Delay that will be produced.
|
static interface |
SyntheticOptions.Sampler
Wrapper over a distribution.
|
| Modifier and Type | Field and Description |
|---|---|
long |
bytesPerRecord
The size of a single record used for size estimation in bytes.
|
double |
cpuUtilizationInMixedDelay
CPU utilization when delayType is 'MIXED'.
|
SyntheticOptions.DelayType |
delayType
When 'delayDistribution' is configured, this indicates how the delay enforced ("SLEEP", "CPU",
or "MIXED").
|
double |
hotKeyFraction
The fraction of records associated with "hot" keys, which are uniformly distributed over a
fixed number of hot keys.
|
long |
keySizeBytes
The key size in bytes.
|
double |
largeKeyFraction
The fraction of keys that should be larger than others.
|
double |
largeKeySizeBytes
The size of large keys.
|
long |
numHotKeys
The number of distinct "hot" keys.
|
int |
seed
The seed is used for generating a hash function implementing the 128-bit murmur3 algorithm.
|
long |
valueSizeBytes
The value size in bytes.
|
| Modifier and Type | Method and Description |
|---|---|
static SyntheticOptions.Sampler |
fromIntegerDistribution(org.apache.commons.math3.distribution.IntegerDistribution dist) |
static <T extends SyntheticOptions> |
fromJsonString(java.lang.String json,
java.lang.Class<T> type) |
static SyntheticOptions.Sampler |
fromRealDistribution(org.apache.commons.math3.distribution.RealDistribution dist) |
org.apache.beam.sdk.values.KV<byte[],byte[]> |
genKvPair(long seed) |
org.apache.beam.vendor.guava.v26_0_jre.com.google.common.hash.HashFunction |
hashFunction() |
long |
nextDelay(long seed) |
void |
setSeed(int seed) |
java.lang.String |
toString() |
void |
validate() |
public long keySizeBytes
public long valueSizeBytes
public final long bytesPerRecord
public long numHotKeys
public double hotKeyFraction
public double largeKeyFraction
public double largeKeySizeBytes
public int seed
public final SyntheticOptions.DelayType delayType
public final double cpuUtilizationInMixedDelay
public static SyntheticOptions.Sampler fromRealDistribution(org.apache.commons.math3.distribution.RealDistribution dist)
public static SyntheticOptions.Sampler fromIntegerDistribution(org.apache.commons.math3.distribution.IntegerDistribution dist)
public void setSeed(int seed)
public org.apache.beam.vendor.guava.v26_0_jre.com.google.common.hash.HashFunction hashFunction()
public void validate()
public java.lang.String toString()
toString in class java.lang.Objectpublic long nextDelay(long seed)
public org.apache.beam.sdk.values.KV<byte[],byte[]> genKvPair(long seed)
public static <T extends SyntheticOptions> T fromJsonString(java.lang.String json, java.lang.Class<T> type) throws java.io.IOException
java.io.IOException