Uploaded image for project: 'Hadoop HDFS'
  1. Hadoop HDFS
  2. HDFS-8707 Implement an async pure c++ HDFS client
  3. HDFS-9712

libhdfs++: Reimplement Status object as a normal struct

    XMLWordPrintableJSON

Details

    • Sub-task
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • None
    • hdfs-client
    • None

    Description

      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:

      class Status {
        int code;
        std::string msg;
      }
      

      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.

      Attachments

        1. HDFS-9712.HDFS-8707.000.patch
          6 kB
          James Clampffer

        Activity

          People

            James Clampffer James Clampffer
            James Clampffer James Clampffer
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: