Managed Service for Apache Spark 可选 Zeppelin 组件

使用可选组件功能创建 Managed Service for Apache Spark 集群时,可以安装 Zeppelin 等其他组件。本页面介绍了 Zeppelin 组件。

Zeppelin 笔记本组件是一个基于网页的笔记本,用于交互式数据分析。您可以通过集群的第一个主节点上的 8080 端口访问 Zeppelin Web 界面。

默认情况下,笔记本保存在 Cloud Storage 的 Managed Service for Apache Spark 暂存存储桶中,该存储桶由用户指定或 在创建集群时自动创建 。您可以在创建集群时通过 zeppelin:zeppelin.notebook.gcs.dir属性更改该位置。

安装组件

创建 Managed Service for Apache Spark 集群时,请安装该组件。 组件可添加到使用 Managed Service for Apache Spark 版本 1.3 及更高版本创建的集群中。

如需查看每个 Managed Service for Apache Spark 映像版本中包含的组件版本,请参阅 支持的 Dataproc 版本

gcloud 命令

如需创建包含 Zeppelin 组件的 Managed Service for Apache Spark 集群, 请使用 gcloud dataproc clusters create cluster-name 命令以及 --optional-components 标志。

gcloud dataproc clusters create cluster-name \
    --optional-components=ZEPPELIN \
    --region=region \
    --enable-component-gateway \
    ... other flags

REST API

可以通过 Managed Service for Apache Spark API 使用 SoftwareConfig.Component 将 Zeppelin 组件指定为 clusters.create 请求的一部分。

控制台

  1. 启用组件和组件网关。
    • 在 Google Cloud 控制台中,打开 Managed Service for Apache Spark 创建集群 页面。选中“设置集群”面板。
    • 在组件部分中执行以下操作:
      • 在可选组件下,选择 Zeppelin 和其他可选组件安装在集群上。
      • 在“组件网关”下,选择“启用组件网关”(请参阅查看和访问组件网关网址)。

打开 Zeppelin 笔记本

请参阅查看和访问组件网关网址,点击 Google Cloud 控制台上的组件网关链接,从而在本地浏览器中打开集群的主节点上运行的 Zeppelin 笔记本界面。