Managed Service for Apache Spark 可选的 ZooKeeper 组件

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

Apache ZooKeeper 组件是用于提供分布式数据同步的集中服务。

安装组件

在创建 Managed Service for Apache Spark 集群时安装该组件。

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

gcloud 命令

如需创建包含 Zookeeper 组件的 Managed Service for Apache Spark 集群,请使用带有 --optional-components 标志的 gcloud dataproc clusters create cluster-name命令(使用映像版本 1.0 或更高版本)。

gcloud dataproc clusters create cluster-name \
    --optional-components=ZOOKEEPER \
    --region=region \
    ... other flags

REST API

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

控制台

  1. 启用组件。
    • 在 Google Cloud 控制台中,打开 Managed Service for Apache Spark 创建集群页面。选中“设置集群”面板。
    • 在“组件”部分的“可选组件”下,选择 ZooKeeper 以及其他一些要在集群上安装的可选组件。