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.

Reply via email to