kl0u opened a new pull request #13502:
URL: https://github.com/apache/flink/pull/13502
## What is the purpose of the change
This PR adds the `execution.runtime-mode`, as described in FLIP-134, without
exposing it yet to the user.
For now, we set the mode globally at the `StreamGraphGenerator`. An
alternative would be to set it at each `Transformation` individually based on
its predecessors. We went with the global option because, at least for now, we
will schedule the whole graph either in STREAMING or in BATCH mode so the
setting has to be global. In the future, if we consider mixed graphs where
subgraphs are scheduled in BATCH mode and others in STREAMING, then we could
consider setting the mode on each transformation individually.
In addition, this PR sets the `Boundedness` of some Legacy sources to
BOUNDED (e.g. `env.fromCollection()`). If this were to be combined with
runtime.execution-mode set to AUTOMATIC, it would change the already exposed
semantics. Given that we do not want that, we have set the default
runtime.execution-mode to STREAMING so that the Boundedness is ignored and the
exposed semantics are the same as before.
## Brief change log
The main additions are:
1. the logic in the `StreamGraphGenerator.determineExecutionMode()`, which
determines the `execution.runtime-mode` based on either an explicit setting, or
by looking at the `Boundedness` of the sources of the pipeline and
2. the setting of Boundedness for some of the source in the
`StreamExecutionEnvironment`.
## Verifying this change
Add the `StreamGraphGeneratorRuntimeExecutionModeDetection` class with the
relevant tests.
## 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)
- Anything that affects deployment or recovery: JobManager (and its
components), Checkpointing, Kubernetes/Yarn/Mesos, ZooKeeper: (yes / **no** /
don't know)
- The S3 file system connector: (yes / **no** / don't know)
## Documentation
- Does this pull request introduce a new feature? (yes / **no**)
- If yes, how is the feature documented? (**not applicable** / docs /
JavaDocs / not documented)
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]