niumy0701 commented on code in PR #17718:
URL:
https://github.com/apache/dolphinscheduler/pull/17718#discussion_r2596779275
##########
dolphinscheduler-task-plugin/dolphinscheduler-task-dms/src/main/java/org/apache/dolphinscheduler/plugin/task/dms/DmsHook.java:
##########
@@ -141,10 +141,19 @@ public void stopReplicationTask() {
if (replicationTaskArn == null) {
return;
}
- StopReplicationTaskRequest request = new StopReplicationTaskRequest()
- .withReplicationTaskArn(replicationTaskArn);
- client.stopReplicationTask(request);
- awaitReplicationTaskStatus(STATUS.STOPPED);
+ try {
+ StopReplicationTaskRequest request = new
StopReplicationTaskRequest()
+ .withReplicationTaskArn(replicationTaskArn);
+ client.stopReplicationTask(request);
+ awaitReplicationTaskStatus(STATUS.STOPPED);
+ } catch (Exception e) {
+ log.error("stopReplicationTask error: ", e);
+ } finally {
+ if (client != null) {
+ // shutdown client
+ client.shutdown();
+ }
+ }
Review Comment:
Okay, thank you for your reply. I will make the necessary modifications
according to your suggestions
--
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]