Class TestScanTableSourceWithWatermarkPushDown
- java.lang.Object
-
- org.apache.flink.table.toolbox.TestScanTableSourceWithWatermarkPushDown
-
- All Implemented Interfaces:
SupportsWatermarkPushDown
,DynamicTableSource
,ScanTableSource
public class TestScanTableSourceWithWatermarkPushDown extends Object implements ScanTableSource, SupportsWatermarkPushDown
A source used to testSupportsWatermarkPushDown
.For simplicity, the deprecated source function method is used to create the source.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.apache.flink.table.connector.source.DynamicTableSource
DynamicTableSource.Context, DynamicTableSource.DataStructureConverter
-
Nested classes/interfaces inherited from interface org.apache.flink.table.connector.source.ScanTableSource
ScanTableSource.ScanContext, ScanTableSource.ScanRuntimeProvider
-
-
Constructor Summary
Constructors Constructor Description TestScanTableSourceWithWatermarkPushDown()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
applyWatermark(WatermarkStrategy<RowData> watermarkStrategy)
Provides aWatermarkStrategy
which defines how to generateWatermark
s in the stream source.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.ChangelogMode
getChangelogMode()
Returns the set of changes that the planner can expect during runtime.ScanTableSource.ScanRuntimeProvider
getScanRuntimeProvider(ScanTableSource.ScanContext runtimeProviderContext)
Returns a provider of runtime implementation for reading the data.
-
-
-
Method Detail
-
applyWatermark
public void applyWatermark(WatermarkStrategy<RowData> watermarkStrategy)
Description copied from interface:SupportsWatermarkPushDown
Provides aWatermarkStrategy
which defines how to generateWatermark
s in the stream source.The
WatermarkStrategy
is a builder/factory for the actual runtime implementation consisting ofTimestampAssigner
(assigns the event-time timestamps to each record) and theWatermarkGenerator
(generates the watermarks).Note: If necessary, the watermark strategy will contain required computed column expressions and consider metadata columns (if
SupportsReadingMetadata
is implemented).- Specified by:
applyWatermark
in interfaceSupportsWatermarkPushDown
-
copy
public DynamicTableSource copy()
Description copied from interface:DynamicTableSource
Creates a copy of this instance during planning. The copy should be a deep copy of all mutable members.- Specified by:
copy
in interfaceDynamicTableSource
-
asSummaryString
public String asSummaryString()
Description copied from interface:DynamicTableSource
Returns a string that summarizes this source for printing to a console or log.- Specified by:
asSummaryString
in interfaceDynamicTableSource
-
getChangelogMode
public ChangelogMode getChangelogMode()
Description copied from interface:ScanTableSource
Returns the set of changes that the planner can expect during runtime.- Specified by:
getChangelogMode
in interfaceScanTableSource
- See Also:
RowKind
-
getScanRuntimeProvider
public ScanTableSource.ScanRuntimeProvider getScanRuntimeProvider(ScanTableSource.ScanContext runtimeProviderContext)
Description copied from interface:ScanTableSource
Returns a provider of runtime implementation for reading the data.There might exist different interfaces for runtime implementation which is why
ScanTableSource.ScanRuntimeProvider
serves as the base interface. ConcreteScanTableSource.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
inflink-table-api-java-bridge
andInputFormatProvider
are available for backwards compatibility.- Specified by:
getScanRuntimeProvider
in interfaceScanTableSource
- See Also:
SourceProvider
-
-