@Experimental public abstract class SequenceGenerator<T> extends Object implements DataGenerator<T>
DataGenerator that emits each number from a given interval
exactly once, possibly in parallel.| Modifier and Type | Field and Description |
|---|---|
protected Deque<Long> |
valuesToEmit |
| Constructor and Description |
|---|
SequenceGenerator(long start,
long end)
Creates a DataGenerator that emits all numbers from the given interval exactly once.
|
| Modifier and Type | Method and Description |
|---|---|
static SequenceGenerator<BigDecimal> |
bigDecimalGenerator(int start,
int end,
int precision,
int scale) |
static SequenceGenerator<Byte> |
byteGenerator(byte start,
byte end) |
static SequenceGenerator<Double> |
doubleGenerator(int start,
int end) |
static SequenceGenerator<Float> |
floatGenerator(short start,
short end) |
boolean |
hasNext() |
static SequenceGenerator<Integer> |
intGenerator(int start,
int end) |
static SequenceGenerator<Long> |
longGenerator(long start,
long end) |
void |
open(String name,
org.apache.flink.runtime.state.FunctionInitializationContext context,
org.apache.flink.api.common.functions.RuntimeContext runtimeContext)
Open and initialize state for
DataGenerator. |
static SequenceGenerator<Short> |
shortGenerator(short start,
short end) |
void |
snapshotState(org.apache.flink.runtime.state.FunctionSnapshotContext context)
Snapshot state for
DataGenerator. |
static SequenceGenerator<String> |
stringGenerator(long start,
long end) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitforEachRemaining, next, removepublic SequenceGenerator(long start,
long end)
start - Start of the range of numbers to emit.end - End of the range of numbers to emit.public void open(String name, org.apache.flink.runtime.state.FunctionInitializationContext context, org.apache.flink.api.common.functions.RuntimeContext runtimeContext) throws Exception
DataGeneratorDataGenerator. 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.Exceptionpublic void snapshotState(org.apache.flink.runtime.state.FunctionSnapshotContext context)
throws Exception
DataGeneratorDataGenerator. See CheckpointedFunction.snapshotState(org.apache.flink.runtime.state.FunctionSnapshotContext).snapshotState in interface DataGenerator<T>Exceptionpublic static SequenceGenerator<Long> longGenerator(long start, long end)
public static SequenceGenerator<Integer> intGenerator(int start, int end)
public static SequenceGenerator<Short> shortGenerator(short start, short end)
public static SequenceGenerator<Byte> byteGenerator(byte start, byte end)
public static SequenceGenerator<Float> floatGenerator(short start, short end)
public static SequenceGenerator<Double> doubleGenerator(int start, int end)
public static SequenceGenerator<BigDecimal> bigDecimalGenerator(int start, int end, int precision, int scale)
public static SequenceGenerator<String> stringGenerator(long start, long end)
Copyright © 2014–2025 The Apache Software Foundation. All rights reserved.