[
https://issues.apache.org/jira/browse/HDFS-9117?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14977436#comment-14977436
]
Haohui Mai commented on HDFS-9117:
----------------------------------
Some high level comments:
1. It's beneficial to further separate the patch, such as substituting
variables, and all the TODO items to a separate jira.
2. The code should not use C++ exceptions.
3. That current interface is insufficient in terms of not every configuration
has a default value. It's useful to distinguish whether a configuration is set
or it comes from default value. It's actually used in the implementation. I
suggest taking a look at the APIs of boost property tree.
4. It's much cleaner to implement the {{final}} attribute with priority. The
configuration follow the follow rules:
* The value reads later overrides the earlier values.
* Values that are tagged as final overrides the previous value.
It essentially defines a total order which can be mapped to an integer.
5. options.h should not be changed. It follows the conventions in
https://github.com/google/leveldb/blob/master/include/leveldb/options.h
6. I suggest leaving environment substitutions and other platform-specific
functionality out (at least for now). The dominant use case of this
functionality is to replace the host name in kerberos principles. I'm skeptical
it will be used in the context of libhdfspp, and whether it can be implemented
correctly considering the goal of having minimal dependency in libhdfspp.
7. I suggest putting the code along with the libhdfs compatibility layer.
Passing the configurations only as strings will also help as a fully compatible
implementation might need to chase down the xml files in the jars, although I
don't think it is a requirement for libhdfspp.
> Config file reader / options classes for libhdfs++
> --------------------------------------------------
>
> Key: HDFS-9117
> URL: https://issues.apache.org/jira/browse/HDFS-9117
> Project: Hadoop HDFS
> Issue Type: Sub-task
> Components: hdfs-client
> Affects Versions: HDFS-8707
> Reporter: Bob Hansen
> Assignee: Bob Hansen
> Attachments: HDFS-9117.HDFS-8707.001.patch,
> HDFS-9117.HDFS-8707.002.patch, HDFS-9117.HDFS-8707.003.patch,
> HDFS-9117.HDFS-8707.004.patch, HDFS-9117.HDFS-8707.005.patch,
> HDFS-9117.HDFS-8707.006.patch, HDFS-9117.HDFS-9288.007.patch
>
>
> For environmental compatability with HDFS installations, libhdfs++ should be
> able to read the configurations from Hadoop XML files and behave in line with
> the Java implementation.
> Most notably, machine names and ports should be readable from Hadoop XML
> configuration files.
> Similarly, an internal Options architecture for libhdfs++ should be developed
> to efficiently transport the configuration information within the system.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)