@Internal public class DataGenTableSource extends Object implements ScanTableSource, SupportsLimitPushDown
StreamTableSource
that emits each number from a given interval exactly once, possibly
in parallel. See StatefulSequenceSource
.ScanTableSource.ScanContext, ScanTableSource.ScanRuntimeProvider
DynamicTableSource.Context, DynamicTableSource.DataStructureConverter
Constructor and Description |
---|
DataGenTableSource(DataGenerator<?>[] fieldGenerators,
String tableName,
DataType rowDataType,
long rowsPerSecond,
Long numberOfRows) |
Modifier and Type | Method and Description |
---|---|
void |
applyLimit(long limit)
Provides the expected maximum number of produced records for limiting on a best-effort basis.
|
String |
asSummaryString()
Returns a string that summarizes this source for printing to a console or log.
|
DynamicTableSource |
copy()
Creates a copy of this instance during planning.
|
DataGeneratorSource<RowData> |
createSource() |
ChangelogMode |
getChangelogMode()
Returns the set of changes that the planner can expect during runtime.
|
ScanTableSource.ScanRuntimeProvider |
getScanRuntimeProvider(ScanTableSource.ScanContext context)
Returns a provider of runtime implementation for reading the data.
|
public DataGenTableSource(DataGenerator<?>[] fieldGenerators, String tableName, DataType rowDataType, long rowsPerSecond, Long numberOfRows)
public ScanTableSource.ScanRuntimeProvider getScanRuntimeProvider(ScanTableSource.ScanContext context)
ScanTableSource
There might exist different interfaces for runtime implementation which is why ScanTableSource.ScanRuntimeProvider
serves as the base interface. Concrete ScanTableSource.ScanRuntimeProvider
interfaces might be located in other Flink modules.
Independent of the provider interface, the table runtime expects that a source
implementation emits internal data structures (see RowData
for more information).
The given ScanTableSource.ScanContext
offers utilities by the planner for creating runtime
implementation with minimal dependencies to internal data structures.
SourceProvider
is the recommended core interface. SourceFunctionProvider
in flink-table-api-java-bridge
and InputFormatProvider
are available for
backwards compatibility.
getScanRuntimeProvider
in interface ScanTableSource
SourceProvider
@VisibleForTesting public DataGeneratorSource<RowData> createSource()
public DynamicTableSource copy()
DynamicTableSource
copy
in interface DynamicTableSource
public String asSummaryString()
DynamicTableSource
asSummaryString
in interface DynamicTableSource
public ChangelogMode getChangelogMode()
ScanTableSource
getChangelogMode
in interface ScanTableSource
RowKind
public void applyLimit(long limit)
SupportsLimitPushDown
applyLimit
in interface SupportsLimitPushDown
Copyright © 2014–2024 The Apache Software Foundation. All rights reserved.