MCPcopy Create free account
hub / github.com/ClickHouse/ClickHouse / readFileByObjectKey

Method readFileByObjectKey

src/Backups/BackupImpl.cpp:807–816  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

805}
806
807std::unique_ptr<ReadBufferFromFileBase> BackupImpl::readFileByObjectKey(const BackupFileInfo & info) const
808{
809 if (open_mode == OpenMode::WRITE)
810 throw Exception(ErrorCodes::LOGICAL_ERROR, "The backup file should not be opened for writing. Something is wrong internally");
811
812 if (info.object_key.empty())
813 throw Exception(ErrorCodes::LOGICAL_ERROR, "Object key of {} is empty string", info.data_file_name);
814
815 return lightweight_snapshot_reader->readFile(info.object_key);
816}
817
818std::unique_ptr<ReadBufferFromFileBase>
819BackupImpl::readFileImpl(const String & file_name, const SizeAndChecksum & size_and_checksum, bool read_encrypted) const

Callers

nothing calls this directly

Calls 3

ExceptionClass · 0.50
emptyMethod · 0.45
readFileMethod · 0.45

Tested by

no test coverage detected