Btw, you can also set a global JAVA_LIBRARY_PATH env-var containing your paths, and YARN will pick it up.
On Wed, Sep 12, 2012 at 9:16 AM, Harsh J <ha...@cloudera.com> wrote: > Hi Shekhar, > > For YARN, try setting YARN_OPTS inside the yarn-env.sh. YARN scripts > do not reuse the hadoop-env.sh like the rest of the components. The > yarn-env.sh must reside in the YARN_CONF_DIR directory. > > Does this help? > > On Wed, Sep 12, 2012 at 8:07 AM, Shekhar Gupta <shkhr...@gmail.com> wrote: >> I am trying to talk to R from Resource Manager. To do that I have to set a >> VM argument >> >> -Djava.library.path=/Library/Frameworks/R.framework/Resources/library/rJava/jri/ >> >> >> >> I have tried to set this argument by adding following line in hadoop-env.sh >> export >> HADOOP_OPTS="-Djava.library.path=/Library/Frameworks/R.framework/Resources/library/rJava/jri/ >> $HADOOP_OPTS" >> >> >> >> But this not working. When I run a job I get following exception >> >> Cannot find JRI native library! >> Please make sure that the JRI native library is in a directory listed >> in java.library.path. >> >> java.lang.UnsatisfiedLinkError: no jri in java.library.path >> at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1758) >> at java.lang.Runtime.loadLibrary0(Runtime.java:823) >> at java.lang.System.loadLibrary(System.java:1045) >> at org.rosuda.JRI.Rengine.<clinit>(Rengine.java:19) >> at >> org.apache.hadoop.yarn.server.resourcemanager.scheduler.parcscheduler.parcscheduler.doneApplication(parcscheduler.java:454) >> at >> org.apache.hadoop.yarn.server.resourcemanager.scheduler.parcscheduler.parcscheduler.handle(parcscheduler.java:927) >> at >> org.apache.hadoop.yarn.server.resourcemanager.scheduler.parcscheduler.parcscheduler.handle(parcscheduler.java:1) >> at >> org.apache.hadoop.yarn.server.resourcemanager.ResourceManager$SchedulerEventDispatcher$EventProcessor.run(ResourceManager.java:327) >> at java.lang.Thread.run(Thread.java:680) >> >> >> >> Can someone please tell me how to set this VM argument. >> >> Thanks in advance. > > > > -- > Harsh J -- Harsh J