diff --git a/components/core/src/clp/FileDecompressor.cpp b/components/core/src/clp/FileDecompressor.cpp index 4f6f84bbc..5cbe7958d 100644 --- a/components/core/src/clp/FileDecompressor.cpp +++ b/components/core/src/clp/FileDecompressor.cpp @@ -9,7 +9,7 @@ using std::string; namespace clp { bool FileDecompressor::decompress_file( - streaming_archive::MetadataDB::FileIterator& file_metadata_ix, + streaming_archive::MetadataDB::FileIterator const& file_metadata_ix, string const& output_dir, streaming_archive::reader::Archive& archive_reader, std::unordered_map& temp_path_to_final_path diff --git a/components/core/src/clp/FileDecompressor.hpp b/components/core/src/clp/FileDecompressor.hpp index 108526123..74450d1cc 100644 --- a/components/core/src/clp/FileDecompressor.hpp +++ b/components/core/src/clp/FileDecompressor.hpp @@ -18,7 +18,7 @@ class FileDecompressor { public: // Methods bool decompress_file( - streaming_archive::MetadataDB::FileIterator& file_metadata_ix, + streaming_archive::MetadataDB::FileIterator const& file_metadata_ix, std::string const& output_dir, streaming_archive::reader::Archive& archive_reader, std::unordered_map& temp_path_to_final_path diff --git a/components/core/src/clp/decompression.cpp b/components/core/src/clp/decompression.cpp index b9b76bdb7..fba93f919 100644 --- a/components/core/src/clp/decompression.cpp +++ b/components/core/src/clp/decompression.cpp @@ -102,8 +102,6 @@ bool decompress( for (auto& file_metadata_ix = *file_metadata_ix_ptr; file_metadata_ix.has_next(); file_metadata_ix.next()) { - file_metadata_ix.get_path(orig_path); - // Decompress file if (false == file_decompressor.decompress_file( @@ -140,8 +138,6 @@ bool decompress( for (auto& file_metadata_ix = *file_metadata_ix_ptr; file_metadata_ix.has_next(); file_metadata_ix.next()) { - file_metadata_ix.get_path(orig_path); - // Decompress file if (false == file_decompressor.decompress_file( @@ -193,7 +189,6 @@ bool decompress( { return false; } - file_metadata_ix.get_path(orig_path); decompressed_files.insert(orig_path); } file_metadata_ix_ptr.reset(nullptr); diff --git a/components/core/src/streaming_archive/reader/Archive.cpp b/components/core/src/streaming_archive/reader/Archive.cpp index eb3d7d075..627ba105c 100644 --- a/components/core/src/streaming_archive/reader/Archive.cpp +++ b/components/core/src/streaming_archive/reader/Archive.cpp @@ -126,7 +126,7 @@ namespace streaming_archive { namespace reader { m_var_dictionary.read_new_entries(); } - ErrorCode Archive::open_file(File& file, MetadataDB::FileIterator& file_metadata_ix) { + ErrorCode Archive::open_file(File& file, MetadataDB::FileIterator const& file_metadata_ix) { return file.open_me(m_logtype_dictionary, file_metadata_ix, m_segment_manager); } diff --git a/components/core/src/streaming_archive/reader/Archive.hpp b/components/core/src/streaming_archive/reader/Archive.hpp index 9a2ae63c1..b007bed85 100644 --- a/components/core/src/streaming_archive/reader/Archive.hpp +++ b/components/core/src/streaming_archive/reader/Archive.hpp @@ -58,7 +58,7 @@ namespace streaming_archive { namespace reader { * @param file_metadata_ix * @return Same as streaming_archive::reader::File::open_me */ - ErrorCode open_file(File& file, MetadataDB::FileIterator& file_metadata_ix); + ErrorCode open_file(File& file, MetadataDB::FileIterator const& file_metadata_ix); /** * Wrapper for streaming_archive::reader::File::close_me * @param file diff --git a/components/core/src/streaming_archive/reader/File.cpp b/components/core/src/streaming_archive/reader/File.cpp index a12ba2333..ff7c1fd53 100644 --- a/components/core/src/streaming_archive/reader/File.cpp +++ b/components/core/src/streaming_archive/reader/File.cpp @@ -21,7 +21,7 @@ epochtime_t File::get_end_ts() const { ErrorCode File::open_me( LogTypeDictionaryReader const& archive_logtype_dict, - MetadataDB::FileIterator& file_metadata_ix, + MetadataDB::FileIterator const& file_metadata_ix, SegmentManager& segment_manager ) { m_archive_logtype_dict = &archive_logtype_dict; diff --git a/components/core/src/streaming_archive/reader/File.hpp b/components/core/src/streaming_archive/reader/File.hpp index 283c79df1..df5e0649e 100644 --- a/components/core/src/streaming_archive/reader/File.hpp +++ b/components/core/src/streaming_archive/reader/File.hpp @@ -79,7 +79,7 @@ class File { */ ErrorCode open_me( LogTypeDictionaryReader const& archive_logtype_dict, - MetadataDB::FileIterator& file_metadata_ix, + MetadataDB::FileIterator const& file_metadata_ix, SegmentManager& segment_manager ); /**