有人尝试将 R 解释器添加到 Apache Zeppelin 上吗? [英] Anyone tried to add R interpreter onto Apache Zeppelin?

查看:20
本文介绍了有人尝试将 R 解释器添加到 Apache Zeppelin 上吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我目前正在使用 Apache Zeppelin 来做一些数据可视化的事情,只是好奇为什么没有人为 R 提供解释器.从文档看来,创建一个新的解释器应该不会太难,但是如果真的就是这么简单,应该已经有各种语言的口译了,是不是我错了?

I'm currently using Apache Zeppelin to do some data visualization stuff, just curious why there're no one providing an interpreter for R. From the documentation it seems that creating a new interpreter shouldn't be too hard, but if it is really that easy, there should already be the interpreters for various languages, so am I wrong?

推荐答案

EDIT

在 new zeppelin 中,集成了两个 R Interpreter.因此,对于最新版本,我们不需要以下步骤.

In new zeppelin, two R Interpreters are integrated into it. So we don't need below steps for latest versions.

由于 0.6.0 还没有发布,我们需要克隆和构建它

Since 0.6.0 is not released we need to clone and built it

R 解释器 1(来自数据层)

$git clone https://github.com/apache/incubator-zeppelin.git
$mvn clean package -Pspark-1.6 -Ppyspark -Phadoop-2.4 -Psparkr -DskipTests

R 解释器 2

$git clone https://github.com/apache/incubator-zeppelin.git
$mvn clean package -Pspark-1.6 -Ppyspark -Phadoop-2.4 -Pr -DskipTests

有关这些 R 解释器的更多信息可以在 这里

More information about these R Interpreters can be found here

对于 0.6.0 以下的 zeppelin 版本,请遵循 LaurentH 步骤

试试来自 datalayer 的 这个 R 解释器.我们已经尝试过了,并且能够用它做一些事情.

Try this R Interpreter from datalayer. We've tried it and able to do stuffs with it.

我们能够连接 spark 并使用它进行可视化.据说,有一些小故障,如

We were able to connect spark and do visualization using it. Said that, there are some few glitches like

  1. 它没有形式支持.参考,https://github.com/datalayer/zeppelin-R/issues/1
  2. 无法使用默认的 Spark 上下文.您必须在 R 解释器中创建一个 Spark 上下文并使用它

添加 R 解释器的步骤

Steps to add R interpreter

  1. git 克隆 https://github.com/datalayer/zeppelin-R.git
  2. 导航到 zeppelin-R 并运行 mvn install
  3. 在 incubator-zeppelin/interpreter 中创建 R 文件夹
  4. 将 zeppelin-R/target/zeppelin-R-1.0.0-SNAPSHOT.jar 复制到 incubator-zeppelin/interpreter/R
  5. https 下载 REngine jar://oss.sonatype.org/content/repositories/snapshots/org/rosuda/REngine/REngine/2.1.1-SNAPSHOT/ 并将其添加到 incubator-zeppelin/interpreter/R 文件夹中
  6. https 下载 RServe jar://oss.sonatype.org/content/repositories/snapshots/org/rosuda/REngine/Rserve/1.8.2-SNAPSHOT/ 并将其添加到 incubator-zeppelin/interpreter/R 文件夹中
  7. 将 incubator-zeppelin/conf/zeppelin-env.sh.template 复制到 incubator-zeppelin/conf/zeppelin-site.xml
  8. 编辑 incubator-zeppelin/conf/zeppelin-site.xml 并将io.datalayer.zeppelin.R.RInterpreter"添加到 zeppelin.interpreters
  9. 重启齐柏林飞艇
  10. 打开 Zeppelin UI 并点击 Interpreter
  11. 单击创建"按钮并添加 R 解释器
  12. 现在你可以在 notebook 中使用 R 解释器
  1. git clone https://github.com/datalayer/zeppelin-R.git
  2. Navigate to zeppelin-R and run mvn install
  3. Create R folder in incubator-zeppelin/interpreter
  4. Copy zeppelin-R/target/zeppelin-R-1.0.0-SNAPSHOT.jar to incubator-zeppelin/interpreter/R
  5. Download REngine jar from https://oss.sonatype.org/content/repositories/snapshots/org/rosuda/REngine/REngine/2.1.1-SNAPSHOT/ and add it in incubator-zeppelin/interpreter/R folder
  6. Download RServe jar from https://oss.sonatype.org/content/repositories/snapshots/org/rosuda/REngine/Rserve/1.8.2-SNAPSHOT/ and add it in incubator-zeppelin/interpreter/R folder
  7. Copy incubator-zeppelin/conf/zeppelin-env.sh.template to incubator-zeppelin/conf/zeppelin-site.xml
  8. Edit incubator-zeppelin/conf/zeppelin-site.xml and add "io.datalayer.zeppelin.R.RInterpreter" to zeppelin.interpreters
  9. Restart zeppelin
  10. Open Zeppelin UI and click Interpreter
  11. Click "Create" button and add R interpreter
  12. Now you can use R interpreter in notebook

希望能帮到你

这篇关于有人尝试将 R 解释器添加到 Apache Zeppelin 上吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆