This is an automated email from the ASF dual-hosted git repository. morningman pushed a commit to branch branch-2.0 in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/branch-2.0 by this push: new dc641c3f54a [fix](Branch2.0) Catch error information after `hdfsCloseFile()` (#33206) dc641c3f54a is described below commit dc641c3f54a89b80e7e67c821c3df60c9a3e1a41 Author: Tiewei Fang <43782773+bepppo...@users.noreply.github.com> AuthorDate: Wed Apr 3 17:13:58 2024 +0800 [fix](Branch2.0) Catch error information after `hdfsCloseFile()` (#33206) backport: #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 fe4b6cde199..4f582d77cb1 100644 --- a/be/src/io/fs/hdfs_file_writer.cpp +++ b/be/src/io/fs/hdfs_file_writer.cpp @@ -64,8 +64,14 @@ Status HdfsFileWriter::close() { LOG(WARNING) << ss.str(); return Status::InternalError(ss.str()); } - hdfsCloseFile(_hdfs_fs->_fs_handle->hdfs_fs, _hdfs_file); + result = hdfsCloseFile(_hdfs_fs->_fs_handle->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(), _hdfs_fs->_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