You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@streampark.apache.org by GitBox <gi...@apache.org> on 2023/01/07 08:17:29 UTC
[GitHub] [incubator-streampark] 1996fanrui commented on a diff in pull request #2229: [Bug] fix after flink 1.15 K8S session start&stop error
1996fanrui commented on code in PR #2229:
URL: https://github.com/apache/incubator-streampark/pull/2229#discussion_r1063974750
##########
streampark-flink/streampark-flink-submit/streampark-flink-submit-core/src/main/scala/org/apache/streampark/flink/submit/impl/KubernetesNativeSessionSubmit.scala:
##########
@@ -152,8 +152,9 @@ object KubernetesNativeSessionSubmit extends KubernetesNativeSubmitTrait with Lo
val kubernetesClusterDescriptor = getK8sClusterDescriptorAndSpecification(flinkConfig)
clusterDescriptor = kubernetesClusterDescriptor._1
kubeClient = FlinkKubeClientFactory.getInstance.fromConfiguration(flinkConfig, "client")
-
- if (deployRequest.clusterId != null && kubeClient.getRestService(deployRequest.clusterId).isPresent) {
+ // after flink 1.15 FlinkKubeClient removed the getRestService method
+ if (deployRequest.clusterId != null && hasMethod(kubeClient.getClass, "getRestService")
Review Comment:
Thanks @monrg 's contribution.
It's similar to `FlinkClientTrait`, we can add the `FlinkKubeClientTrait` in the `streampark-flink-shims-base` module, it depends flink-1.14 by default.
Every flink-shims extends the `FlinkKubeClientTrait` and call the `FlinkKubeClient#getRestService before flink 1.15` or the `FlinkKubeClient#getService since flink-1.15`.
And KubernetesNativeSessionSubmit always calls the `FlinkKubeClientTrait#getService`, don't care call `getService` or `getRestService`.
--
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: issues-unsubscribe@streampark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org