Hadoop Common
  1. Hadoop Common
  2. HADOOP-6895

Native Libraries do not load if a different platform signature is returned from org.apache.hadoop.util.PlatformName

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Minor Minor
    • Resolution: Not a Problem
    • Affects Version/s: 0.20.205.0
    • Fix Version/s: None
    • Component/s: native
    • Labels:
      None
    • Environment:

      SLES 10, IBM Java 6, Hadoop 0.21.0-rc0

      Description

      bin/hadoop-config.sh has an environment variable called JAVA_PLATFORM which is set to to the results returned by org.apache.hadoop.util.PlatformName . These results are sometimes unique to the JRE being used. Although the value returned for 64 Bit Sun/Oracle Java and 64 Bit IBM Java is the same, it is different for the corresponding 32 Bit JREs.

      The issue is that the value returned is used in creating the path to the native libraries on disk, i.e $

      {HADOOP_COMMON_HOME}

      /lib/native/$

      {JAVA_PLATFORM}

      Since the path on disk is fixed with the Sun JRE value /lib/native/Linux-i386-32 it therefore fails when it attempts to load the native libraries with the value returned with 32 Bit IBM Java, /lib/native/Linux-x86-32

      1. HADOOP-6895.patch
        0.7 kB
        Stephen Watt

        Issue Links

          Activity

          Hide
          Harsh J added a comment -

          We do not any longer place the native libs under a specific arch directory, and rather just place it into the native directory itself, thereby solving this automatically. Resolving as Not A Problem.

          Show
          Harsh J added a comment - We do not any longer place the native libs under a specific arch directory, and rather just place it into the native directory itself, thereby solving this automatically. Resolving as Not A Problem.
          Hide
          Harsh J added a comment -

          Sorry to come in late.

          This looks reasonable to me too. Or should we standardize such stuff inside of PlatformName itself?

          In any case, added comments shall help greatly. Lets target this for trunk. Would you be willing to continue on this Stephen?

          Show
          Harsh J added a comment - Sorry to come in late. This looks reasonable to me too. Or should we standardize such stuff inside of PlatformName itself? In any case, added comments shall help greatly. Lets target this for trunk. Would you be willing to continue on this Stephen?
          Hide
          Hadoop QA added a comment -

          -1 overall. Here are the results of testing the latest attachment
          http://issues.apache.org/jira/secure/attachment/12451070/HADOOP-6895.patch
          against trunk revision 1071364.

          +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 (version 1.3.9) 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 passed contrib unit tests.

          +1 system test framework. The patch passed system test framework compile.

          Test results: https://hudson.apache.org/hudson/job/PreCommit-HADOOP-Build/266//testReport/
          Findbugs warnings: https://hudson.apache.org/hudson/job/PreCommit-HADOOP-Build/266//artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html
          Console output: https://hudson.apache.org/hudson/job/PreCommit-HADOOP-Build/266//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/12451070/HADOOP-6895.patch against trunk revision 1071364. +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 (version 1.3.9) 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 passed contrib unit tests. +1 system test framework. The patch passed system test framework compile. Test results: https://hudson.apache.org/hudson/job/PreCommit-HADOOP-Build/266//testReport/ Findbugs warnings: https://hudson.apache.org/hudson/job/PreCommit-HADOOP-Build/266//artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html Console output: https://hudson.apache.org/hudson/job/PreCommit-HADOOP-Build/266//console This message is automatically generated.
          Hide
          Stephen Watt added a comment -

          @Nigel Can you provide a reason as to why you removed the fix versions? I'm a bit perplexed, especially considering this already has a +1 from a committer.

          Show
          Stephen Watt added a comment - @Nigel Can you provide a reason as to why you removed the fix versions? I'm a bit perplexed, especially considering this already has a +1 from a committer.
          Hide
          Hadoop QA added a comment -

          -1 overall. Here are the results of testing the latest attachment
          http://issues.apache.org/jira/secure/attachment/12451070/HADOOP-6895.patch
          against trunk revision 1031422.

          +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 passed contrib unit tests.

          +1 system test framework. The patch passed system test framework compile.

          Test results: https://hudson.apache.org/hudson/job/PreCommit-HADOOP-Build/27//testReport/
          Findbugs warnings: https://hudson.apache.org/hudson/job/PreCommit-HADOOP-Build/27//artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html
          Console output: https://hudson.apache.org/hudson/job/PreCommit-HADOOP-Build/27//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/12451070/HADOOP-6895.patch against trunk revision 1031422. +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 passed contrib unit tests. +1 system test framework. The patch passed system test framework compile. Test results: https://hudson.apache.org/hudson/job/PreCommit-HADOOP-Build/27//testReport/ Findbugs warnings: https://hudson.apache.org/hudson/job/PreCommit-HADOOP-Build/27//artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html Console output: https://hudson.apache.org/hudson/job/PreCommit-HADOOP-Build/27//console This message is automatically generated.
          Hide
          Tom White added a comment -

          +1 looks good to me. It's worth adding a comment in the file which explains why this is needed. Same for HADOOP-6923.

          Show
          Tom White added a comment - +1 looks good to me. It's worth adding a comment in the file which explains why this is needed. Same for HADOOP-6923 .
          Hide
          Stephen Watt added a comment -

          There is a JRE security library exception being thrown when attempting to format the namenode or starting Hadoop and using IBM Java as the JRE. This makes the patch hard to validate when testing with IBM Java. I'll write up a JIRA ticket for the security issue and link it to this one as a dependency.

          Show
          Stephen Watt added a comment - There is a JRE security library exception being thrown when attempting to format the namenode or starting Hadoop and using IBM Java as the JRE. This makes the patch hard to validate when testing with IBM Java. I'll write up a JIRA ticket for the security issue and link it to this one as a dependency.
          Hide
          Hadoop QA added a comment -

          -1 overall. Here are the results of testing the latest attachment
          http://issues.apache.org/jira/secure/attachment/12451070/HADOOP-6895.patch
          against trunk revision 980953.

          +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 appears to have generated 1 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 passed contrib unit tests.

          Test results: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch-h4.grid.sp2.yahoo.net/658/testReport/
          Findbugs warnings: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch-h4.grid.sp2.yahoo.net/658/artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html
          Checkstyle results: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch-h4.grid.sp2.yahoo.net/658/artifact/trunk/build/test/checkstyle-errors.html
          Console output: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch-h4.grid.sp2.yahoo.net/658/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/12451070/HADOOP-6895.patch against trunk revision 980953. +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 appears to have generated 1 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 passed contrib unit tests. Test results: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch-h4.grid.sp2.yahoo.net/658/testReport/ Findbugs warnings: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch-h4.grid.sp2.yahoo.net/658/artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html Checkstyle results: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch-h4.grid.sp2.yahoo.net/658/artifact/trunk/build/test/checkstyle-errors.html Console output: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch-h4.grid.sp2.yahoo.net/658/console This message is automatically generated.
          Hide
          Stephen Watt added a comment -

          Since the native libraries work regardless of JRE, I am applying a simple patch that checks for the IBM 32 JRE Signature and if found sets the JAVA_PLATFORM variable to the Oracle/Sun Signature.

          Show
          Stephen Watt added a comment - Since the native libraries work regardless of JRE, I am applying a simple patch that checks for the IBM 32 JRE Signature and if found sets the JAVA_PLATFORM variable to the Oracle/Sun Signature.

            People

            • Assignee:
              Unassigned
              Reporter:
              Stephen Watt
            • Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development