mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-15 19:02:04 +00:00
28 lines
446 B
C++
28 lines
446 B
C++
|
#pragma once
|
||
|
|
||
|
#include <Common/ZooKeeper/IKeeper.h>
|
||
|
#include <Core/UUID.h>
|
||
|
#include <set>
|
||
|
|
||
|
namespace DB
|
||
|
{
|
||
|
|
||
|
struct PinnedPartUUIDs
|
||
|
{
|
||
|
std::set<UUID> part_uuids;
|
||
|
Coordination::Stat stat{};
|
||
|
|
||
|
bool contains(const UUID & part_uuid) const
|
||
|
{
|
||
|
return part_uuids.contains(part_uuid);
|
||
|
}
|
||
|
|
||
|
String toString() const;
|
||
|
void fromString(const String & buf);
|
||
|
|
||
|
private:
|
||
|
static constexpr auto JSON_KEY_UUIDS = "part_uuids";
|
||
|
};
|
||
|
|
||
|
}
|