Details

    • Type: Improvement Improvement
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Duplicate
    • Affects Version/s: 3.0.0, 2.2.0
    • Fix Version/s: None
    • Component/s: libhdfs
    • Labels:
      None

      Description

      Currently, the libhdfs codebase does not compile on Windows due to use of several Linux-specific functions, lack of build script support, and use of C99 constructs. The scope of this issue includes converting those function calls to cross-platform equivalents (or use #ifdef if necessary), setting up build support, and some code clean-ups to follow the C89 rules.

        Issue Links

          Activity

          Hide
          Allen Wittenauer added a comment -

          Closing this one in favor of HDFS-573.

          Show
          Allen Wittenauer added a comment - Closing this one in favor of HDFS-573 .
          Hide
          Chris Nauroth added a comment -

          I would prefer putting the Windows or Linux specific parts in separate files, rather than using #ifdefs, if possible.

          I agree with this in principle, and I would have preferred this pattern in libhadoop.so/hadoop.dll too. However, I seem to recall there was disagreement on this a while ago. Does anyone else have an opinion?

          ...hash table...

          Agreed that the details of this are open for consideration, rather than locked down on choosing uthash. In fact, Stephen told me he encountered a compilation error in uthash on HP-UX, so perhaps it's not as cross-platform as we thought.

          Show
          Chris Nauroth added a comment - I would prefer putting the Windows or Linux specific parts in separate files, rather than using #ifdefs, if possible. I agree with this in principle, and I would have preferred this pattern in libhadoop.so/hadoop.dll too. However, I seem to recall there was disagreement on this a while ago. Does anyone else have an opinion? ...hash table... Agreed that the details of this are open for consideration, rather than locked down on choosing uthash. In fact, Stephen told me he encountered a compilation error in uthash on HP-UX, so perhaps it's not as cross-platform as we thought.
          Hide
          Colin Patrick McCabe added a comment -

          I would prefer putting the Windows or Linux specific parts in separate files, rather than using #ifdefs, if possible.

          I agree that we should probably get rid of the C99 stuff like declaring variables in places other than the start of a block.

          There was a suggestion to use a library like uthash rather than the glibc hash table functions, since Windows doesn't have those. That could be a good idea. Alternately, we could just create our own hash table, since that is just not a very complex data structure. Having a statically sized hash table would probably be ok, since we should know roughly how many entries it should have based on looking at the code.

          Show
          Colin Patrick McCabe added a comment - I would prefer putting the Windows or Linux specific parts in separate files, rather than using #ifdefs, if possible. I agree that we should probably get rid of the C99 stuff like declaring variables in places other than the start of a block. There was a suggestion to use a library like uthash rather than the glibc hash table functions, since Windows doesn't have those. That could be a good idea. Alternately, we could just create our own hash table, since that is just not a very complex data structure. Having a statically sized hash table would probably be ok, since we should know roughly how many entries it should have based on looking at the code.

            People

            • Assignee:
              Unassigned
              Reporter:
              Chris Nauroth
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development