[ 
https://issues.apache.org/jira/browse/HBASE-17503?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15834162#comment-15834162
 ] 

Heng Chen commented on HBASE-17503:
-----------------------------------

{code}
+void Configuration::SetInt(const std::string &key, const int32_t value) {
+  Set(key, boost::lexical_cast<std::string>(value));
+}
+
+void Configuration::SetLong(const std::string &key, const int64_t value) {
+  Set(key, boost::lexical_cast<std::string>(value));
+}
+
+void Configuration::SetDouble(const std::string &key, const double value) {
+  Set(key, boost::lexical_cast<std::string>(value));
+}
+
+void Configuration::SetBool(const std::string &key, const bool value) {
+  Set(key, boost::lexical_cast<std::string>(value));
+}
{code}

Hints: 
According to google c++ code style,  pass-in value should not use "const", only 
reference need it. :)

> [C++] Configuration should be settable and used w/o XML files
> -------------------------------------------------------------
>
>                 Key: HBASE-17503
>                 URL: https://issues.apache.org/jira/browse/HBASE-17503
>             Project: HBase
>          Issue Type: Sub-task
>            Reporter: Enis Soztutar
>            Assignee: Enis Soztutar
>             Fix For: HBASE-14850
>
>         Attachments: hbase-17503_v1.patch
>
>
> Configuration right now is read-only, and there is only XML based 
> configuration loader. 
> However, in testing, we need the Config object w/o the XML files, and we need 
> to be able to set specific values in the conf.  



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to