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

nanda pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ozone.git


The following commit(s) were added to refs/heads/master by this push:
     new 70b93dc6a6 HDDS-10764.Tarball creation failing on leader OM node. 
(#7941)
70b93dc6a6 is described below

commit 70b93dc6a622f7e242f3e38d9bb2c0ac6515fdba
Author: Sadanand Shenoy <[email protected]>
AuthorDate: Sat Feb 22 09:35:56 2025 +0530

    HDDS-10764.Tarball creation failing on leader OM node. (#7941)
---
 .../src/main/java/org/apache/hadoop/hdds/utils/HddsServerUtil.java    | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git 
a/hadoop-hdds/framework/src/main/java/org/apache/hadoop/hdds/utils/HddsServerUtil.java
 
b/hadoop-hdds/framework/src/main/java/org/apache/hadoop/hdds/utils/HddsServerUtil.java
index c3879a5760..629dbbcf54 100644
--- 
a/hadoop-hdds/framework/src/main/java/org/apache/hadoop/hdds/utils/HddsServerUtil.java
+++ 
b/hadoop-hdds/framework/src/main/java/org/apache/hadoop/hdds/utils/HddsServerUtil.java
@@ -635,8 +635,10 @@ public static void includeFile(File file, String entryName,
     archiveOutputStream.putArchiveEntry(archiveEntry);
     try (FileInputStream fis = new FileInputStream(file)) {
       IOUtils.copy(fis, archiveOutputStream);
+      archiveOutputStream.flush();
+    } finally {
+      archiveOutputStream.closeArchiveEntry();
     }
-    archiveOutputStream.closeArchiveEntry();
   }
 
   // Mark tarball completed.


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

Reply via email to