imay commented on a change in pull request #2235: Support setting properties for storage_root_path URL: https://github.com/apache/incubator-doris/pull/2235#discussion_r348430521
########## File path: be/src/olap/options.cpp ########## @@ -29,36 +29,96 @@ namespace doris { // compatible with old multi path configuration: // /path1,2014;/path2,2048 -OLAPStatus parse_conf_store_paths( - const std::string& config_path, - std::vector<StorePath>* paths) { +OLAPStatus parse_root_path(const std::string& root_path, StorePath* path) { + std::vector<std::string> tmp_vec; + boost::split(tmp_vec, root_path, boost::is_any_of(","), + boost::token_compress_on); + + // parse root path name + boost::trim(tmp_vec[0]); + tmp_vec[0].erase(tmp_vec[0].find_last_not_of("/") + 1); + if (tmp_vec[0].empty() || tmp_vec[0][0] != '/') { + LOG(WARNING) << "invalid store path. path=" << tmp_vec[0]; + return OLAP_ERR_INPUT_PARAMETER_ERROR; + } + path->path = tmp_vec[0]; + + // parse root path capacity and storage medium + std::string capacity_str, medium_str; + + boost::filesystem::path boost_path = tmp_vec[0]; Review comment: should do this operation in a try catch block to avoid exception ---------------------------------------------------------------- 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 With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org