Style [#CLICKHOUSE-2].

This commit is contained in:
Alexey Milovidov 2017-02-13 13:38:50 +03:00
parent bb7247993a
commit 8f9b70a1d7
5 changed files with 17 additions and 11 deletions

View File

@ -87,6 +87,7 @@ StorageDistributedDirectoryMonitor::StorageDistributedDirectoryMonitor(StorageDi
{
}
StorageDistributedDirectoryMonitor::~StorageDistributedDirectoryMonitor()
{
{
@ -97,6 +98,7 @@ StorageDistributedDirectoryMonitor::~StorageDistributedDirectoryMonitor()
thread.join();
}
void StorageDistributedDirectoryMonitor::run()
{
setThreadName("DistrDirMonitor");
@ -135,6 +137,7 @@ void StorageDistributedDirectoryMonitor::run()
}
}
ConnectionPoolPtr StorageDistributedDirectoryMonitor::createPool(const std::string & name)
{
const auto pool_factory = [this, &name] (const std::string & host, const UInt16 port,
@ -152,6 +155,7 @@ ConnectionPoolPtr StorageDistributedDirectoryMonitor::createPool(const std::stri
return pools.size() == 1 ? pools.front() : std::make_shared<ConnectionPoolWithFailover>(pools, LoadBalancing::RANDOM);
}
bool StorageDistributedDirectoryMonitor::findFiles()
{
std::map<UInt64, std::string> files;
@ -180,6 +184,7 @@ bool StorageDistributedDirectoryMonitor::findFiles()
return true;
}
void StorageDistributedDirectoryMonitor::processFile(const std::string & file_path)
{
LOG_TRACE(log, "Started processing `" << file_path << '`');
@ -229,6 +234,7 @@ void StorageDistributedDirectoryMonitor::processFile(const std::string & file_pa
LOG_TRACE(log, "Finished processing `" << file_path << '`');
}
std::string StorageDistributedDirectoryMonitor::getLoggerName() const
{
return storage.name + '.' + storage.getName() + ".DirectoryMonitor";