ClickHouse/dbms/include/DB/Storages/MergeTree/ReshardingJob.h
Alexey Arno ae2f7c7613 Merge
2016-01-26 03:30:18 +03:00

36 lines
919 B
C++
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#pragma once
#include <DB/Storages/AlterCommands.h>
#include <string>
namespace DB
{
/** Описание задачи перешардирования.
*/
struct ReshardingJob final
{
public:
/// Создаёт описание на основе его сериализованного представления.
ReshardingJob(const std::string & serialized_job);
ReshardingJob(const std::string & database_name_, const std::string & table_name_,
const std::string & partition_, const WeightedZooKeeperPaths & paths_,
const ASTPtr & sharding_key_expr_);
ReshardingJob(const ReshardingJob &) = delete;
ReshardingJob & operator=(const ReshardingJob &) = delete;
/// Сериализует описание задачи.
std::string toString() const;
public:
std::string database_name;
std::string table_name;
std::string partition;
WeightedZooKeeperPaths paths;
ASTPtr sharding_key_expr;
};
}