hailin0 commented on code in PR #6843:
URL: https://github.com/apache/seatunnel/pull/6843#discussion_r1631316446


##########
seatunnel-engine/seatunnel-engine-server/src/main/java/org/apache/seatunnel/engine/server/master/JobMaster.java:
##########
@@ -333,6 +361,30 @@ public void run() {
         }
     }
 
+    public static void handleSaveMode(SeaTunnelSink sink) {
+        if (sink instanceof SupportSaveMode) {
+            Optional<SaveModeHandler> saveModeHandler =
+                    ((SupportSaveMode) sink).getSaveModeHandler();
+            if (saveModeHandler.isPresent()) {
+                try (SaveModeHandler handler = saveModeHandler.get()) {
+                    new SaveModeExecuteWrapper(handler).execute();
+                } catch (Exception e) {
+                    throw new 
SeaTunnelRuntimeException(HANDLE_SAVE_MODE_FAILED, e);
+                }
+            }
+        } else if (sink.getClass()
+                .getName()
+                .equals(
+                        
"org.apache.seatunnel.connectors.seatunnel.common.multitablesink.MultiTableSink"))
 {
+            // TODO we should not use class name to judge the sink type

Review Comment:
   Please explain the detailed reason. I see that it is possible to implement 
`SaveModeHandler`



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