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

        Allen Wittenauer created issue -
        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.
        Allen Wittenauer made changes -
        Field Original Value New Value
        Attachment HDFS-632.patch [ 12423597 ]
        Allen Wittenauer made changes -
        Status Open [ 1 ] Patch Available [ 10002 ]
        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.
        Allen Wittenauer made changes -
        Project Hadoop HDFS [ 12310942 ] Hadoop Map/Reduce [ 12310941 ]
        Key HDFS-632 MAPREDUCE-1164
        Hide
        Allen Wittenauer added a comment -

        OK, fine. I'll move it.

        Show
        Allen Wittenauer added a comment - OK, fine. I'll move it.
        Allen Wittenauer made changes -
        Status Patch Available [ 10002 ] Open [ 1 ]
        Allen Wittenauer made changes -
        Status Open [ 1 ] Patch Available [ 10002 ]
        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.
        Eli Collins made changes -
        Project Hadoop Map/Reduce [ 12310941 ] Hadoop HDFS [ 12310942 ]
        Key MAPREDUCE-1164 HDFS-829
        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.
        Eli Collins made changes -
        Attachment hdfs-829.patch [ 12428015 ]
        Eli Collins made changes -
        Status Patch Available [ 10002 ] Open [ 1 ]
        Eli Collins made changes -
        Status Open [ 1 ] Patch Available [ 10002 ]
        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?
        Eli Collins made changes -
        Status Patch Available [ 10002 ] Open [ 1 ]
        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.
        Eli Collins made changes -
        Status Open [ 1 ] Patch Available [ 10002 ]
        Affects Version/s 0.21.0 [ 12314046 ]
        Affects Version/s 0.22.0 [ 12314241 ]
        Fix Version/s 0.21.0 [ 12314046 ]
        Fix Version/s 0.22.0 [ 12314241 ]
        Tom White made changes -
        Fix Version/s 0.21.0 [ 12314046 ]
        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.
        Jakob Homan made changes -
        Status Patch Available [ 10002 ] Resolved [ 5 ]
        Hadoop Flags [Reviewed]
        Assignee Allen Wittenauer [ aw ]
        Resolution Fixed [ 1 ]
        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/ )
        Konstantin Shvachko made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Patch Available Patch Available Open Open
        182d 4h 45m 3 Eli Collins 29/Apr/10 23:16
        Open Open Patch Available Patch Available
        40d 19h 54m 4 Eli Collins 29/Apr/10 23:16
        Patch Available Patch Available Resolved Resolved
        130d 20h 43m 1 Jakob Homan 07/Sep/10 20:00
        Resolved Resolved Closed Closed
        460d 11h 18m 1 Konstantin Shvachko 12/Dec/11 06:19

          People

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

            Dates

            • Created:
              Updated:
              Resolved:

              Development