[jira] [Commented] (HADOOP-9205) Java7: path to native libraries should be passed to tests via -Djava.library.path rather than env.LD_LIBRARY_PATH

2013-01-15 Thread Ivan A. Veselovsky (JIRA)

[ 
https://issues.apache.org/jira/browse/HADOOP-9205?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13553707#comment-13553707
 ] 

Ivan A. Veselovsky commented on HADOOP-9205:


Shortest way to reproduce the issue:
Run test org.apache.hadoop.util.TestNativeCodeLoader with 
-Drequire.test.libhadoop=true and 
env variable 
LD_LIBRARY_PATH=.../hadoop-common/hadoop-common-project/hadoop-common/target/native/target/usr/local/lib
If you're running on Java 1.6, the test passes.
If you're running on Java 1.7, the test fails.
If we add parameter
-Djava.library.path=.../hadoop-common/hadoop-common-project/hadoop-common/target/native/target/usr/local/lib
 , the test passes on both 1.6 and 1.7.

This is reproducible with Oracle's JDK jdk1.7.0_07, jdk1.7.0_10, but is *not* 
reproducible with jdk1.7.0_05, so Kihwall's observation regarding 1.7.0_05 is 
correct.

 Java7: path to native libraries should be passed to tests via 
 -Djava.library.path rather than env.LD_LIBRARY_PATH
 -

 Key: HADOOP-9205
 URL: https://issues.apache.org/jira/browse/HADOOP-9205
 Project: Hadoop Common
  Issue Type: Bug
Affects Versions: 3.0.0, 2.0.3-alpha, 0.23.6
Reporter: Ivan A. Veselovsky
Assignee: Ivan A. Veselovsky
 Attachments: HADOOP-9205.patch


 Currently the path to native libraries is passed to unit tests via 
 environment variable LD_LIBRARTY_PATH. This is okay for Java6, but does not 
 work for Java7, since Java7 ignores this environment variable.
 So, to run the tests with native implementation on Java7 one needs to pass 
 the paths to native libs via -Djava.library.path system property rather than 
 the LD_LIBRARY_PATH env variable.
 The suggested patch fixes the problem via setting the paths to native libs 
 using both LD_LIBRARY_PATH and -Djava.library.path property. This way the 
 tests work equally on both Java6 and Java7.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Commented] (HADOOP-9205) Java7: path to native libraries should be passed to tests via -Djava.library.path rather than env.LD_LIBRARY_PATH

2013-01-15 Thread Thomas Graves (JIRA)

[ 
https://issues.apache.org/jira/browse/HADOOP-9205?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13553909#comment-13553909
 ] 

Thomas Graves commented on HADOOP-9205:
---

I ran a quick job using jdk1.7.0_10 and it loads the native libraries fine. 
This was using jdk1.7.0_10 for execution, jars were still built with jdk1.6.

Also I tried to reproduce with method you stated.  On trunk I wasn't able to 
reproduce.  Note I built all source code with jdk1.7.0_10 and then ran the 
test.  I did have to create a symlink from 
hadoop-common-project/hadoop-common/target/native/target/usr/local/lib/libhadoop.so
 to 
hadoop-common-project/hadoop-common/target/native/target/usr/local/lib/libhadoop.so.1.0.0.
 

I'm not sure what happened to libhadoop.so I'll have to investigate.  I need to 
look at the jdk release notes in more detail but at a glance it says Java 
applications invoking JDK 7 from a legacy JDK must be careful to clean up the 
LD_LIBRARY_PATH environment variable before executing JDK 7 which makes me 
wonder if it applies. 

 Java7: path to native libraries should be passed to tests via 
 -Djava.library.path rather than env.LD_LIBRARY_PATH
 -

 Key: HADOOP-9205
 URL: https://issues.apache.org/jira/browse/HADOOP-9205
 Project: Hadoop Common
  Issue Type: Bug
Affects Versions: 3.0.0, 2.0.3-alpha, 0.23.6
Reporter: Ivan A. Veselovsky
Assignee: Ivan A. Veselovsky
 Attachments: HADOOP-9205.patch


 Currently the path to native libraries is passed to unit tests via 
 environment variable LD_LIBRARTY_PATH. This is okay for Java6, but does not 
 work for Java7, since Java7 ignores this environment variable.
 So, to run the tests with native implementation on Java7 one needs to pass 
 the paths to native libs via -Djava.library.path system property rather than 
 the LD_LIBRARY_PATH env variable.
 The suggested patch fixes the problem via setting the paths to native libs 
 using both LD_LIBRARY_PATH and -Djava.library.path property. This way the 
 tests work equally on both Java6 and Java7.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Commented] (HADOOP-9205) Java7: path to native libraries should be passed to tests via -Djava.library.path rather than env.LD_LIBRARY_PATH

2013-01-15 Thread Kihwal Lee (JIRA)

[ 
https://issues.apache.org/jira/browse/HADOOP-9205?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13553958#comment-13553958
 ] 

Kihwal Lee commented on HADOOP-9205:


I tried with jdk 1.7.0_11 but could not reproduce the issue. May be your 
run-time env has something different from ours. I don't have anything special: 
Fedora 17 x86_64, freshly downloaded Oracle jdk 7u11. JAVA_HOME was set 
accordingly. maven 3.0.4 and maven --version shows the right java info. My 
run-time env does not have LD_LIBRARY_PATH or JAVA_LIBRARY_PATH set. No hadoop 
specific settings either.

 Java7: path to native libraries should be passed to tests via 
 -Djava.library.path rather than env.LD_LIBRARY_PATH
 -

 Key: HADOOP-9205
 URL: https://issues.apache.org/jira/browse/HADOOP-9205
 Project: Hadoop Common
  Issue Type: Bug
Affects Versions: 3.0.0, 2.0.3-alpha, 0.23.6
Reporter: Ivan A. Veselovsky
Assignee: Ivan A. Veselovsky
 Attachments: HADOOP-9205.patch


 Currently the path to native libraries is passed to unit tests via 
 environment variable LD_LIBRARTY_PATH. This is okay for Java6, but does not 
 work for Java7, since Java7 ignores this environment variable.
 So, to run the tests with native implementation on Java7 one needs to pass 
 the paths to native libs via -Djava.library.path system property rather than 
 the LD_LIBRARY_PATH env variable.
 The suggested patch fixes the problem via setting the paths to native libs 
 using both LD_LIBRARY_PATH and -Djava.library.path property. This way the 
 tests work equally on both Java6 and Java7.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Commented] (HADOOP-9205) Java7: path to native libraries should be passed to tests via -Djava.library.path rather than env.LD_LIBRARY_PATH

2013-01-15 Thread Ivan A. Veselovsky (JIRA)

[ 
https://issues.apache.org/jira/browse/HADOOP-9205?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13553960#comment-13553960
 ] 

Ivan A. Veselovsky commented on HADOOP-9205:


Hi, Thomas, 
can you please provide more detail on your environment: what OS did you use?
I experimented on CentOS release 6.3 (Final) and Ubuntu precise (12.04.1 
LTS).

BTW, the problem with missing symlink libhadoop.so - libhadoop.so.1.0.0 can be 
avoided in you install cmake utility of version = 2.8. On CentOS systems 
this version is installed as a separate package named cmake28, and 
corresponding executable is /usr/bin/cmake28. We create symlink cmake - 
cmake28, and after that the problem goes away.



 Java7: path to native libraries should be passed to tests via 
 -Djava.library.path rather than env.LD_LIBRARY_PATH
 -

 Key: HADOOP-9205
 URL: https://issues.apache.org/jira/browse/HADOOP-9205
 Project: Hadoop Common
  Issue Type: Bug
Affects Versions: 3.0.0, 2.0.3-alpha, 0.23.6
Reporter: Ivan A. Veselovsky
Assignee: Ivan A. Veselovsky
 Attachments: HADOOP-9205.patch


 Currently the path to native libraries is passed to unit tests via 
 environment variable LD_LIBRARTY_PATH. This is okay for Java6, but does not 
 work for Java7, since Java7 ignores this environment variable.
 So, to run the tests with native implementation on Java7 one needs to pass 
 the paths to native libs via -Djava.library.path system property rather than 
 the LD_LIBRARY_PATH env variable.
 The suggested patch fixes the problem via setting the paths to native libs 
 using both LD_LIBRARY_PATH and -Djava.library.path property. This way the 
 tests work equally on both Java6 and Java7.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Commented] (HADOOP-9205) Java7: path to native libraries should be passed to tests via -Djava.library.path rather than env.LD_LIBRARY_PATH

2013-01-15 Thread Surenkumar Nihalani (JIRA)

[ 
https://issues.apache.org/jira/browse/HADOOP-9205?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13553966#comment-13553966
 ] 

Surenkumar Nihalani commented on HADOOP-9205:
-

I think we should share our output from {{env}} in a pastie to solve this 
better.

 Java7: path to native libraries should be passed to tests via 
 -Djava.library.path rather than env.LD_LIBRARY_PATH
 -

 Key: HADOOP-9205
 URL: https://issues.apache.org/jira/browse/HADOOP-9205
 Project: Hadoop Common
  Issue Type: Bug
Affects Versions: 3.0.0, 2.0.3-alpha, 0.23.6
Reporter: Ivan A. Veselovsky
Assignee: Ivan A. Veselovsky
 Attachments: HADOOP-9205.patch


 Currently the path to native libraries is passed to unit tests via 
 environment variable LD_LIBRARTY_PATH. This is okay for Java6, but does not 
 work for Java7, since Java7 ignores this environment variable.
 So, to run the tests with native implementation on Java7 one needs to pass 
 the paths to native libs via -Djava.library.path system property rather than 
 the LD_LIBRARY_PATH env variable.
 The suggested patch fixes the problem via setting the paths to native libs 
 using both LD_LIBRARY_PATH and -Djava.library.path property. This way the 
 tests work equally on both Java6 and Java7.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Commented] (HADOOP-9205) Java7: path to native libraries should be passed to tests via -Djava.library.path rather than env.LD_LIBRARY_PATH

2013-01-15 Thread Thomas Graves (JIRA)

[ 
https://issues.apache.org/jira/browse/HADOOP-9205?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13553993#comment-13553993
 ] 

Thomas Graves commented on HADOOP-9205:
---

I'm running on rhel5.6 with maven 3.0.3 and cmake version 2.6-patch 4. 

 Java7: path to native libraries should be passed to tests via 
 -Djava.library.path rather than env.LD_LIBRARY_PATH
 -

 Key: HADOOP-9205
 URL: https://issues.apache.org/jira/browse/HADOOP-9205
 Project: Hadoop Common
  Issue Type: Bug
Affects Versions: 3.0.0, 2.0.3-alpha, 0.23.6
Reporter: Ivan A. Veselovsky
Assignee: Ivan A. Veselovsky
 Attachments: HADOOP-9205.patch


 Currently the path to native libraries is passed to unit tests via 
 environment variable LD_LIBRARTY_PATH. This is okay for Java6, but does not 
 work for Java7, since Java7 ignores this environment variable.
 So, to run the tests with native implementation on Java7 one needs to pass 
 the paths to native libs via -Djava.library.path system property rather than 
 the LD_LIBRARY_PATH env variable.
 The suggested patch fixes the problem via setting the paths to native libs 
 using both LD_LIBRARY_PATH and -Djava.library.path property. This way the 
 tests work equally on both Java6 and Java7.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Commented] (HADOOP-9205) Java7: path to native libraries should be passed to tests via -Djava.library.path rather than env.LD_LIBRARY_PATH

2013-01-14 Thread Hadoop QA (JIRA)

[ 
https://issues.apache.org/jira/browse/HADOOP-9205?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13552620#comment-13552620
 ] 

Hadoop QA commented on HADOOP-9205:
---

{color:red}-1 overall{color}.  Here are the results of testing the latest 
attachment 
  http://issues.apache.org/jira/secure/attachment/12564693/HADOOP-9205.patch
  against trunk revision .

{color:green}+1 @author{color}.  The patch does not contain any @author 
tags.

{color:red}-1 tests included{color}.  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.

{color:green}+1 javac{color}.  The applied patch does not increase the 
total number of javac compiler warnings.

{color:green}+1 javadoc{color}.  The javadoc tool did not generate any 
warning messages.

{color:green}+1 eclipse:eclipse{color}.  The patch built with 
eclipse:eclipse.

{color:green}+1 findbugs{color}.  The patch does not introduce any new 
Findbugs (version 1.3.9) warnings.

{color:green}+1 release audit{color}.  The applied patch does not increase 
the total number of release audit warnings.

{color:green}+1 core tests{color}.  The patch passed unit tests in .

{color:green}+1 contrib tests{color}.  The patch passed contrib unit tests.

Test results: 
https://builds.apache.org/job/PreCommit-HADOOP-Build/2037//testReport/
Console output: 
https://builds.apache.org/job/PreCommit-HADOOP-Build/2037//console

This message is automatically generated.

 Java7: path to native libraries should be passed to tests via 
 -Djava.library.path rather than env.LD_LIBRARY_PATH
 -

 Key: HADOOP-9205
 URL: https://issues.apache.org/jira/browse/HADOOP-9205
 Project: Hadoop Common
  Issue Type: Bug
Affects Versions: 3.0.0, 2.0.3-alpha, 0.23.6
Reporter: Ivan A. Veselovsky
Assignee: Ivan A. Veselovsky
 Attachments: HADOOP-9205.patch


 Currently the path to native libraries is passed to unit tests via 
 environment variable LD_LIBRARTY_PATH. This is okay for Java6, but does not 
 work for Java7, since Java7 ignores this environment variable.
 So, to run the tests with native implementation on Java7 one needs to pass 
 the paths to native libs via -Djava.library.path system property rather than 
 the LD_LIBRARY_PATH env variable.
 The suggested patch fixes the problem via setting the paths to native libs 
 using both LD_LIBRARY_PATH and -Djava.library.path property. This way the 
 tests work equally on both Java6 and Java7.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Commented] (HADOOP-9205) Java7: path to native libraries should be passed to tests via -Djava.library.path rather than env.LD_LIBRARY_PATH

2013-01-14 Thread Kihwal Lee (JIRA)

[ 
https://issues.apache.org/jira/browse/HADOOP-9205?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13552822#comment-13552822
 ] 

Kihwal Lee commented on HADOOP-9205:


Would you elaborate what is failing and how? We run oracle/sun java 1.7.0_05 
and JNI libraries are loading fine with only LD_LIBRARY_PATH set. Which jdk are 
you using?

 Java7: path to native libraries should be passed to tests via 
 -Djava.library.path rather than env.LD_LIBRARY_PATH
 -

 Key: HADOOP-9205
 URL: https://issues.apache.org/jira/browse/HADOOP-9205
 Project: Hadoop Common
  Issue Type: Bug
Affects Versions: 3.0.0, 2.0.3-alpha, 0.23.6
Reporter: Ivan A. Veselovsky
Assignee: Ivan A. Veselovsky
 Attachments: HADOOP-9205.patch


 Currently the path to native libraries is passed to unit tests via 
 environment variable LD_LIBRARTY_PATH. This is okay for Java6, but does not 
 work for Java7, since Java7 ignores this environment variable.
 So, to run the tests with native implementation on Java7 one needs to pass 
 the paths to native libs via -Djava.library.path system property rather than 
 the LD_LIBRARY_PATH env variable.
 The suggested patch fixes the problem via setting the paths to native libs 
 using both LD_LIBRARY_PATH and -Djava.library.path property. This way the 
 tests work equally on both Java6 and Java7.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Commented] (HADOOP-9205) Java7: path to native libraries should be passed to tests via -Djava.library.path rather than env.LD_LIBRARY_PATH

2013-01-14 Thread Ivan A. Veselovsky (JIRA)

[ 
https://issues.apache.org/jira/browse/HADOOP-9205?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13553038#comment-13553038
 ] 

Ivan A. Veselovsky commented on HADOOP-9205:


I observed the problem with Oracle's JDK 1.7.0_10.
The tests are not failing, they just use Java implementation instead of the 
native one, even if -Pnative profile is enabled.
Links that seem to be relevant there are:
http://www.oracle.com/technetwork/java/javase/jdk7-relnotes-418459.html
https://blogs.oracle.com/darcy/entry/purging_ld_library_path
I will investigate if the problem is reproducible with J1.7.0_05.

 Java7: path to native libraries should be passed to tests via 
 -Djava.library.path rather than env.LD_LIBRARY_PATH
 -

 Key: HADOOP-9205
 URL: https://issues.apache.org/jira/browse/HADOOP-9205
 Project: Hadoop Common
  Issue Type: Bug
Affects Versions: 3.0.0, 2.0.3-alpha, 0.23.6
Reporter: Ivan A. Veselovsky
Assignee: Ivan A. Veselovsky
 Attachments: HADOOP-9205.patch


 Currently the path to native libraries is passed to unit tests via 
 environment variable LD_LIBRARTY_PATH. This is okay for Java6, but does not 
 work for Java7, since Java7 ignores this environment variable.
 So, to run the tests with native implementation on Java7 one needs to pass 
 the paths to native libs via -Djava.library.path system property rather than 
 the LD_LIBRARY_PATH env variable.
 The suggested patch fixes the problem via setting the paths to native libs 
 using both LD_LIBRARY_PATH and -Djava.library.path property. This way the 
 tests work equally on both Java6 and Java7.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira