当您删除目录(例如 Apache Iceberg REST 目录或 Apache Hive 目录)时,系统会从 Lakehouse 运行时目录中取消注册元数据管理端点。
虽然此操作会从 Lakehouse for Apache Iceberg 中移除目录,但不会自动删除底层 Cloud Storage 存储桶或您存储的数据文件。您无法删除仍包含命名空间或表的目录。
准备工作
- 请参阅关于 Lakehouse 运行时目录,了解 Lakehouse 运行时目录的运作方式以及该服务的限制。
- Select a project: Selecting a project doesn't require a specific IAM role—you can select any project that you've been granted a role on.
-
Create a project: To create a project, you need the Project Creator role
(
roles/resourcemanager.projectCreator), which contains theresourcemanager.projects.createpermission. Learn how to grant roles. - Select a project: Selecting a project doesn't require a specific IAM role—you can select any project that you've been granted a role on.
-
Create a project: To create a project, you need the Project Creator role
(
roles/resourcemanager.projectCreator), which contains theresourcemanager.projects.createpermission. Learn how to grant roles.
In the Google Cloud console, on the project selector page, select or create a Google Cloud project.
Roles required to select or create a project
Verify that billing is enabled for your Google Cloud project.
Enable the BigLake API.
Roles required to enable APIs
To enable APIs, you need the serviceusage.services.enable permission. If you
created the project, then you likely already have this permission through the
Owner role (roles/owner). Otherwise, you can get this permission through the
Service Usage Admin role (roles/serviceusage.serviceUsageAdmin).
Learn how to grant roles.
In the Google Cloud console, on the project selector page, select or create a Google Cloud project.
Roles required to select or create a project
Verify that billing is enabled for your Google Cloud project.
Enable the BigLake API.
Roles required to enable APIs
To enable APIs, you need the serviceusage.services.enable permission. If you
created the project, then you likely already have this permission through the
Owner role (roles/owner). Otherwise, you can get this permission through the
Service Usage Admin role (roles/serviceusage.serviceUsageAdmin).
Learn how to grant roles.
所需的角色
如需获得删除目录所需的权限,请让管理员向您授予项目的以下 IAM 角色:
- 全部:
- BigLake Admin (
roles/biglake.admin) - Storage Admin (
roles/storage.admin)
- BigLake Admin (
如需详细了解如何授予角色,请参阅管理对项目、文件夹和组织的访问权限。
删除目录
删除目录端点。
控制台
在 Google Cloud 控制台中,打开 Lakehouse 页面。
在您要删除的目录所在的行中,依次点击 更多目录操作 > 删除。
在删除对话框中,输入
DELETE,然后点击删除。
gcloud
如需使用 gcloud 删除目录,请运行 gcloud biglake iceberg catalogs delete 命令。
gcloud biglake iceberg catalogs delete CATALOG_ID \ --project="PROJECT_ID"
替换以下内容:
CATALOG_ID:目录的 ID。PROJECT_ID:您的 Google Cloud 项目 ID。
REST
如需使用 REST API 删除目录管理端点,请向 DeleteIcebergCatalog 端点发出 DELETE 请求:
DELETE /iceberg/v1/restcatalog/extensions/projects/PROJECT_ID/catalogs/CATALOG_ID
替换以下内容:
PROJECT_ID:您的 Google Cloud 项目 ID。CATALOG_ID:目录的 ID。