mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-19 22:22:00 +00:00
48 lines
1.6 KiB
C++
48 lines
1.6 KiB
C++
|
#include <DB/Storages/StorageReplicatedMergeTree.h>
|
||
|
|
||
|
namespace DB
|
||
|
{
|
||
|
|
||
|
StorageReplicatedMergeTree::StorageReplicatedMergeTree(
|
||
|
const String & zookeeper_path_,
|
||
|
const String & replica_name_,
|
||
|
const String & path_, const String & name_, NamesAndTypesListPtr columns_,
|
||
|
const Context & context_,
|
||
|
ASTPtr & primary_expr_ast_,
|
||
|
const String & date_column_name_,
|
||
|
const ASTPtr & sampling_expression_,
|
||
|
size_t index_granularity_,
|
||
|
MergeTreeData::Mode mode_,
|
||
|
const String & sign_column_,
|
||
|
const MergeTreeSettings & settings_)
|
||
|
:
|
||
|
path(path_), name(name_), full_path(path + escapeForFileName(name) + '/'), zookeeper_path(zookeeper_path_),
|
||
|
replica_name(replica_name_),
|
||
|
data( full_path, columns_, context_, primary_expr_ast_, date_column_name_, sampling_expression_,
|
||
|
index_granularity_,mode_, sign_column_, settings_),
|
||
|
reader(data), writer(data),
|
||
|
log(&Logger::get("StorageReplicatedMergeTree")),
|
||
|
shutdown_called(false)
|
||
|
{
|
||
|
|
||
|
}
|
||
|
|
||
|
StoragePtr StorageReplicatedMergeTree::create(
|
||
|
const String & zookeeper_path_,
|
||
|
const String & replica_name_,
|
||
|
const String & path_, const String & name_, NamesAndTypesListPtr columns_,
|
||
|
const Context & context_,
|
||
|
ASTPtr & primary_expr_ast_,
|
||
|
const String & date_column_name_,
|
||
|
const ASTPtr & sampling_expression_,
|
||
|
size_t index_granularity_,
|
||
|
MergeTreeData::Mode mode_,
|
||
|
const String & sign_column_,
|
||
|
const MergeTreeSettings & settings_)
|
||
|
{
|
||
|
return (new StorageReplicatedMergeTree(zookeeper_path_, replica_name_, path_, name_, columns_, context_, primary_expr_ast_,
|
||
|
date_column_name_, sampling_expression_, index_granularity_, mode_, sign_column_, settings_))->thisPtr();
|
||
|
}
|
||
|
|
||
|
}
|