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

Sudeep Sunthankar commented on HBASE-16489:
-------------------------------------------

Thanks [~enis],

# With the help of ASSERT_NO_THROW, if there is a change in the code and 
exceptions are added for those methods or statements, tests can be added for 
those exceptions. I will remove it. If required we can add it later. 
# typedef was copied from HDFS-8707, I had planned on keeping the  'using' 
directive and remove the typedef, but forgot to do the same and ended having 
both. Sorry for that.
# The build/ directory is a temporary directory where we store object files, 
shared libs and other binaries on compilation. I can change the unit tests to 
create temporary xml configuration files under build/test-data/. Also, We never 
delete from or write to /etc/hbase/conf.  It is used only for reading. Some of 
the unit tests reset the environment variable HBASE_CONF to load properties 
from the build/ directory.
# The idea behind using loader.Load(conf); was that we can use loader to load 
files from different search paths and use the same configuration object with 
the updated properties instead of using conf = loader.Load(); where a new 
object will be returned every time. For instance, we can use loader as follows:-
{code}
        Configuration conf;
        HBaseConfigurationLoader loader;

        // Load defaults
        loader.SetDefaultSearchPath();
        loader.AddDefaultResources();
        // load properties
        loader.Load(conf);

        // load custom
        loader.AddToSearchPath(CUSTOM_HBASE_CONF_PATH);
        loader.AddResources(HBASE_DEFAULT_XML);
        loader.AddResources(HBASE_SITE_XML);
        // use the same conf object to update properties
        loader.Load(conf);
{code}

> 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, HBASE-16489.HBASE-14850.v3.patch, 
> HBASE-16489.HBASE-14850.v4.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)

Reply via email to