afedulov opened a new pull request, #23553:
URL: https://github.com/apache/flink/pull/23553
## What is the purpose of the change
The purpose is to change the internal implementation of
`StreamExecutionEnvironment#fromElements()` that is currently based on
SourceFunction API (deprecated, due to be removed) to using FLIP-27 Source API.
## Brief change log
- Moves DataGeneratorSource tests into a separate module to avoid circular
dependencies when adding `flink-connector-datagen` dependency to
`flink-streaming-java`
- Moves OutputTypeConfigurable from `flink-java-streaming` into
`flink-core` to enable adding support for `source.setOutputType()` (triggered
by `stream.returns()`) in `DataGeneratorSource` (required to handle, for
instance, Avro GenericRecords)
- Migrates `StreamExecutionEnvironment.fromElements()` methods from using
`FromElementsFunction`(`SourceFunction`) to the new
`FromElementsGeneratorFunction` (implements `GeneratorFunction` from FLIP-27
`DataGeneratorSource`)
## Verifying this change
The `fromElements()` method was already largely covered by the existing
tests. Additionally:
- Added `FromElementsGeneratorFunction` integration tests
- Added tests to `StreamExecutionEnvironmentTest`
- Added tests to `StreamExecutionEnvironmentITCase`
## Does this pull request potentially affect one of the following parts:
- Dependencies (does it add or upgrade a dependency): (**yes** / no)
- The public API, i.e., is any changed class annotated with
`@Public(Evolving)`: (**yes** / no)
- The serializers: (yes / **no** / don't know)
- The runtime per-record code paths (performance sensitive): (**yes** / no
/ don't know) - for `fromElements`.
- Anything that affects deployment or recovery: JobManager (and its
components), Checkpointing, Kubernetes/Yarn, ZooKeeper: (yes / **no** / don't
know)
- The S3 file system connector: (yes / **no** / don't know)
## Documentation
This is an internal change.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]