如何在Amazon EMR 5.16.0上为Zeppelin 0.7.3安装R解释器

时间:2018-08-20 22:45:51

标签: r amazon-emr apache-zeppelin

当我用emr-5.16.0版本创建一个EMR集群并包含Zeppelin时,它会同时安装R,但是我似乎无法加载解释器。即使我运行“ sudo bash bin / install-interpreter.sh -a”,它也不会显示。

1 个答案:

答案 0 :(得分:2)

最后弄清楚了。从here起,EMR自5.16.0起不支持Zeppelin中的R。

通过设置不包含Zeppelin的EMR并在SSH进入主节点的同时运行以下命令,我可以从源代码构建Zeppelin:

sudo yum -y update
sudo yum -y install R R-devel libcurl-devel openssl-devel git
sudo R -e "install.packages('devtools', repos = 'http://cran.us.r-project.org')"
sudo R -e "install.packages('sparklyr', repos = 'http://cran.us.r-project.org')"
sudo R -e "install.packages('evaluate', repos = 'http://cran.us.r-project.org')"
sudo R -e "install.packages('knitr', repos = 'http://cran.us.r-project.org')"
sudo R -e "install.packages('ggplot2', repos = 'http://cran.us.r-project.org')"
sudo R -e "install.packages(c('devtools','mplot', 'googleVis'), repos = 'http://cran.us.r-project.org');
require(devtools); install_github('ramnathv/rCharts')"


mkdir build
cd build
wget http://www.eu.apache.org/dist/maven/maven-3/3.3.9/binaries/apache-maven-3.3.9-bin.tar.gz
sudo tar -zxf apache-maven-3.3.9-bin.tar.gz -C /usr/local/
sudo ln -s /usr/local/apache-maven-3.3.9/bin/mvn /usr/local/bin/mvn

git clone https://github.com/apache/zeppelin.git
cd zeppelin
git checkout tags/v0.8.0

mvn clean package -DskipTests -Pscala-2.11 -Pr -Dspark.version=2.2.0 -DHadoop.version=2.7.7
#NEED TO CHANGE PORT IN CONFIG
#need to set export SPARK_HOME=/usr/lib/spark in zeppelin-env.sh

./bin/zeppelin-daemon.sh start