mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-10 01:25:21 +00:00
Use the same default paths for clickhouse_keeper (symlink) as for clickhouse_keeper (executable),
i.e. "/var/lib/clickhouse-keeper/.."
This commit is contained in:
parent
0874b507df
commit
552331fd54
@ -294,7 +294,7 @@ try
|
||||
else if (config().has("keeper_server.snapshot_storage_path"))
|
||||
path = std::filesystem::path(config().getString("keeper_server.snapshot_storage_path")).parent_path();
|
||||
else
|
||||
path = std::filesystem::path{KEEPER_DEFAULT_PATH};
|
||||
path = config().getString("path", KEEPER_DEFAULT_PATH);
|
||||
|
||||
std::filesystem::create_directories(path);
|
||||
|
||||
@ -330,6 +330,7 @@ try
|
||||
auto global_context = Context::createGlobal(shared_context.get());
|
||||
|
||||
global_context->makeGlobalContext();
|
||||
global_context->setApplicationType(Context::ApplicationType::KEEPER);
|
||||
global_context->setPath(path);
|
||||
global_context->setRemoteHostFilter(config());
|
||||
|
||||
@ -365,7 +366,7 @@ try
|
||||
}
|
||||
|
||||
/// Initialize keeper RAFT. Do nothing if no keeper_server in config.
|
||||
global_context->initializeKeeperDispatcher(/* start_async = */ true);
|
||||
global_context->initializeKeeperDispatcher(/* start_async = */ false);
|
||||
FourLetterCommandFactory::registerCommands(*global_context->getKeeperDispatcher());
|
||||
|
||||
auto config_getter = [&] () -> const Poco::Util::AbstractConfiguration &
|
||||
|
@ -98,6 +98,14 @@ public:
|
||||
std::shared_ptr<FilesystemCacheLog> getFilesystemCacheLog() const;
|
||||
std::shared_ptr<FilesystemReadPrefetchesLog> getFilesystemReadPrefetchesLog() const;
|
||||
|
||||
enum class ApplicationType
|
||||
{
|
||||
KEEPER
|
||||
};
|
||||
|
||||
void setApplicationType(ApplicationType) {}
|
||||
ApplicationType getApplicationType() const { return ApplicationType::KEEPER; }
|
||||
|
||||
IAsynchronousReader & getThreadPoolReader(FilesystemReaderType type) const;
|
||||
std::shared_ptr<AsyncReadCounters> getAsyncReadCounters() const;
|
||||
ThreadPool & getThreadPoolWriter() const;
|
||||
|
Loading…
Reference in New Issue
Block a user