禁用快照保留优化器 - Amazon Glue
Amazon Web Services 文档中描述的 Amazon Web Services 服务或功能可能因区域而异。要查看适用于中国区域的差异,请参阅 中国的 Amazon Web Services 服务入门 (PDF)

禁用快照保留优化器

您可以使用 Amazon Glue 控制台或 Amazon CLI 来为特定的 Apache Iceberg 表禁用快照保留优化器。

Console
禁快照保留功能
  1. 登录 Amazon Web Services Management Console,然后打开 Amazon Glue 控制台,网址为:https://console.aws.amazon.com/glue/

  2. 选择数据目录,然后选择。从表列表中,选择要禁用快照保留优化器的表。

  3. 表详细信息页面的下半部分,选择表优化禁用,并选择操作下的快照保留

    您还可以从该页面右上角的操作菜单中,选择优化下的禁用

  4. 在确认消息页面选择禁用。您可以在以后重新启用快照保留优化器。

    确认之后,快照保留优化器将被禁用,并且快照保留的状态将恢复为 Not enabled

Amazon CLI

将以下示例中的账户 ID 替换为有效的 Amazon 账户 ID。将数据库名称和表名称替换为实际的 Iceberg 表名称和数据库名称。将 roleArn 替换为具有运行保留优化器所需权限的 IAM 角色的 Amazon 资源名称(ARN)和实际名称。

aws glue update-table-optimizer \ --catalog-id 123456789012 \ --database-name iceberg_db \ --table-name iceberg_table \ --table-optimizer-configuration '{"roleArn":"arn:aws:iam::123456789012:role/optimizer_role", "vpcConfiguration":{"glueConnectionName":"glue_connection_name"}, "enabled":'false'}'\ --type retention
Amazon API

调用 UpdateTableOptimizer 操作来为特定的表禁用快照保留优化器。