wolfboys commented on code in PR #2229:
URL: 
https://github.com/apache/incubator-streampark/pull/2229#discussion_r1063062543


##########
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:
   This code logic is strange,
   
   e.g: `if ( a.hasMethod("bbb") && a.bbb() )`
   if a has no bbb method, Next, call the bbb method,  The code compiles will 
fail.



-- 
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]

Reply via email to