[ https://issues.apache.org/jira/browse/HDFS-7010?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14162233#comment-14162233 ]
Haohui Mai commented on HDFS-7010: ---------------------------------- I'm agree that debugability is great to have. My concern is that the process of demanling / backtracing cannot happen reliably given we're shipping optimized library to the end user, thus it creates more problems than the problem it tries to solve: * This approach is highly platform-specific and compiler-specific. It looks to me that it only works with Linux ELF, and particularly version of c++ that implements demangling. For example, how can this functionality implemented in Windows? how does it work across different version of libstdc++? how does it work with other compilers like Clang, which implements demangling in libcxxabi? * How does backtracing work? Note that {{-fomit-frame-pointer}} is turned on when the binary is compiled with {{-O2}}. The backtrace might not work at all. * How many symobls can get in the backtrace? Note that in the end only public symbols (i.e., FileSystem / InputStream / OutputStream) are exported in the binary -- there are not many symbols in the stacktrace. What about following the common approach here, that is, making the DWARF symbols available to the developer and let the demangling happens at the developer side. I agree it's not as ideal as Java which have precise exception, but it at least gives you some debugability when shipping a well-optimized library to the end user. > boot up libhdfs3 project > ------------------------ > > Key: HDFS-7010 > URL: https://issues.apache.org/jira/browse/HDFS-7010 > Project: Hadoop HDFS > Issue Type: Sub-task > Components: hdfs-client > Reporter: Zhanwei Wang > Assignee: Colin Patrick McCabe > Attachments: HDFS-7010-pnative.003.patch, > HDFS-7010-pnative.004.patch, HDFS-7010-pnative.004.patch, HDFS-7010.patch > > > boot up libhdfs3 project with CMake, Readme and license file. > Integrate google mock and google test -- This message was sent by Atlassian JIRA (v6.3.4#6332)