You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by "Enis Soztutar (JIRA)" <ji...@apache.org> on 2016/11/03 01:23:59 UTC

[jira] [Commented] (HBASE-16489) Configuration parsing

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

Enis Soztutar commented on HBASE-16489:
---------------------------------------

Thanks Sudeep for the patch. 

bq. Some of the API's have been taken from HDFS-8707 which addresses configuration loading
I think it is fine to have a forked version from HDFS-8707. We cannot depend on a not-yet-merged Hadoop native library for now. Later we can decide to see whether we can make use of these from libhadoop. 

- We won't support windows. We can remove the ifdefs 
{code}
if defined(WIN32)
{code}

- Why DLOG rather than LOG as used elsewhere? 
- I think we should still do the Configuration / ConfigurationLoader divide, and maybe have Configuration as a light-weight thing which does not know about search paths, XML and any other stuff, and have HBaseConfigurationLoader know about those. We can use the Configuration object in the Client to pass around, etc. However, if anybody wants to implement a non-XML based configuration later, then the Configuration object should be shared. 

- You cannot catch exceptions from unit tests, otherwise if a failure happens the test will not fail. The whole idea for unit testing is that the test will fail if there is an exception or unexpected condition. For this patch and others, we should always make it so that {{make check}} will succeed or not based on whether all unit tests succeed, or any unit test fails. We never rely on reading logs in each and every unit test run manually. 
{code}
+  } catch (const std::runtime_error &rex) {
+    LOG(ERROR) << "Exception caught in HBase Configuration creation:- "
+        << rex.what();
+  }
{code}

 - Empty value for a config property is different than config property non-existing. Should we use optionals as in the patch for HDFS-8707? 
{code}
+  } else {
+    DLOG(WARNING) << "Returning empty string as no value for[" << key << "]";
+  }
{code}

 - For client usage, we should need {{GetInt}}, {{GetLong}} and maybe {{GetBool}} methods at least. Others can be added later if we need those. 

> Configuration parsing
> ---------------------
>
>                 Key: HBASE-16489
>                 URL: https://issues.apache.org/jira/browse/HBASE-16489
>             Project: HBase
>          Issue Type: Sub-task
>            Reporter: Sudeep Sunthankar
>            Assignee: Sudeep Sunthankar
>         Attachments: HBASE-16489.HBASE-14850.v1.patch, HBASE-16489.HBASE-14850.v2.patch
>
>
> Reading hbase-site.xml is required to read various properties viz. zookeeper-quorum, client retires etc.  We can either use Apache Xerces or Boost libraries.



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