ClickHouse/dbms/Dictionaries/Embedded/RegionsHierarchies.cpp
Ivan 97f2a2213e
Move all folders inside /dbms one level up (#9974)
* Move some code outside dbms/src folder
* Fix paths
2020-04-02 02:51:21 +03:00

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();
}