mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-21 15:12:02 +00:00
Merge pull request #21842 from HumanUser/master
zookeeper-dump-tree: added ctime option to dump node ctime
This commit is contained in:
commit
b8a437c35a
@ -17,6 +17,7 @@ int main(int argc, char ** argv)
|
||||
"addresses of ZooKeeper instances, comma separated. Example: example01e.yandex.ru:2181")
|
||||
("path,p", boost::program_options::value<std::string>()->default_value("/"),
|
||||
"where to start")
|
||||
("ctime,c", "print node ctime")
|
||||
;
|
||||
|
||||
boost::program_options::variables_map options;
|
||||
@ -30,6 +31,8 @@ int main(int argc, char ** argv)
|
||||
return 1;
|
||||
}
|
||||
|
||||
bool dump_ctime = options.count("ctime");
|
||||
|
||||
zkutil::ZooKeeperPtr zookeeper = std::make_shared<zkutil::ZooKeeper>(options.at("address").as<std::string>());
|
||||
|
||||
std::string initial_path = options.at("path").as<std::string>();
|
||||
@ -79,7 +82,10 @@ int main(int argc, char ** argv)
|
||||
throw;
|
||||
}
|
||||
|
||||
std::cout << it->first << '\t' << response.stat.numChildren << '\t' << response.stat.dataLength << '\n';
|
||||
std::cout << it->first << '\t' << response.stat.numChildren << '\t' << response.stat.dataLength;
|
||||
if (dump_ctime)
|
||||
std::cout << '\t' << response.stat.ctime;
|
||||
std::cout << '\n';
|
||||
|
||||
for (const auto & name : response.names)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user