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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]