aljoscha opened a new pull request #13530:
URL: https://github.com/apache/flink/pull/13530
## What is the purpose of the change
`TestStreamEnvironment` only overrides `execute()` but not `executeAsync()`.
Calls against the latter therefore don't use the shared `MiniCluster` but a new
cluster is spun up for every job.
This changes `TestStreamEnvironment` to always use the shared `MiniCluster`
by injecting a custom `PipelineExecutorServiceLoader` and not overriding any of
the `execute*()` methods.
## Brief change log
As always, the commit messages describe what each commit does.
- remodel `PerJobMiniClusterClient` to be usable for all `MiniCluster` job
purposes
- change `TestStreamEnvironment` to use a custom
`PipelineExecutorServiceLoader`
- the custom `PipelineExecutorServiceLoader` goes directly against a
`MiniCluster` instead of the `JobExecutor` because we want to do async job
submission
- remove now-unused `JobExecutor` interface
This quote describes the rationale behind removing `JobExecutor` and
mentions an alternative solution:
> Instead, we use a custom PipelineExecutorServiceLoader to inject a
> MiniClusterExecutor. This requires that we directly use MiniCluster
> instead of the JobExecutor interface in the test environments because we
> need to use asynchronous job submission. The alternative would be to
> extend the JobExecutor interface to allow async job submission.
## Verifying this change
Covered by existing tests that use `TestStreamEnvironment`.
## Does this pull request potentially affect one of the following parts:
- Dependencies (does it add or upgrade a dependency): no
- The public API, i.e., is any changed class annotated with
`@Public(Evolving)`: no
- The serializers: no
- The runtime per-record code paths (performance sensitive): no
- Anything that affects deployment or recovery: JobManager (and its
components), Checkpointing, Kubernetes/Yarn/Mesos, ZooKeeper: no
- The S3 file system connector: no
## Documentation
- Does this pull request introduce a new feature? no
- If yes, how is the feature documented? not applicable
----------------------------------------------------------------
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]