Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feat][Flink-K8s-V2] Refactor the lifecycle control of Flink K8s application-mode jobs #3037

Merged
merged 6 commits into from
Sep 10, 2023

Conversation

Al-assad
Copy link
Member

@Al-assad Al-assad commented Sep 8, 2023

What changes were proposed in this pull request

Issue Number: close #2882

Brief change log

Does this pull request potentially affect one of the following parts

  • Dependencies (does it add or upgrade a dependency): no

@Al-assad
Copy link
Member Author

Al-assad commented Sep 8, 2023

Hi @caicancai, This PR is a fix for the code in PR #2994, and also a complete implementation of issue #2882. It can serve as a reference for your upcoming implementations of #2883 and #2884.

@Al-assad
Copy link
Member Author

Al-assad commented Sep 8, 2023

@wolfboys Please take a look.
Although this is a large-scale change, but the switch configuration streampark.flink-k8s.enable-v2 can be used to switch between the developing flink-k8s-v2 code and the old flink-k8s code.
In the case of the default streampark.flink-k8s.enable-v2 config being false, StreamPark will still use the original flink-k8s code. Therefore this PR will not take effect on existing StreamPark in practice.

@caicancai
Copy link
Member

Hi @caicancai, This PR is a fix for the code in PR #2994, and also a complete implementation of issue #2882. It can serve as a reference for your upcoming implementations of #2883 and #2884.

Thank you

@caicancai
Copy link
Member

@wolfboys Please take a look. Although this is a large-scale change, but the switch configuration can be used to switch between the developing flink-k8s-v2 code and the old flink-k8s code. In the case of the default config being , StreamPark will still use the original flink-k8s code. Therefore this PR will not take effect on existing StreamPark in practice.streampark.flink-k8s.enable-v2``streampark.flink-k8s.enable-v2``false

This is a good idea


// ======= deprecated =======

@deprecated
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

StreamPark consists of two parts: a development framework and a stream processing platform. The development framework part provides some APIs to users. The parameter InternalOption was originally designed for internal use within the platform, It is a non-public API. Therefore, these parameters can be deleted directly without causing any other impact on users

@wolfboys
Copy link
Member

wolfboys commented Sep 9, 2023

@wolfboys Please take a look. Although this is a large-scale change, but the switch configuration streampark.flink-k8s.enable-v2 can be used to switch between the developing flink-k8s-v2 code and the old flink-k8s code. In the case of the default streampark.flink-k8s.enable-v2 config being false, StreamPark will still use the original flink-k8s code. Therefore this PR will not take effect on existing StreamPark in practice.

Do k8sv2 and the current k8s native approach support parallel usage, or does k8sv2 replace the implementation of k8s native, only keep k8sv2?

@caicancai
Copy link
Member

caicancai commented Sep 9, 2023

请看一看。虽然这是一个大规模的变化,但交换机配置可以用来在正在开发的 flink-k8s-v2 代码和旧的 flink-k8s 代码之间切换。在默认配置的情况下,StreamPark 仍将使用原始的 flink-k8s 代码。因此,此 PR 在实践中不会对现有的 StreamPark 生效。streampark.flink-k8s.enable-v2``streampark.flink-k8s.enable-v2``false

k8sv2 和当前的 k8s 原生方法是否支持并行使用,还是 k8sv2 取代了 k8s 原生的实现,只保留 k8sv2?

I think v2 is still in the development stage and is not stable yet. I will delete the v1 code after the development is tested and there are no problems.

@wolfboys
Copy link
Member

请看一看。虽然这是一个大规模的变化,但交换机配置可以用来在正在开发的 flink-k8s-v2 代码和旧的 flink-k8s 代码之间切换。在默认配置的情况下,StreamPark 仍将使用原始的 flink-k8s 代码。因此,此 PR 在实践中不会对现有的 StreamPark 生效。 streampark.flink-k8s.enable-v2streampark.flink-k8s.enable-v2false

k8sv2 和当前的 k8s 原生方法是否支持并行使用,还是 k8sv2 取代了 k8s 原生的实现,只保留 k8sv2?

I think v2 is still in the development stage and is not stable yet. I will delete the v1 code after the development is tested and there are no problems.

okay 👌 This is a relatively secure/reliable approach

KubernetesSubmitParam kubernetesSubmitParam =
new KubernetesSubmitParam(
KubernetesSubmitParam.apply(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good job

Copy link
Member

@wolfboys wolfboys left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.
There may still be some small issues, but let's merge this PR first and continue improving it later. This also makes it easier for other developers to collaborate and improve together.

@wolfboys wolfboys merged commit 11c7fa8 into apache:dev Sep 10, 2023
4 of 6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feature] [Flink-K8s-V2] Refactor the lifecycle control of Flink application-mode jobs on Kubernetes
3 participants