You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hudi.apache.org by yi...@apache.org on 2024/05/15 00:13:05 UTC

(hudi) 04/28: [MINOR] Fix BUG: HoodieLogFormatWriter: unable to close output stream for log file HoodieLogFile{xxx} (#10989)

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

yihua pushed a commit to branch branch-0.x
in repository https://gitbox.apache.org/repos/asf/hudi.git

commit 271a22712c29cf1bfcbeed2fe946baca82d0085d
Author: Silly Carbon <cr...@outlook.com>
AuthorDate: Wed Apr 10 18:21:57 2024 +0800

    [MINOR] Fix BUG: HoodieLogFormatWriter: unable to close output stream for log file HoodieLogFile{xxx} (#10989)
    
    * due to java.lang.IllegalStateException: Shutdown in progress, cause:
        when `org.apache.hudi.common.table.log.HoodieLogFormatWriter.close` tries to `removeShutdownHook`, hooks were already removed by JVM when triggered (hooks == null)
---
 .../java/org/apache/hudi/common/table/log/HoodieLogFormatWriter.java    | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/hudi-common/src/main/java/org/apache/hudi/common/table/log/HoodieLogFormatWriter.java b/hudi-common/src/main/java/org/apache/hudi/common/table/log/HoodieLogFormatWriter.java
index 0b16d2ee2a6..d021cd2c499 100644
--- a/hudi-common/src/main/java/org/apache/hudi/common/table/log/HoodieLogFormatWriter.java
+++ b/hudi-common/src/main/java/org/apache/hudi/common/table/log/HoodieLogFormatWriter.java
@@ -294,7 +294,7 @@ public class HoodieLogFormatWriter implements HoodieLogFormat.Writer {
         try {
           LOG.warn("running logformatwriter hook");
           if (output != null) {
-            close();
+            closeStream();
           }
         } catch (Exception e) {
           LOG.warn("unable to close output stream for log file " + logFile, e);