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

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

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

Shared 模式

image.png
Shared 模式是Zeppelin默认的模式,是指所有用户的所有Note都是共享同一个Spark Interpreter,因为一个Spark Interpreter对应一个Spark application,所以所有的Spark Job都是提交到同一个Spark Application里。如图所示,
image.png

Isolated Per User 模式

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

Isolated Per Note 模式 (推荐)

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