Class DecimalDataRandomGenerator
- java.lang.Object
-
- org.apache.flink.connector.datagen.table.types.DecimalDataRandomGenerator
-
- All Implemented Interfaces:
Serializable
,Iterator<DecimalData>
,DataGenerator<DecimalData>
@Internal public class DecimalDataRandomGenerator extends Object implements DataGenerator<DecimalData>
Generates randomDecimalData
values.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description DecimalDataRandomGenerator(int precision, int scale, double min, double max, float nullRate)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
hasNext()
DecimalData
next()
void
open(String name, FunctionInitializationContext context, RuntimeContext runtimeContext)
Open and initialize state forDataGenerator
.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.flink.streaming.api.functions.source.datagen.DataGenerator
snapshotState
-
Methods inherited from interface java.util.Iterator
forEachRemaining, remove
-
-
-
-
Method Detail
-
open
public void open(String name, FunctionInitializationContext context, RuntimeContext runtimeContext) throws Exception
Description copied from interface:DataGenerator
Open and initialize state forDataGenerator
. SeeCheckpointedFunction.initializeState(org.apache.flink.runtime.state.FunctionInitializationContext)
.- Specified by:
open
in interfaceDataGenerator<DecimalData>
- Parameters:
name
- The state ofDataGenerator
should related to this name, make sure the name of state is different.- Throws:
Exception
-
hasNext
public boolean hasNext()
- Specified by:
hasNext
in interfaceIterator<DecimalData>
-
next
public DecimalData next()
- Specified by:
next
in interfaceIterator<DecimalData>
-
-