You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-commits@hadoop.apache.org by bh...@apache.org on 2019/04/10 23:57:39 UTC

[hadoop] branch ozone-0.4 updated: HDDS-1417. After successfully importing a container, datanode should delete the container tar.gz file from working directory. (#721)

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

bharat pushed a commit to branch ozone-0.4
in repository https://gitbox.apache.org/repos/asf/hadoop.git


The following commit(s) were added to refs/heads/ozone-0.4 by this push:
     new 50d7c91  HDDS-1417. After successfully importing a container, datanode should delete the container tar.gz file from working directory. (#721)
50d7c91 is described below

commit 50d7c91de16f9b78a52c4fce8e781a8c617a9b46
Author: Nanda kumar <na...@apache.org>
AuthorDate: Thu Apr 11 05:25:37 2019 +0530

    HDDS-1417. After successfully importing a container, datanode should delete the container tar.gz file from working directory. (#721)
    
    (cherry picked from commit e9c4109004ca378806f167ed580b57fd0d191fd4)
---
 .../ozone/container/replication/DownloadAndImportReplicator.java   | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/replication/DownloadAndImportReplicator.java b/hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/replication/DownloadAndImportReplicator.java
index 3100a68..eef01a1 100644
--- a/hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/replication/DownloadAndImportReplicator.java
+++ b/hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/replication/DownloadAndImportReplicator.java
@@ -95,13 +95,12 @@ public class DownloadAndImportReplicator implements ContainerReplicator {
       LOG.error(
           "Can't import the downloaded container data id=" + containerID,
           e);
+    } finally {
       try {
         Files.delete(tarFilePath);
       } catch (Exception ex) {
-        LOG.error(
-            "Container import is failed and the downloaded file can't be "
-                + "deleted: "
-                + tarFilePath.toAbsolutePath().toString());
+        LOG.error("Got exception while deleting downloaded container file: "
+            + tarFilePath.toAbsolutePath().toString(), ex);
       }
     }
   }


---------------------------------------------------------------------
To unsubscribe, e-mail: common-commits-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-commits-help@hadoop.apache.org