DDLWorkerQueueTable - load distributed_ddl.path from server config

This commit is contained in:
bharatnc 2020-12-05 16:24:18 -08:00
parent b008c49bd9
commit cc568a1d2c
2 changed files with 5 additions and 4 deletions

View File

@ -7,7 +7,6 @@
#include <DataTypes/DataTypeArray.h>
#include <DataTypes/DataTypeString.h>
#include <Interpreters/Context.h>
#include <Poco/Util/Application.h>
#include <Common/ZooKeeper/ZooKeeper.h>
@ -27,9 +26,7 @@ void StorageSystemDDLWorkerQueue::fillData(MutableColumns & res_columns, const C
{
zkutil::ZooKeeperPtr zookeeper = context.getZooKeeper();
// TODO: load using config().getString("distributed_ddl.path", "/clickhouse/task_queue/ddl/");
String ddl_zookeeper_path = "/clickhouse/task_queue/ddl";
String ddl_zookeeper_path = config.getString("distributed_ddl.path", "/clickhouse/task_queue/ddl/");
String ddl_query_path;
// this is equivalent to query zookeeper at the `ddl_zookeeper_path`

View File

@ -1,5 +1,8 @@
#pragma once
#include <Poco/Util/Application.h>
#include <Poco/Util/LayeredConfiguration.h>
#include <Storages/System/IStorageSystemOneBlock.h>
#include <ext/shared_ptr_helper.h>
@ -15,6 +18,7 @@ class StorageSystemDDLWorkerQueue final : public ext::shared_ptr_helper<StorageS
public IStorageSystemOneBlock<StorageSystemDDLWorkerQueue>
{
friend struct ext::shared_ptr_helper<StorageSystemDDLWorkerQueue>;
Poco::Util::LayeredConfiguration & config = Poco::Util::Application::instance().config();
protected:
void fillData(MutableColumns & res_columns, const Context & context, const SelectQueryInfo & query_info) const override;