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

Hudson commented on HDFS-9712:
------------------------------

SUCCESS: Integrated in Jenkins build Hadoop-trunk-Commit #13869 (See 
[https://builds.apache.org/job/Hadoop-trunk-Commit/13869/])
HDFS-9712. libhdfs++: Reimplement Status object as a normal struct 
(james.clampffer: rev 7e946c7e3021c7cf33023c12dc89c00e46b6409d)
* (edit) 
hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/include/hdfspp/status.h
* (edit) 
hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/lib/common/status.cc


> libhdfs++: Reimplement Status object as a normal struct
> -------------------------------------------------------
>
>                 Key: HDFS-9712
>                 URL: https://issues.apache.org/jira/browse/HDFS-9712
>             Project: Hadoop HDFS
>          Issue Type: Sub-task
>          Components: hdfs-client
>            Reporter: James Clampffer
>            Assignee: James Clampffer
>            Priority: Major
>         Attachments: HDFS-9712.HDFS-8707.000.patch
>
>
> hdfs::Status is doing all sorts of reinterpret casts on a block of memory 
> referenced by a char *.  Using a char *, casting to a wider type, and 
> dereferencing can cause fun alignment issues.
> As far as I can tell that data layout in status can be boiled down to:
> {code}
> class Status {
>   int code;
>   std::string msg;
> }
> {code}
> This avoids doing manual memcopies in the copy ctor and delete[]s in the 
> dtor.  It will also get rid of boilerplate null checks and casts.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to