sky76093016 commented on a change in pull request #2706:
URL: https://github.com/apache/ozone/pull/2706#discussion_r722825520



##########
File path: 
hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/replication/DownloadAndImportReplicator.java
##########
@@ -125,9 +126,10 @@ public void replicate(ReplicationTask task) {
         importContainer(containerID, path);
         LOG.info("Container {} is replicated successfully", containerID);
         task.setStatus(Status.DONE);
-      } catch (Exception e) {
+      } catch (InterruptedException | IOException | ExecutionException e) {
         LOG.error("Container {} replication was unsuccessful.", containerID, 
e);
         task.setStatus(Status.FAILED);
+        Thread.currentThread().interrupt();

Review comment:
       Thanks to @jojochuang 's review, it is a better choice to handle 
InterruptedException and IOException separately rather than together.Let me do 
it.




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



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to