hadoop-hdfs-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "James Clampffer (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (HDFS-9712) libhdfs++: Reimplement Status object as a normal struct
Date Wed, 27 Jan 2016 22:45:39 GMT

     [ https://issues.apache.org/jira/browse/HDFS-9712?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

James Clampffer updated HDFS-9712:
----------------------------------
    Attachment: HDFS-9712.HDFS-8707.000.patch

> 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
>         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
(v6.3.4#6332)

Mime
View raw message