wolfboys commented on code in PR #2268:
URL:
https://github.com/apache/incubator-streampark/pull/2268#discussion_r1103649017
##########
streampark-flink/streampark-flink-client/streampark-flink-client-core/src/main/scala/org/apache/streampark/flink/client/FlinkClientHandler.scala:
##########
@@ -36,6 +36,19 @@ object FlinkClientHandler {
}
}
+ def triggerSavepoint(savepointRequest: TriggerSavepointRequest):
SavepointResponse = {
+ savepointRequest.executionMode match {
+ case ExecutionMode.LOCAL =>
LocalSubmit.triggerSavepoint(savepointRequest)
+ case ExecutionMode.REMOTE =>
RemoteSubmit.triggerSavepoint(savepointRequest)
+ case ExecutionMode.YARN_APPLICATION =>
YarnApplicationSubmit.triggerSavepoint(savepointRequest)
+ case ExecutionMode.YARN_SESSION =>
YarnSessionSubmit.triggerSavepoint(savepointRequest)
+ case ExecutionMode.YARN_PER_JOB | ExecutionMode.YARN_SESSION =>
YarnPerJobSubmit.triggerSavepoint(savepointRequest)
+ case ExecutionMode.KUBERNETES_NATIVE_SESSION =>
KubernetesNativeSessionSubmit.triggerSavepoint(savepointRequest)
+ case ExecutionMode.KUBERNETES_NATIVE_APPLICATION =>
KubernetesNativeApplicationSubmit.triggerSavepoint(savepointRequest)
+ case _ => throw new UnsupportedOperationException(s"Unsupported
${savepointRequest.executionMode} Submit ")
+ }
+ }
+
Review Comment:
> Hi @RocMarshal , `FlinkClientHandler` is a bad case for code design, it
has too many `match ... case `.
>
> It can be refactored after this PR, would you like to work on it?
>
> cc @wolfboys
Indeed, this part of the code needs to be refactored, which can be done in
the next PR
--
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]