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

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


The following commit(s) were added to refs/heads/master by this push:
     new 8eea3cb92d7 [fix](hdfs-writer) Catch error information after 
`hdfsCloseFile()` (#33195)
8eea3cb92d7 is described below

commit 8eea3cb92d7590915f77326ad25dafa08c36f24b
Author: Tiewei Fang <43782773+bepppo...@users.noreply.github.com>
AuthorDate: Sun Apr 7 22:23:11 2024 +0800

    [fix](hdfs-writer) Catch error information after `hdfsCloseFile()` (#33195)
---
 be/src/io/fs/hdfs_file_writer.cpp | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/be/src/io/fs/hdfs_file_writer.cpp 
b/be/src/io/fs/hdfs_file_writer.cpp
index 4b2a0413f35..fcb4ccfd74a 100644
--- a/be/src/io/fs/hdfs_file_writer.cpp
+++ b/be/src/io/fs/hdfs_file_writer.cpp
@@ -62,8 +62,14 @@ Status HdfsFileWriter::close() {
         return Status::InternalError(ss.str());
     }
 
-    hdfsCloseFile(_hdfs_handler->hdfs_fs, _hdfs_file);
+    result = hdfsCloseFile(_hdfs_handler->hdfs_fs, _hdfs_file);
     _hdfs_file = nullptr;
+    if (result != 0) {
+        std::string err_msg = hdfs_error();
+        return Status::InternalError(
+                "Write hdfs file failed. (BE: {}) namenode:{}, path:{}, err: 
{}",
+                BackendOptions::get_localhost(), _fs_name, _path.string(), 
err_msg);
+    }
     return Status::OK();
 }
 


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org
For additional commands, e-mail: commits-h...@doris.apache.org

Reply via email to