Zeppelin项目主要的编程语言是Java,所以很适合在Intellij里搭建开发环境,这篇文档主要介绍如何在本地搭建Zeppelin开发环境,并且在Intellij里做Debug。

Build Zeppelin

Zeppelin本身有很多模块,如果你要全部build的话可能会花费很长的时间(取决于你的网络情况)。但是一般情况下你只使用一部分interpreter,所以只需要build一部分模块就可以了,Zeppelin里的模块主要分为3大类

  • core 模块
  • plugin 模块
  • interpreter 模块

    Core 模块

    core模块是Zeppelin的核心必不可少的模块,主要有zeppelin-interpreter,zeppelin-zengine,zeppelin-server,zeppelin-server,你可以运行以下命令来build核心模块

    1. mvn clean install -DskipTests -DskipRat -pl zeppelin-server,zeppelin-web -am -Phadoop2

    Plugin 模块

    Zeppelin 有几类插件在zeppelin-plugins目录,目前有2大类:

  • NotebookRepo

  • Launcher

一般情况下你是不需要build 插件的,但是如果你需要使用一些特殊的插件功能,就需要编译zeppelin-plugins模块,比如你要用Hdfs来存储Notebook(使用FileSystemNotebookRepo),或者要你要使用Flink interpreter(依赖FlinkInterpreterLauncher)
运行下面的命令来编译 plugin 模块(注意plugin模块依赖core模块,所以先确保你已经安装了core模块)

cd zeppelin-plugins
mvn clean package -DskipTests

Interpreter 模块

interpreter 模块是指 Zeppelin支持的所有interpreter,这些模块的编译是可选的,取决于你是否使用这个模块。一般的interpreter模块只要cd到 interpreter 模块文件夹(比如shell,markdown,jdbc),然后运行下面的命令就可以:

mvn clean package -DskipTests

但是有些interpreter 比较特殊,比如 spark interpreter还依赖python interpreter和r interpreter。下面例举一些如果编译一些对其他interpreter 有依赖的interpreter。

编译 Spark interpreter

master branch

mvn clean package -DskipTests -pl spark/interpreter,spark/scala-2.11,spark/scala-2.12,spark/scala-2.13 -am

0.10.1

mvn clean package -DskipTests -pl spark/interpreter,spark/scala-2.11,spark/scala-2.12 -am

编译 Flink interpreter

mvn clean package -DskipTests -pl flink/flink-scala-2.11,flink/flink-scala-2.12 -am