[
https://issues.apache.org/jira/browse/HDFS-8766?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
James Clampffer updated HDFS-8766:
----------------------------------
Attachment: HDFS-8766.HDFS-8707.002.patch
Thanks for the review Haohui, this patch should address all but one of your
concerns.
For now I'd really like to avoid shared_ptr and unique_ptr until I move the
stress tests from github to this for HDFS-8790. I wouldn't be surprised if
some bugs shake out when running large stress tests so I'd like to make things
easier to debug using the pointer invalidation macro. I could implement the
same functionality with a smart_ptr+custom deleter but that adds a several
extra stack frames to step through while debugging. I agree that hdfs_internal
should own the IoService and the hdfsFile_internal should own the InputStream
and can loop back and add unique_ptrs after HDFS-8790.
> 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
>
>
> 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)