Hadoop HDFS
  1. Hadoop HDFS
  2. HDFS-829

hdfsJniHelper.c: #include <error.h> is not portable

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 0.21.0, 0.22.0
    • Fix Version/s: 0.22.0
    • Component/s: None
    • Labels:
      None
    • Hadoop Flags:
      Reviewed

      Description

      hdfsJniHelper.c includes <error.h> but this appears to be unnecessary, since even under Linux none of the routines that are prototyped are used. Worse yet, error.h doesn't appear to be a standard header file so this breaks on Mac OS X and Solaris and prevents libhdfs from being built.

      1. HDFS-632.patch
        0.4 kB
        Allen Wittenauer
      2. hdfs-829.patch
        0.4 kB
        Eli Collins

        Activity

        Hide
        Allen Wittenauer added a comment -

        Removes error.h from hdfsJniHelper.c, which doesn't appear to be necessary and breaks compatibility on several operating systems.

        Show
        Allen Wittenauer added a comment - Removes error.h from hdfsJniHelper.c, which doesn't appear to be necessary and breaks compatibility on several operating systems.
        Hide
        Allen Wittenauer added a comment -

        (this should probably be in MapReduce, since that is where the code is at. Very confusing.)

        Show
        Allen Wittenauer added a comment - (this should probably be in MapReduce, since that is where the code is at. Very confusing.)
        Hide
        Hadoop QA added a comment -

        -1 overall. Here are the results of testing the latest attachment
        http://issues.apache.org/jira/secure/attachment/12423597/HDFS-632.patch
        against trunk revision 830804.

        +1 @author. The patch does not contain any @author tags.

        -1 tests included. The patch doesn't appear to include any new or modified tests.
        Please justify why no new tests are needed for this patch.
        Also please list what manual steps were performed to verify this patch.

        -1 patch. The patch command could not apply the patch.

        Console output: http://hudson.zones.apache.org/hudson/job/Hdfs-Patch-h5.grid.sp2.yahoo.net/89/console

        This message is automatically generated.

        Show
        Hadoop QA added a comment - -1 overall. Here are the results of testing the latest attachment http://issues.apache.org/jira/secure/attachment/12423597/HDFS-632.patch against trunk revision 830804. +1 @author. The patch does not contain any @author tags. -1 tests included. The patch doesn't appear to include any new or modified tests. Please justify why no new tests are needed for this patch. Also please list what manual steps were performed to verify this patch. -1 patch. The patch command could not apply the patch. Console output: http://hudson.zones.apache.org/hudson/job/Hdfs-Patch-h5.grid.sp2.yahoo.net/89/console This message is automatically generated.
        Hide
        Allen Wittenauer added a comment -

        OK, fine. I'll move it.

        Show
        Allen Wittenauer added a comment - OK, fine. I'll move it.
        Hide
        Hadoop QA added a comment -

        -1 overall. Here are the results of testing the latest attachment
        http://issues.apache.org/jira/secure/attachment/12423597/HDFS-632.patch
        against trunk revision 831037.

        +1 @author. The patch does not contain any @author tags.

        -1 tests included. The patch doesn't appear to include any new or modified tests.
        Please justify why no new tests are needed for this patch.
        Also please list what manual steps were performed to verify this patch.

        +1 javadoc. The javadoc tool did not generate any warning messages.

        +1 javac. The applied patch does not increase the total number of javac compiler warnings.

        +1 findbugs. The patch does not introduce any new Findbugs warnings.

        +1 release audit. The applied patch does not increase the total number of release audit warnings.

        +1 core tests. The patch passed core unit tests.

        -1 contrib tests. The patch failed contrib unit tests.

        Test results: http://hudson.zones.apache.org/hudson/job/Mapreduce-Patch-h3.grid.sp2.yahoo.net/107/testReport/
        Findbugs warnings: http://hudson.zones.apache.org/hudson/job/Mapreduce-Patch-h3.grid.sp2.yahoo.net/107/artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html
        Checkstyle results: http://hudson.zones.apache.org/hudson/job/Mapreduce-Patch-h3.grid.sp2.yahoo.net/107/artifact/trunk/build/test/checkstyle-errors.html
        Console output: http://hudson.zones.apache.org/hudson/job/Mapreduce-Patch-h3.grid.sp2.yahoo.net/107/console

        This message is automatically generated.

        Show
        Hadoop QA added a comment - -1 overall. Here are the results of testing the latest attachment http://issues.apache.org/jira/secure/attachment/12423597/HDFS-632.patch against trunk revision 831037. +1 @author. The patch does not contain any @author tags. -1 tests included. The patch doesn't appear to include any new or modified tests. Please justify why no new tests are needed for this patch. Also please list what manual steps were performed to verify this patch. +1 javadoc. The javadoc tool did not generate any warning messages. +1 javac. The applied patch does not increase the total number of javac compiler warnings. +1 findbugs. The patch does not introduce any new Findbugs warnings. +1 release audit. The applied patch does not increase the total number of release audit warnings. +1 core tests. The patch passed core unit tests. -1 contrib tests. The patch failed contrib unit tests. Test results: http://hudson.zones.apache.org/hudson/job/Mapreduce-Patch-h3.grid.sp2.yahoo.net/107/testReport/ Findbugs warnings: http://hudson.zones.apache.org/hudson/job/Mapreduce-Patch-h3.grid.sp2.yahoo.net/107/artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html Checkstyle results: http://hudson.zones.apache.org/hudson/job/Mapreduce-Patch-h3.grid.sp2.yahoo.net/107/artifact/trunk/build/test/checkstyle-errors.html Console output: http://hudson.zones.apache.org/hudson/job/Mapreduce-Patch-h3.grid.sp2.yahoo.net/107/console This message is automatically generated.
        Hide
        Allen Wittenauer added a comment -

        This failed due to the flaky gridmix test i think.

        Show
        Allen Wittenauer added a comment - This failed due to the flaky gridmix test i think.
        Hide
        Eli Collins added a comment -

        Looks good. libhdfs doesn't need to include error.h. Uploaded a patch that applies against trunk (libhdfs was moved to hdfs). Thanks Allen.

        Show
        Eli Collins added a comment - Looks good. libhdfs doesn't need to include error.h. Uploaded a patch that applies against trunk (libhdfs was moved to hdfs). Thanks Allen.
        Hide
        Hadoop QA added a comment -

        -1 overall. Here are the results of testing the latest attachment
        http://issues.apache.org/jira/secure/attachment/12428015/hdfs-829.patch
        against trunk revision 890655.

        +1 @author. The patch does not contain any @author tags.

        -1 tests included. The patch doesn't appear to include any new or modified tests.
        Please justify why no new tests are needed for this patch.
        Also please list what manual steps were performed to verify this patch.

        +1 javadoc. The javadoc tool did not generate any warning messages.

        +1 javac. The applied patch does not increase the total number of javac compiler warnings.

        +1 findbugs. The patch does not introduce any new Findbugs warnings.

        +1 release audit. The applied patch does not increase the total number of release audit warnings.

        -1 core tests. The patch failed core unit tests.

        +1 contrib tests. The patch passed contrib unit tests.

        Test results: http://hudson.zones.apache.org/hudson/job/Hdfs-Patch-h2.grid.sp2.yahoo.net/84/testReport/
        Findbugs warnings: http://hudson.zones.apache.org/hudson/job/Hdfs-Patch-h2.grid.sp2.yahoo.net/84/artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html
        Checkstyle results: http://hudson.zones.apache.org/hudson/job/Hdfs-Patch-h2.grid.sp2.yahoo.net/84/artifact/trunk/build/test/checkstyle-errors.html
        Console output: http://hudson.zones.apache.org/hudson/job/Hdfs-Patch-h2.grid.sp2.yahoo.net/84/console

        This message is automatically generated.

        Show
        Hadoop QA added a comment - -1 overall. Here are the results of testing the latest attachment http://issues.apache.org/jira/secure/attachment/12428015/hdfs-829.patch against trunk revision 890655. +1 @author. The patch does not contain any @author tags. -1 tests included. The patch doesn't appear to include any new or modified tests. Please justify why no new tests are needed for this patch. Also please list what manual steps were performed to verify this patch. +1 javadoc. The javadoc tool did not generate any warning messages. +1 javac. The applied patch does not increase the total number of javac compiler warnings. +1 findbugs. The patch does not introduce any new Findbugs warnings. +1 release audit. The applied patch does not increase the total number of release audit warnings. -1 core tests. The patch failed core unit tests. +1 contrib tests. The patch passed contrib unit tests. Test results: http://hudson.zones.apache.org/hudson/job/Hdfs-Patch-h2.grid.sp2.yahoo.net/84/testReport/ Findbugs warnings: http://hudson.zones.apache.org/hudson/job/Hdfs-Patch-h2.grid.sp2.yahoo.net/84/artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html Checkstyle results: http://hudson.zones.apache.org/hudson/job/Hdfs-Patch-h2.grid.sp2.yahoo.net/84/artifact/trunk/build/test/checkstyle-errors.html Console output: http://hudson.zones.apache.org/hudson/job/Hdfs-Patch-h2.grid.sp2.yahoo.net/84/console This message is automatically generated.
        Hide
        Eli Collins added a comment -

        The core test failures below are unrelated to this patch.

        >>> org.apache.hadoop.hdfs.TestDefaultNameNodePort.testGetAddressFromConf
        >>> <init>.org.apache.hadoop.hdfs.server.namenode.TestReplicationPolicy

        Show
        Eli Collins added a comment - The core test failures below are unrelated to this patch. >>> org.apache.hadoop.hdfs.TestDefaultNameNodePort.testGetAddressFromConf >>> <init>.org.apache.hadoop.hdfs.server.namenode.TestReplicationPolicy
        Hide
        Chris Douglas added a comment -

        This should ideally be applied to 0.21 and 0.20 also, but HDFS-712 was not committed to 0.21 so libhdfs is still in the MAPREDUCE subproject. While this fix could be applied to the mapreduce subtree, it would be cleaner if it could be applied in the correct project.

        Show
        Chris Douglas added a comment - This should ideally be applied to 0.21 and 0.20 also, but HDFS-712 was not committed to 0.21 so libhdfs is still in the MAPREDUCE subproject. While this fix could be applied to the mapreduce subtree, it would be cleaner if it could be applied in the correct project.
        Hide
        Allen Wittenauer added a comment -

        It looks like libhdfs is in the hdfs tree in trunk. So this can get committed now, right? Can we get this in prior to the 0.21 cut over?

        Show
        Allen Wittenauer added a comment - It looks like libhdfs is in the hdfs tree in trunk. So this can get committed now, right? Can we get this in prior to the 0.21 cut over?
        Hide
        Eli Collins added a comment -

        +1 Looks good to me for 21.

        Show
        Eli Collins added a comment - +1 Looks good to me for 21.
        Hide
        Jakob Homan added a comment -

        1. I verified that this patch allows libhdfs to compile on OSX (although build was still not successful, I had to manually chmod +x on ./src/c+/libhdfs/install-sh to get a full build. We should open a JIRA for this). I've committed this. Resolving as fixed. Thanks, Allen.

        Show
        Jakob Homan added a comment - 1. I verified that this patch allows libhdfs to compile on OSX (although build was still not successful, I had to manually chmod +x on ./src/c +/libhdfs/install-sh to get a full build. We should open a JIRA for this). I've committed this. Resolving as fixed. Thanks, Allen.
        Hide
        Hudson added a comment -

        Integrated in Hadoop-Hdfs-trunk-Commit #383 (See https://hudson.apache.org/hudson/job/Hadoop-Hdfs-trunk-Commit/383/)

        Show
        Hudson added a comment - Integrated in Hadoop-Hdfs-trunk-Commit #383 (See https://hudson.apache.org/hudson/job/Hadoop-Hdfs-trunk-Commit/383/ )

          People

          • Assignee:
            Allen Wittenauer
            Reporter:
            Allen Wittenauer
          • Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development