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_r347833986
 
 

 ##########
 File path: be/src/olap/options.cpp
 ##########
 @@ -47,18 +47,63 @@ OLAPStatus parse_conf_store_paths(
                 return OLAP_ERR_INPUT_PARAMETER_ERROR;
             }
 
-            // parse root path capacity
+            // parse root path capacity and storage medium
+            std::string capacity_str, medium_str;
+
+            boost::filesystem::path boost_path = tmp_vec[0];
+            std::string extension = 
boost::filesystem::canonical(boost_path).extension().string();
+            if (!extension.empty()) {
+                medium_str = extension.substr(1);
+            }
+
+            for (int i = 1; i < tmp_vec.size(); i++) {
+                // <property>:<value> or <value>
+                std::string property, value;
+                std::size_t found = tmp_vec[i].find(':');
+                if (found != std::string::npos) {
+                    property = boost::trim_copy(tmp_vec[i].substr(0, found));
+                    value = boost::trim_copy(tmp_vec[i].substr(found + 1));
+                    LOG(INFO) << "get setting: "<< property <<": "<<value;
+                } else {
+                    // <value> only supports setting capacity
+                    property = "capacity";
+                    value = boost::trim_copy(tmp_vec[i]);
+                }
+
+                if (property == "capacity") {
 
 Review comment:
   better to use ignore case compare

----------------------------------------------------------------
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

Reply via email to