gavinchou commented on code in PR #53801:
URL: https://github.com/apache/doris/pull/53801#discussion_r2266228236


##########
be/src/io/fs/hdfs_file_writer.cpp:
##########
@@ -146,13 +146,7 @@ HdfsFileWriter::HdfsFileWriter(Path path, 
std::shared_ptr<HdfsHandler> handler,
           _fs_name(std::move(fs_name)),
           _sync_file_data(opts ? opts->sync_file_data : true),
           _batch_buffer(MB * config::hdfs_write_batch_buffer_size_mb) {
-    if (config::enable_file_cache && opts != nullptr && 
opts->write_file_cache) {
-        _cache_builder = 
std::make_unique<FileCacheAllocatorBuilder>(FileCacheAllocatorBuilder {
-                opts ? opts->is_cold_data : false, opts ? 
opts->file_cache_expiration : 0,
-                BlockFileCache::hash(_path.filename().native()),
-                FileCacheFactory::instance()->get_by_path(
-                        BlockFileCache::hash(_path.filename().native()))});
-    }
+    init_cache_builder(opts, _path);

Review Comment:
   这个每次都会调用, 需要想办法 看下是不是在父类就完成, 不用每个子类都写一遍?



-- 
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]

Reply via email to