You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@streampark.apache.org by "Al-assad (via GitHub)" <gi...@apache.org> on 2023/09/25 09:35:58 UTC
[GitHub] [incubator-streampark] Al-assad commented on a diff in pull request #3186: [Feature] Add KubernetesApplicationClient.shutdown on Flink-Kubernetes-V2
Al-assad commented on code in PR #3186:
URL: https://github.com/apache/incubator-streampark/pull/3186#discussion_r1335632064
##########
streampark-flink/streampark-flink-client/streampark-flink-client-core/src/main/scala/org/apache/streampark/flink/client/FlinkClientEndpoint.scala:
##########
@@ -84,6 +84,10 @@ object FlinkClientEndpoint {
if (K8sFlinkConfig.isV2Enabled) KubernetesSessionClientV2.shutdown(request)
else KubernetesNativeSessionClient.shutdown(request)
}
+ case KUBERNETES_NATIVE_APPLICATION => {
+ if (K8sFlinkConfig.isV2Enabled) KubernetesApplicationClientV2.shutdown(request)
+ else _
Review Comment:
The "else _" here will return a runtime error, Modify in pattern matching to `case KUBERNETES_NATIVE_APPLICATION if K8sFlinkConfig.isV2Enabled`
##########
streampark-flink/streampark-flink-client/streampark-flink-client-core/src/main/scala/org/apache/streampark/flink/client/impl/KubernetesApplicationClientV2.scala:
##########
@@ -241,4 +241,21 @@ object KubernetesApplicationClientV2 extends KubernetesClientV2Trait with Logger
))
}
+ @throws[Throwable]
+ def shutdown(shutDownRequest: ShutDownRequest): ShutDownResponse = {
+ val name = shutDownRequest.clusterId
+ val namespace = shutDownRequest.kubernetesDeployParam.kubernetesNamespace
+
+ def richMsg: String => String = s"[flink-shutdown][clusterId=$name][namespace=$namespace] " + _
+
+ FlinkK8sOperator.k8sCrOpr.deleteSessionJob(namespace, name).runIOAsTry match {
Review Comment:
It should be implemented that in KubernetesApplicationClientV2, the task of removing the Application mode is actually removing the FlinkDeployment CR, not the SessionJob CR
--
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