启用和停用 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. 启用 Dataproc Metastore API。

    启用 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. 启用 Dataproc Metastore API。

    启用 API

停用 Dataproc Metastore

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

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

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

后续步骤