Apache ZooKeeper 组件是一种集中式服务,用于提供分布式数据同步功能。您可以在创建 Managed Service for Apache Spark 集群时,使用可选组件功能安装 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