From 3387f9e5979ac7cbdf21f9565cc63b1e99b60953 Mon Sep 17 00:00:00 2001 From: alesapin Date: Thu, 10 Feb 2022 16:55:12 +0300 Subject: [PATCH] Possible fix DiskHDFS --- src/Disks/HDFS/DiskHDFS.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Disks/HDFS/DiskHDFS.cpp b/src/Disks/HDFS/DiskHDFS.cpp index 2f2b71cd53f..1f0d3fe5281 100644 --- a/src/Disks/HDFS/DiskHDFS.cpp +++ b/src/Disks/HDFS/DiskHDFS.cpp @@ -98,9 +98,9 @@ std::unique_ptr DiskHDFS::writeFile(const String & path auto hdfs_buffer = std::make_unique(hdfs_path, config, settings->replication, buf_size, mode == WriteMode::Rewrite ? O_WRONLY : O_WRONLY | O_APPEND); - auto create_metadata_callback = [this, path, mode, hdfs_path] (size_t count) + auto create_metadata_callback = [this, path, mode, file_name] (size_t count) { - readOrCreateUpdateAndStoreMetadata(path, mode, false, [hdfs_path, count] (Metadata & metadata) { metadata.addObject(hdfs_path, count); return true; }); + readOrCreateUpdateAndStoreMetadata(path, mode, false, [file_name, count] (Metadata & metadata) { metadata.addObject(file_name, count); return true; }); }; return std::make_unique>(