diff --git a/src/Coordination/Standalone/Context.cpp b/src/Coordination/Standalone/Context.cpp index 84083169df3e..f0ba16e50eed 100644 --- a/src/Coordination/Standalone/Context.cpp +++ b/src/Coordination/Standalone/Context.cpp @@ -268,6 +268,16 @@ ReadSettings Context::getReadSettings() const return ReadSettings{}; } +ResourceManagerPtr Context::getResourceManager() const +{ + return nullptr; +} + +ClassifierPtr Context::getWorkloadClassifier() const +{ + return nullptr; +} + void Context::initializeKeeperDispatcher([[maybe_unused]] bool start_async) const { const auto & config_ref = getConfigRef(); diff --git a/src/Coordination/Standalone/Context.h b/src/Coordination/Standalone/Context.h index cf0fceab34cc..95f63d40560b 100644 --- a/src/Coordination/Standalone/Context.h +++ b/src/Coordination/Standalone/Context.h @@ -118,6 +118,10 @@ class Context : public std::enable_shared_from_this ReadSettings getReadSettings() const; + /// Resource management related + ResourceManagerPtr getResourceManager() const; + ClassifierPtr getWorkloadClassifier() const; + std::shared_ptr getKeeperDispatcher() const; std::shared_ptr tryGetKeeperDispatcher() const; void initializeKeeperDispatcher(bool start_async) const; diff --git a/src/Disks/ObjectStorages/DiskObjectStorage.cpp b/src/Disks/ObjectStorages/DiskObjectStorage.cpp index 5a70b2ca5798..466a1d3d5dd7 100644 --- a/src/Disks/ObjectStorages/DiskObjectStorage.cpp +++ b/src/Disks/ObjectStorages/DiskObjectStorage.cpp @@ -491,7 +491,7 @@ static inline Settings updateResourceLink(const Settings & settings, const Strin if (auto query_context = CurrentThread::getQueryContext()) { Settings result(settings); - result.resource_link = query_context->getClassifier()->get(resource_name); + result.resource_link = query_context->getWorkloadClassifier()->get(resource_name); return result; } return settings; diff --git a/src/Interpreters/Context.cpp b/src/Interpreters/Context.cpp index 8074fd8afa8f..0b5294b8d00d 100644 --- a/src/Interpreters/Context.cpp +++ b/src/Interpreters/Context.cpp @@ -1294,7 +1294,7 @@ ResourceManagerPtr Context::getResourceManager() const return shared->resource_manager; } -ClassifierPtr Context::getClassifier() const +ClassifierPtr Context::getWorkloadClassifier() const { auto lock = getLock(); if (!classifier) diff --git a/src/Interpreters/Context.h b/src/Interpreters/Context.h index eceed31ae863..a4019d214e4d 100644 --- a/src/Interpreters/Context.h +++ b/src/Interpreters/Context.h @@ -581,7 +581,7 @@ class Context: public std::enable_shared_from_this /// Resource management related ResourceManagerPtr getResourceManager() const; - ClassifierPtr getClassifier() const; + ClassifierPtr getWorkloadClassifier() const; /// We have to copy external tables inside executeQuery() to track limits. Therefore, set callback for it. Must set once. void setExternalTablesInitializer(ExternalTablesInitializer && initializer);