mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-14 02:12:21 +00:00
97f2a2213e
* Move some code outside dbms/src folder * Fix paths
22 lines
607 B
C++
22 lines
607 B
C++
#include "RegionsHierarchies.h"
|
|
|
|
#include <Poco/DirectoryIterator.h>
|
|
#include <common/logger_useful.h>
|
|
|
|
|
|
RegionsHierarchies::RegionsHierarchies(IRegionsHierarchiesDataProviderPtr data_provider)
|
|
{
|
|
Logger * log = &Logger::get("RegionsHierarchies");
|
|
|
|
LOG_DEBUG(log, "Adding default regions hierarchy");
|
|
data.emplace("", data_provider->getDefaultHierarchySource());
|
|
|
|
for (const auto & name : data_provider->listCustomHierarchies())
|
|
{
|
|
LOG_DEBUG(log, "Adding regions hierarchy for " << name);
|
|
data.emplace(name, data_provider->getHierarchySource(name));
|
|
}
|
|
|
|
reload();
|
|
}
|