Defining Cloudera Lakehouse Optimizer resources using REST APIs
When you use REST APIs to create or define a Cloudera Lakehouse Optimizer policy, use the default policy called "ClouderaAdaptive" as-is, or create a new policy. When you create a new policy or override an existing policy, you define the policy in a new JEXL file, alternatively add the required constants in a new JSON file, and then upload the resources.
Perform the following steps to create a new policy or to override an existing policy by defining the policy in the new JEXL file. Alternatively you can add the constants in the new JSON file.
Each policy has a unique name. Set
an optional description in the JSON constants file. Enable one or
more of the following Iceberg maintenance actions in the JEXL script and JSON
constants, and adjust the parameters for each action:
- Data file compaction (
rewriteDataFiles) - Orphan file removal (
deleteOrphanFiles) - Positional delete rewrite (
rewritePositionDelete) - Snapshot expiration (
expireSnapshot) - Manifest rewrite (
rewriteManifest)
For parameter details, see JSON file constants.
