2021-04-29 19:16:51 +00:00
|
|
|
#pragma once
|
|
|
|
|
2022-10-20 14:37:27 +00:00
|
|
|
#include <base/types.h>
|
2021-04-29 19:16:51 +00:00
|
|
|
|
|
|
|
#include <memory>
|
2022-10-20 14:37:27 +00:00
|
|
|
#include <unordered_map>
|
2021-04-29 19:16:51 +00:00
|
|
|
|
|
|
|
namespace DB
|
|
|
|
{
|
|
|
|
|
|
|
|
class StatusAccumulator
|
|
|
|
{
|
2022-10-20 14:37:27 +00:00
|
|
|
public:
|
|
|
|
struct TableStatus
|
|
|
|
{
|
|
|
|
size_t all_partitions_count;
|
|
|
|
size_t processed_partitions_count;
|
|
|
|
};
|
|
|
|
|
|
|
|
using Map = std::unordered_map<String, TableStatus>;
|
|
|
|
using MapPtr = std::shared_ptr<Map>;
|
|
|
|
|
|
|
|
static MapPtr fromJSON(String state_json);
|
|
|
|
static String serializeToJSON(MapPtr statuses);
|
2021-04-29 19:16:51 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|