World's most powerful open data catalog for building a high-performance, geo-distributed and federated metadata lake.
Java ai-catalogdata-catalogdatalakefederated-querylakehousemetadatametalakemodel-catalogopendatacatalogskycomputingstratosphere
[#15259] docs: clarify Iceberg maintenance policy applicability and generated rules (#15260)
MaSai2b3499c73d00
diff --git a/docs/iceberg-compaction-policy.md b/docs/iceberg-compaction-policy.mdindex d36aa266fc..0a071a5d9d 100644--- a/docs/iceberg-compaction-policy.md+++ b/docs/iceberg-compaction-policy.md@@ -13,7 +13,11 @@ import TabItem from '@theme/TabItem';`system_iceberg_compaction` is a built-in policy type used by the optimizer to generate compaction strategies and job contexts for Iceberg tables.-This policy supports `CATALOG`, `SCHEMA`, and `TABLE` metadata objects.+The optimizer treats `CATALOG`, `SCHEMA`, and `TABLE` as the applicable object types for this+policy. That list is not an association reject list: associating a policy does not check+`supportedObjectTypes`, and object policy lookup does not filter by it. Consumers decide whether+the policy type applies to the object they are processing. See+[Policies](./policies.md) and the OpenAPI description of `supportedObjectTypes`.## Policy Content@@ -35,18 +39,28 @@ parameters separate from the `options` map.## Generated Rules and Properties-The policy content is converted to:--- Properties:- - `strategy.type=iceberg-data-compaction`- - `job.template-name=builtin-iceberg-rewrite-data-files`-- Rules:- - `trigger-expr=custom-data-file-mse >= minDataFileMse || custom-delete-file-number >= minDeleteFileNumber`- - `score-expr=custom-data-file-mse * dataFileMseWeight + custom-delete-file-number * deleteFileNumberWeight`- - `max-partition-num=<maxPartitionNum>`- - `rewriteStrategy=<rewriteStrategy>`- - `sortOrder=<sortOrder>`- - `job.options.<key>=<value>` for each rewrite option+Typed content fields on CREATE/GET are the REST payload. The optimizer (and other consumers)+derive stable properties and evaluation rules from those fields. The derived keys below are+**not** serialized as `strategy.type`, `trigger-expr`, or `job.options.*` entries on the policy+REST `content` object.++After a GET (or create) through the Java or Python client, inspect them with+`policy.content().properties()` and `policy.content().rules()` (for example+`metalake.getPolicy(name).content().rules()`).++Derived properties:++- `strategy.type=iceberg-data-compaction`+- `job.template-name=builtin-iceberg-rewrite-data-files`++Derived rules:++- `trigger-expr=custom-data-file-mse >= minDataFileMse || custom-delete-file-number >= minDeleteFileNumber`+- `score-expr=custom-data-file-mse * dataFileMseWeight + custom-delete-file-number * deleteFileNumberWeight`+- `max-partition-num=<maxPartitionNum>`+- `rewriteStrategy=<rewriteStrategy>`+- `sortOrder=<sortOrder>`+- `job.options.<key>=<value>` for each rewrite option## Parameter Tuning Guidediff --git a/docs/iceberg-orphan-file-removal-policy.md b/docs/iceberg-orphan-file-removal-policy.mdindex 5401b2be30..6ea72ac896 100644--- a/docs/iceberg-orphan-file-removal-policy.md+++ b/docs/iceberg-orphan-file-removal-policy.md@@ -14,8 +14,12 @@ import TabItem from '@theme/TabItem';Table Maintenance Service to remove unreferenced Iceberg files through`builtin-iceberg-remove-orphan-files`.-This policy supports `CATALOG`, `SCHEMA`, and `TABLE` metadata objects. It accepts time triggers-only; `commitTrigger=true` is rejected.+The optimizer treats `CATALOG`, `SCHEMA`, and `TABLE` as the applicable object types for this+policy. That list is not an association reject list: associating a policy does not check+`supportedObjectTypes`, and object policy lookup does not filter by it. Consumers decide whether+the policy type applies to the object they are processing. See+[Policies](./policies.md) and the OpenAPI description of `supportedObjectTypes`. It accepts time+triggers only; `commitTrigger=true` is rejected.## Policy Content@@ -29,17 +33,27 @@ The typed content for `system_iceberg_orphan_file_removal` supports the followin## Generated Rules and Properties-The policy content is converted to:--- Properties:- - `strategy.type=iceberg-orphan-file-removal`- - `job.template-name=builtin-iceberg-remove-orphan-files`-- Rules:- - `trigger-expr=true`- - `score-expr=1`- - `job.options.olderThanDays=<olderThanDays>`- - `job.options.dryRun=<dryRun>`- - `job.options.location=<location>` when `location` is set+Typed content fields on CREATE/GET are the REST payload. The optimizer (and other consumers)+derive stable properties and evaluation rules from those fields. The derived keys below are+**not** serialized as `strategy.type`, `trigger-expr`, or `job.options.*` entries on the policy+REST `content` object.++After a GET (or create) through the Java or Python client, inspect them with+`policy.content().properties()` and `policy.content().rules()` (for example+`metalake.getPolicy(name).content().rules()`).++Derived properties:++- `strategy.type=iceberg-orphan-file-removal`+- `job.template-name=builtin-iceberg-remove-orphan-files`++Derived rules:++- `trigger-expr=true`+- `score-expr=1`+- `job.options.olderThanDays=<olderThanDays>`+- `job.options.dryRun=<dryRun>`+- `job.options.location=<location>` when `location` is setThe optimizer or TMS schedule decides when to submit the job. Once the Spark job starts, italways runs the orphan-cleanup procedure (`trigger-expr=true`); there is no extra metric gatediff --git a/docs/iceberg-rewrite-manifests-policy.md b/docs/iceberg-rewrite-manifests-policy.mdindex 22a73f1f6c..b1cfd1cd22 100644--- a/docs/iceberg-rewrite-manifests-policy.md+++ b/docs/iceberg-rewrite-manifests-policy.md@@ -14,7 +14,11 @@ import TabItem from '@theme/TabItem';spec and submits `builtin-iceberg-rewrite-manifests`. The strategy type is`iceberg-rewrite-manifests`; its handler and job adapter are built in.-This policy supports `CATALOG`, `SCHEMA`, and `TABLE` metadata objects.+The optimizer treats `CATALOG`, `SCHEMA`, and `TABLE` as the applicable object types for this+policy. That list is not an association reject list: associating a policy does not check+`supportedObjectTypes`, and object policy lookup does not filter by it. Consumers decide whether+the policy type applies to the object they are processing. See+[Policies](./policies.md) and the OpenAPI description of `supportedObjectTypes`.## Policy Content@@ -33,14 +37,24 @@ trigger regardless of average manifest size.## Generated Rules and Properties-The policy content is converted to:+Typed content fields on CREATE/GET are the REST payload. The optimizer (and other consumers)+derive stable properties and evaluation rules from those fields. The derived keys below are+**not** serialized as `strategy.type`, `trigger-expr`, or `job.options.*` entries on the policy+REST `content` object.-- Properties:- - `strategy.type=iceberg-rewrite-manifests`- - `job.template-name=builtin-iceberg-rewrite-manifests`-- Rules:- - `trigger-expr=custom-manifest-number >= manifest_count_threshold`- - optional `spec_id` and `use_caching` job options when set+After a GET (or create) through the Java or Python client, inspect them with+`policy.content().properties()` and `policy.content().rules()` (for example+`metalake.getPolicy(name).content().rules()`).++Derived properties:++- `strategy.type=iceberg-rewrite-manifests`+- `job.template-name=builtin-iceberg-rewrite-manifests`++Derived rules:++- `trigger-expr=custom-manifest-number >= manifest_count_threshold`+- optional `spec_id` and `use_caching` job options when set## Collect, evaluate, and submitdiff --git a/docs/iceberg-snapshot-expiration-policy.md b/docs/iceberg-snapshot-expiration-policy.mdindex de869c587d..450949d25f 100644--- a/docs/iceberg-snapshot-expiration-policy.md+++ b/docs/iceberg-snapshot-expiration-policy.md@@ -14,7 +14,11 @@ import TabItem from '@theme/TabItem';Table Maintenance Service to expire old Iceberg snapshots through`builtin-iceberg-expire-snapshots`.-This policy supports `CATALOG`, `SCHEMA`, and `TABLE` metadata objects.+The optimizer treats `CATALOG`, `SCHEMA`, and `TABLE` as the applicable object types for this+policy. That list is not an association reject list: associating a policy does not check+`supportedObjectTypes`, and object policy lookup does not filter by it. Consumers decide whether+the policy type applies to the object they are processing. See+[Policies](./policies.md) and the OpenAPI description of `supportedObjectTypes`.## Policy Content@@ -28,17 +32,27 @@ The typed content for `system_iceberg_snapshot_expiration` supports the followin## Generated Rules and Properties-The policy content is converted to:--- Properties:- - `strategy.type=iceberg-snapshot-expiration`- - `job.template-name=builtin-iceberg-expire-snapshots`-- Rules:- - `trigger-expr=true`- - `score-expr=1`- - `job.options.olderThanDays=<olderThanDays>`- - `job.options.retainLast=<retainLast>`- - `job.options.streamResults=<streamResults>`+Typed content fields on CREATE/GET are the REST payload. The optimizer (and other consumers)+derive stable properties and evaluation rules from those fields. The derived keys below are+**not** serialized as `strategy.type`, `trigger-expr`, or `job.options.*` entries on the policy+REST `content` object.++After a GET (or create) through the Java or Python client, inspect them with+`policy.content().properties()` and `policy.content().rules()` (for example+`metalake.getPolicy(name).content().rules()`).++Derived properties:++- `strategy.type=iceberg-snapshot-expiration`+- `job.template-name=builtin-iceberg-expire-snapshots`++Derived rules:++- `trigger-expr=true`+- `score-expr=1`+- `job.options.olderThanDays=<olderThanDays>`+- `job.options.retainLast=<retainLast>`+- `job.options.streamResults=<streamResults>`The optimizer or TMS schedule decides when to submit the job. Once the Spark job starts, italways runs the expire procedure (`trigger-expr=true`); there is no extra metric gate inside