启用和停用 Dataproc Metastore

本页面介绍如何为 Google Cloud 项目启用或停用 Dataproc Metastore。如需详细了解 Service Usage API, 请参阅启用和停用服务

准备工作

所需的角色

要获取启用和停用 Dataproc Metastore API 所需的权限, 请让管理员授予您 您的项目的 Service Usage Administrator (roles/serviceusage.serviceUsageAdmin) IAM 角色。 如需详细了解如何授予角色,请参阅管理对项目、文件夹和组织的访问权限

此预定义角色包含启用和停用 Dataproc Metastore API 所需的权限。如需查看所需的确切权限,请展开所需权限部分:

所需权限

如需启用和停用 Dataproc Metastore API,您需要具备以下权限:

  • serviceusage.services.disable
  • serviceusage.services.enable

您也可以使用自定义角色或其他预定义角色来获取这些权限。

如需详细了解特定 Dataproc Metastore 角色和权限,请参阅 Dataproc Metastore IAM 概览

启用 Dataproc Metastore

您可以将现有 Google Cloud 项目与 Dataproc Metastore 搭配使用,也可以创建一个新项目。在这两种情况下,您都需要启用结算功能和 Dataproc Metastore API。

  1. 登录您的 Google Cloud 账号。如果您是 Google Cloud 新手,请创建一个账号来评估我们的产品在实际场景中的表现。新客户还可获享 $300 赠金,用于运行、测试和部署工作负载。
  2. In the Google Cloud console, on the project selector page, select or create a Google Cloud project.

    Go to project selector

  3. 确保您的 Google Cloud 项目已启用结算功能

  4. Enable the Dataproc Metastore API.

    Enable the API

  5. In the Google Cloud console, on the project selector page, select or create a Google Cloud project.

    Go to project selector

  6. 确保您的 Google Cloud 项目已启用结算功能

  7. Enable the Dataproc Metastore API.

    Enable the API

停用 Dataproc Metastore

在停用 Dataproc Metastore API 之前,请务必删除您的所有元数据存储服务。当服务正在运行或仍然存在时,您无法停用 API。

如需停用 Dataproc Metastore API,请按照以下步骤操作:

  1. 在 Google Cloud 控制台中,选择包含 Dataproc Metastore API 的项目。
  2. 转到 Dataproc Metastore API 概览页面
  3. 点击管理
  4. 点击停用 API

后续步骤