platoneko commented on code in PR #33796:
URL: https://github.com/apache/doris/pull/33796#discussion_r1568944187
##########
be/src/io/fs/hdfs_file_writer.cpp:
##########
@@ -26,23 +26,44 @@
#include "common/logging.h"
#include "common/status.h"
+#include "io/cache/block_file_cache.h"
+#include "io/cache/block_file_cache_factory.h"
+#include "io/cache/file_cache_common.h"
#include "io/fs/err_utils.h"
#include "io/fs/hdfs_file_system.h"
#include "io/hdfs_util.h"
#include "service/backend_options.h"
+#include "util/bvar_helper.h"
namespace doris::io {
+bvar::Adder<uint64_t> hdfs_file_writer_total("hdfs_file_writer", "total_num");
+bvar::Adder<uint64_t> hdfs_bytes_written_total("hdfs_file_writer",
"bytes_written");
+bvar::Adder<uint64_t> hdfs_file_created_total("hdfs_file_writer",
"file_created");
+bvar::Adder<uint64_t> hdfs_file_being_written("hdfs_file_writer",
"file_being_written");
+
HdfsFileWriter::HdfsFileWriter(Path path, HdfsHandler* handler, hdfsFile
hdfs_file,
std::string fs_name, const FileWriterOptions*
opts)
: _path(std::move(path)),
_hdfs_handler(handler),
_hdfs_file(hdfs_file),
_fs_name(std::move(fs_name)),
- _sync_file_data(opts ? opts->sync_file_data : true) {}
+ _sync_file_data(opts ? opts->sync_file_data : true),
+ _batch_buffer(config::hdfs_write_batch_buffer_size) {
+ if (config::enable_file_cache && (opts ? opts->write_file_cache : false)) {
+ _batch_buffer._write_file_cache = true;
Review Comment:
`_batch_buffer._write_file_cache` might be uninitialized
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]