morningman commented on a change in pull request #4704: URL: https://github.com/apache/incubator-doris/pull/4704#discussion_r502741884
########## File path: be/src/common/configbase.cpp ########## @@ -227,6 +231,34 @@ bool Properties::get(const char* key, const char* defstr, T& retval) const { return strtox(valstr, retval); } +void Properties::set(const std::string& key, const std::string& val) { + file_conf_map.emplace(key, val); +} + +bool Properties::dump(const std::string& conffile) { + std::vector<std::string> files = { conffile }; + Status st = FileSystemUtil::remove_paths(files); + if (!st.ok()) { + return false; + } + st = FileSystemUtil::create_file(conffile); + if (!st.ok()) { + return false; + } + + std::ofstream out(conffile); + out << "# THIS IS AN AUTO GENERATED CONFIG FILE.\n"; + out << "# You can modify this file manually, and the configurations in this file\n"; + out << "# will overwrite the configurations in fe.conf\n"; Review comment: ok ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org