mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-17 03:42:48 +00:00
43 lines
872 B
C++
43 lines
872 B
C++
|
#pragma once
|
||
|
|
||
|
#include <city.h>
|
||
|
#include <base/types.h>
|
||
|
|
||
|
namespace DB
|
||
|
{
|
||
|
|
||
|
class IMergeTreeDataPart;
|
||
|
|
||
|
class SeekableReadBuffer;
|
||
|
|
||
|
class IDisk;
|
||
|
using DiskPtr = std::shared_ptr<IDisk>;
|
||
|
|
||
|
|
||
|
class IPartMetadataManager
|
||
|
{
|
||
|
public:
|
||
|
using uint128 = CityHash_v1_0_2::uint128;
|
||
|
|
||
|
explicit IPartMetadataManager(const IMergeTreeDataPart * part_);
|
||
|
|
||
|
virtual ~IPartMetadataManager() = default;
|
||
|
|
||
|
virtual std::unique_ptr<SeekableReadBuffer> read(const String & file_name) const = 0;
|
||
|
|
||
|
virtual bool exists(const String & file_name) const = 0;
|
||
|
|
||
|
virtual void deleteAll(bool include_projection) = 0;
|
||
|
|
||
|
virtual void assertAllDeleted(bool include_projection) const = 0;
|
||
|
|
||
|
virtual void updateAll(bool include_projection) = 0;
|
||
|
|
||
|
protected:
|
||
|
const IMergeTreeDataPart * part;
|
||
|
const DiskPtr disk;
|
||
|
};
|
||
|
|
||
|
using PartMetadataManagerPtr = std::shared_ptr<IPartMetadataManager>;
|
||
|
}
|