Interpreter binding的意思是每个Note和Interpreter进程的对应关系,我们在架构那篇文章里说过Zeppelin 可以启动多个Spark Interpreter,那么你在Note上写的代码到底是运行在哪个Spark Interpreter里呢,这主要取决于Interpreter binding 模式。

这里主要介绍3种典型的Interpreter binding 模式。

  • Shared 模式
  • Isolated Per User 模式
  • Isolated Per Note 模式

下面我们拿Spark interpreter 来举例子来说明这三种不同的模式

Shared 模式

image.png
Shared 模式Zeppelin默认的模式,是指所有用户的所有Note都是共享同一个Spark Interpreter,因为一个Spark Interpreter对应一个 Spark App (SparkContext),所以所有的Spark Job都是提交到这一个 Spark App (SparkContext) 里

image.png

Isolated Per User 模式

Isolated Per User 模式是指每个用户对应一个 Spark Interpreter (这个模式只有在启用shiro的情况才能用 )如图所示,

image.png

Isolated Per Note 模式 (推荐)

image.png
Isolated Per Note 模式是指每个Note对应一个Spark Interpreter,如图所示,这个模式是推荐的使用方式,这样每个Note都是独立的,与实际情况最符合。
image.png

公众号 钉钉群

image.png image.png