This is an automated email from the ASF dual-hosted git repository.

benjobs pushed a commit to branch dev
in repository https://gitbox.apache.org/repos/asf/incubator-streampark.git


The following commit(s) were added to refs/heads/dev by this push:
     new 40e8e8359 [Feature]  Optimize the return value of the shutdown 
interface (#3239)
40e8e8359 is described below

commit 40e8e8359567ba7ecb6699320ea93aa09c695e75
Author: caicancai <[email protected]>
AuthorDate: Fri Oct 13 14:27:42 2023 +0800

    [Feature]  Optimize the return value of the shutdown interface (#3239)
---
 .../org/apache/streampark/flink/client/bean/ShutDownResponse.scala      | 2 +-
 .../streampark/flink/client/impl/KubernetesApplicationClientV2.scala    | 2 +-
 .../streampark/flink/client/impl/KubernetesNativeSessionClient.scala    | 2 +-
 .../apache/streampark/flink/client/impl/KubernetesSessionClientV2.scala | 2 +-
 .../org/apache/streampark/flink/client/impl/YarnSessionClient.scala     | 2 +-
 5 files changed, 5 insertions(+), 5 deletions(-)

diff --git 
a/streampark-flink/streampark-flink-client/streampark-flink-client-api/src/main/scala/org/apache/streampark/flink/client/bean/ShutDownResponse.scala
 
b/streampark-flink/streampark-flink-client/streampark-flink-client-api/src/main/scala/org/apache/streampark/flink/client/bean/ShutDownResponse.scala
index 5c9a14728..de96a55aa 100644
--- 
a/streampark-flink/streampark-flink-client/streampark-flink-client-api/src/main/scala/org/apache/streampark/flink/client/bean/ShutDownResponse.scala
+++ 
b/streampark-flink/streampark-flink-client/streampark-flink-client-api/src/main/scala/org/apache/streampark/flink/client/bean/ShutDownResponse.scala
@@ -17,4 +17,4 @@
 
 package org.apache.streampark.flink.client.bean
 
-case class ShutDownResponse()
+case class ShutDownResponse(clusterId: String)
diff --git 
a/streampark-flink/streampark-flink-client/streampark-flink-client-core/src/main/scala/org/apache/streampark/flink/client/impl/KubernetesApplicationClientV2.scala
 
b/streampark-flink/streampark-flink-client/streampark-flink-client-core/src/main/scala/org/apache/streampark/flink/client/impl/KubernetesApplicationClientV2.scala
index db2b3953c..c768ea378 100644
--- 
a/streampark-flink/streampark-flink-client/streampark-flink-client-core/src/main/scala/org/apache/streampark/flink/client/impl/KubernetesApplicationClientV2.scala
+++ 
b/streampark-flink/streampark-flink-client/streampark-flink-client-core/src/main/scala/org/apache/streampark/flink/client/impl/KubernetesApplicationClientV2.scala
@@ -261,7 +261,7 @@ object KubernetesApplicationClientV2 extends 
KubernetesClientV2Trait with Logger
         case _: FlinkResourceNotFound => ZIO.unit
         case _: UnsupportedAction => ZIO.unit
       }
-      .as(ShutDownResponse())
+      .as(ShutDownResponse(name))
       .runIOAsTry match {
       case Success(result) =>
         logInfo(richMsg("Shutdown Flink Application deployment 
successfully.")); result
diff --git 
a/streampark-flink/streampark-flink-client/streampark-flink-client-core/src/main/scala/org/apache/streampark/flink/client/impl/KubernetesNativeSessionClient.scala
 
b/streampark-flink/streampark-flink-client/streampark-flink-client-core/src/main/scala/org/apache/streampark/flink/client/impl/KubernetesNativeSessionClient.scala
index 0a7e9c11e..f98ce4c43 100644
--- 
a/streampark-flink/streampark-flink-client/streampark-flink-client-core/src/main/scala/org/apache/streampark/flink/client/impl/KubernetesNativeSessionClient.scala
+++ 
b/streampark-flink/streampark-flink-client/streampark-flink-client-core/src/main/scala/org/apache/streampark/flink/client/impl/KubernetesNativeSessionClient.scala
@@ -237,7 +237,7 @@ object KubernetesNativeSessionClient extends 
KubernetesNativeClientTrait with Lo
           .isPresent
       ) {
         kubeClient.stopAndCleanupCluster(shutDownRequest.clusterId)
-        ShutDownResponse()
+        ShutDownResponse(shutDownRequest.clusterId)
       } else {
         null
       }
diff --git 
a/streampark-flink/streampark-flink-client/streampark-flink-client-core/src/main/scala/org/apache/streampark/flink/client/impl/KubernetesSessionClientV2.scala
 
b/streampark-flink/streampark-flink-client/streampark-flink-client-core/src/main/scala/org/apache/streampark/flink/client/impl/KubernetesSessionClientV2.scala
index 214d6c15a..9516bf579 100644
--- 
a/streampark-flink/streampark-flink-client/streampark-flink-client-core/src/main/scala/org/apache/streampark/flink/client/impl/KubernetesSessionClientV2.scala
+++ 
b/streampark-flink/streampark-flink-client/streampark-flink-client-core/src/main/scala/org/apache/streampark/flink/client/impl/KubernetesSessionClientV2.scala
@@ -182,7 +182,7 @@ object KubernetesSessionClientV2 extends 
KubernetesClientV2Trait with Logger {
         case _: FlinkResourceNotFound => ZIO.unit
         case _: UnsupportedAction => ZIO.unit
       }
-      .as(ShutDownResponse())
+      .as(ShutDownResponse(name))
       .runIOAsTry match {
       case Success(result) => logInfo(richMsg("Shutdown Flink cluster 
successfully.")); result
       case Failure(err) => logError(richMsg(s"Fail to shutdown Flink 
cluster"), err); throw err
diff --git 
a/streampark-flink/streampark-flink-client/streampark-flink-client-core/src/main/scala/org/apache/streampark/flink/client/impl/YarnSessionClient.scala
 
b/streampark-flink/streampark-flink-client/streampark-flink-client-core/src/main/scala/org/apache/streampark/flink/client/impl/YarnSessionClient.scala
index 372251d77..89260632c 100644
--- 
a/streampark-flink/streampark-flink-client/streampark-flink-client-core/src/main/scala/org/apache/streampark/flink/client/impl/YarnSessionClient.scala
+++ 
b/streampark-flink/streampark-flink-client/streampark-flink-client-core/src/main/scala/org/apache/streampark/flink/client/impl/YarnSessionClient.scala
@@ -271,7 +271,7 @@ object YarnSessionClient extends YarnClientTrait {
       logInfo(s"the ${shutDownRequest.clusterId}'s final status is 
${clusterDescriptor.getYarnClient
           
.getApplicationReport(ConverterUtils.toApplicationId(shutDownRequest.clusterId))
           .getFinalApplicationStatus}")
-      ShutDownResponse()
+      ShutDownResponse(shutDownRequest.clusterId)
     } catch {
       case e: Exception =>
         logError(s"shutdown flink session fail in 
${shutDownRequest.executionMode} mode")

Reply via email to