@Experimental public abstract class RandomGenerator<T> extends Object implements DataGenerator<T>
Modifier and Type | Field and Description |
---|---|
protected org.apache.commons.math3.random.RandomDataGenerator |
random |
Constructor and Description |
---|
RandomGenerator() |
Modifier and Type | Method and Description |
---|---|
static RandomGenerator<Boolean> |
booleanGenerator() |
static RandomGenerator<Byte> |
byteGenerator(byte min,
byte max) |
static RandomGenerator<Double> |
doubleGenerator(double min,
double max) |
static RandomGenerator<Float> |
floatGenerator(float min,
float max) |
boolean |
hasNext() |
static RandomGenerator<Integer> |
intGenerator(int min,
int max) |
static RandomGenerator<Long> |
longGenerator(long min,
long max) |
void |
open(String name,
FunctionInitializationContext context,
RuntimeContext runtimeContext)
Open and initialize state for
DataGenerator . |
static RandomGenerator<Short> |
shortGenerator(short min,
short max) |
static RandomGenerator<String> |
stringGenerator(int len) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
snapshotState
forEachRemaining, next, remove
public void open(String name, FunctionInitializationContext context, RuntimeContext runtimeContext) throws Exception
DataGenerator
DataGenerator
. See CheckpointedFunction.initializeState(org.apache.flink.runtime.state.FunctionInitializationContext)
.open
in interface DataGenerator<T>
name
- The state of DataGenerator
should related to this name, make sure the
name of state is different.Exception
public static RandomGenerator<Long> longGenerator(long min, long max)
public static RandomGenerator<Integer> intGenerator(int min, int max)
public static RandomGenerator<Short> shortGenerator(short min, short max)
public static RandomGenerator<Byte> byteGenerator(byte min, byte max)
public static RandomGenerator<Float> floatGenerator(float min, float max)
public static RandomGenerator<Double> doubleGenerator(double min, double max)
public static RandomGenerator<String> stringGenerator(int len)
public static RandomGenerator<Boolean> booleanGenerator()
Copyright © 2014–2021 The Apache Software Foundation. All rights reserved.