使用可选组件功能创建 Managed Service for Apache Spark 集群时,可以安装 ZooKeeper 等其他组件。本页面介绍了 ZooKeeper 组件。
Apache ZooKeeper 组件是用于提供分布式同步的集中服务 的数据。
安装组件
创建 Managed Service for Apache Spark 集群时,请安装该组件。
如需查看每个 Managed Service for Apache Spark 映像版本中包含的组件版本,请参阅 支持的映像版本 。
Google Cloud 控制台
- 在 Google Cloud 控制台中,打开 创建集群 页面。
- 点击其他配置 以展开该部分。
- 修改可选组件 。
- 在随即打开的面板中,选中 ZooKeeper 对应的复选框, 然后点击 保存。
gcloud CLI
如需创建包含 ZooKeeper 组件的 Managed Service for Apache Spark 集群,
请使用
gcloud dataproc clusters create cluster-name
命令以及 --optional-components 标志(使用映像版本
1.0 或更高版本)。
gcloud dataproc clusters create cluster-name \ --optional-components=ZOOKEEPER \ --region=region \ ... other flags