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

Haohui Mai commented on HDFS-8766:
----------------------------------

Thanks for updating the patch. Some comments:

1. Remove {[hdfs.h}}, {{c_api_test.cc}} in this patch and reuse the code 
existing repo, as HDFS-9207 and HDFS-9253 have landed.
2. Remove {{hdfs_macros.h}} and use {{unique_ptr}}.
3. Separate the bug fixes in 
{{hadoop-hdfs-project/hadoop-hdfs-client/src/main/native/libhdfspp/lib/reader/remote_block_reader_impl.h}}
 into another jira.
4. Rename {{HdfsInternal::pread}} to {{HdfsInternal::Pread}} to follow the 
Google C++ styling guide.
5. Separate the implementation of the C API and the definition of 
{{HdfsInternal}} in different files.

Haven't closely looked into the logics yet -- the patch should be much smaller 
and cleaner after the above changes. Will do it in the next round.

> Implement a libhdfs(3) compatible API
> -------------------------------------
>
>                 Key: HDFS-8766
>                 URL: https://issues.apache.org/jira/browse/HDFS-8766
>             Project: Hadoop HDFS
>          Issue Type: Sub-task
>          Components: hdfs-client
>            Reporter: James Clampffer
>            Assignee: James Clampffer
>         Attachments: HDFS-8766.HDFS-8707.000.patch, 
> HDFS-8766.HDFS-8707.001.patch, HDFS-8766.HDFS-8707.002.patch, 
> HDFS-8766.HDFS-8707.003.patch, HDFS-8766.HDFS-8707.004.patch, 
> HDFS-8766.HDFS-8707.005.patch, HDFS-8766.HDFS-8707.006.patch
>
>
> Add a synchronous API that is compatible with the hdfs.h header used in 
> libhdfs and libhdfs3.  This will make it possible for projects using 
> libhdfs/libhdfs3 to relink against libhdfspp with minimal changes.
> This also provides a pure C interface that can be linked against projects 
> that aren't built in C++11 mode for various reasons but use the same 
> compiler.  It also allows many other programming languages to access 
> libhdfspp through builtin FFI interfaces.
> The libhdfs API is very similar to the posix file API which makes it easier 
> for programs built using posix filesystem calls to be modified to access HDFS.



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

Reply via email to