Goal
I have an R plugin for Datameer that I want to install to be compatible with my cluster libraries.
This example is based on Centos 6 and HDP 2.2.
Repositories and package installation commands may need updating. The following actions need to take place as root on all the nodes in the cluster.
Hadoop and library paths may be different depending on the cluster distribution and version.
Configuring the nodes
1)
su -c 'rpm -Uvh http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm'
2)
yum install R
3)
R
4)
install.packages('rJava',,'http://www.rforge.net/')
5) Create a symbolic link to the Hadoop native library folder:
ln -s /usr/lib64/R/library/rJava/jri/libjri.so libjri.so
Please take note that depending on your installation and distribution the command may differ:
ln -s /usr/local/lib/R/site-library/rJava/jri/libjri.so /opt/cloudera/parcels/CDH/lib/hadoop/lib/native/libjri.so
6) The path would be for example
pwd
/usr/hdp/lib/hadoop/lib/native
Configuring Hadoop
You can do this in Ambari or Cloudera Manager.
1) Add to yarn.application.classpath
/usr/lib64/R/library/rJava/jri
As this is the default location, please validate it before use.
2) Edit the yarn-env
template to inlcude
export R_HOME=/usr/lib64/R JRI_LD_PATH=${R_HOME}/lib:${R_HOME}/bin: if test -z "$LD_LIBRARY_PATH"; then LD_LIBRARY_PATH=$JRI_LD_PATH else LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$JRI_LD_PATH fi export R_HOME export LD_LIBRARY_PATH
3) Restart YARN services
Configuring the Datameer application server
1)
su -c 'rpm -Uvh http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm'
2)
yum install R
3)
R
4)
install.packages('rJava',,'http://www.rforge.net/')
5) Copy the R plug-in ZIP file provided to
<DATAMEER_INSTALLATION>/etc/custom-plugins/
6) And edit the das-env.sh
to include
export R_HOME=/usr/lib64/R JRI_LD_PATH=${R_HOME}/lib:${R_HOME}/bin: if test -z "$LD_LIBRARY_PATH"; then LD_LIBRARY_PATH=$JRI_LD_PATH else LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$JRI_LD_PATH fi export R_HOME export LD_LIBRARY_PATH
7) Link the libjri.so
file in the folder <DATAMEER_INSTALLATION>/lib/native
ln -s /usr/lib64/R/library/rJava/jri/libjri.so libjri.so
8) Restart Datameer
Comments
0 comments
Please sign in to leave a comment.