[
https://issues.apache.org/jira/browse/HADOOP-622?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12497926
]
Lance Riedel commented on HADOOP-622:
-------------------------------------
For some native apps, the native library loads other dependencies that need a
system LD_LIBRARY_PATH be set, not just the following:
// Add java.library.path; necessary for native-hadoop libraries
String libraryPath = System.getProperty("java.library.path");
if (libraryPath != null) {
vargs.add("-Djava.library.path=" + libraryPath);
}
Currently the TaskRunner gets run by inheriting the parents java processes
environment, so there is no chance to change this:
private void runChild(String[] args, File dir) throws IOException {
this.process = Runtime.getRuntime().exec(args, null, dir);
NOTE: the null paramater indicates that the parent env be inherited.
Also, some of the native libraries that are untarred in the cache may be buried
in a sub dir (e.g. /path/to untarred cache/myapp/lib/native.so). This full
path isn't known until right before the TaskRunner starts, so either there
needs to be a call back, or a relative path to the native library needs to be
appended to the cache dir, and sent to the Runtime.getRuntime().exec command.
> Users should be able to change the environment in which there maps/reduces
> run.
> -------------------------------------------------------------------------------
>
> Key: HADOOP-622
> URL: https://issues.apache.org/jira/browse/HADOOP-622
> Project: Hadoop
> Issue Type: Improvement
> Components: mapred
> Reporter: Mahadev konar
> Assigned To: Owen O'Malley
> Priority: Minor
> Fix For: 0.14.0
>
>
> This would be useful with caching. So you would be avble to say, cache file X
> and then should be able to change the environment variable like
> PATH/LD_LIBRARY_PATH to include the local path hwere the file was cached.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.