MCPcopy Create free account
hub / github.com/ClickHouse/ClickHouse / run

Method run

programs/keeper/Keeper.cpp:162–185  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

160}
161
162int Keeper::run()
163{
164 if (config().hasOption("help"))
165 {
166 Poco::Util::HelpFormatter help_formatter(Keeper::options());
167 std::string app_name = (commandName() == "clickhouse-keeper") ? "clickhouse-keeper" : "clickhouse keeper";
168 auto header_str = fmt::format("{0} [OPTION] [-- [ARG]...]\n"
169#if ENABLE_CLICKHOUSE_KEEPER_CLIENT
170 "{0} client [OPTION]\n"
171#endif
172 "positional arguments can be used to rewrite config.xml properties, for example, --http_port=8010",
173 app_name);
174 help_formatter.setHeader(header_str);
175 help_formatter.format(std::cout);
176 return 0;
177 }
178 if (config().hasOption("version"))
179 {
180 std::cout << VERSION_NAME << " keeper version " << VERSION_STRING << VERSION_OFFICIAL << "." << std::endl;
181 return 0;
182 }
183
184 return Application::run(); // NOLINT
185}
186
187void Keeper::initialize(Poco::Util::Application & self)
188{

Calls 5

formatFunction · 0.50
runFunction · 0.50
hasOptionMethod · 0.45
setHeaderMethod · 0.45
formatMethod · 0.45

Tested by

no test coverage detected