Iceberg lakehouse: one table format for every engine
How Apache Iceberg turns files on Ozone into transactional tables on Cloudera: the metadata tree, v2 row-level changes, the Hive Metastore catalog and REST catalog, which engines read and write it, time travel, branching, and why the Lakehouse Optimizer exists.
Every data platform ends up with the same table twice. The warehouse team keeps a copy for Impala, the data engineers keep a Parquet copy for Spark, the streaming team writes its own, and the AI team exports a third to a notebook. Each copy drifts, and nobody can say which one the regulator should trust. The copies exist because the engines could not safely share one table: on a Hadoop-era cluster a "table" was a directory of files and a row in the Hive Metastore, and nothing stopped two writers from corrupting it.
Apache Iceberg is the table format that fixes this, and it is the centre of what Cloudera calls its open data lakehouse. An Iceberg table is a tree of small metadata files that record exactly which data files belong to the table at each point in time. Any engine that can read the tree gets the same answer, writes are atomic, old versions stay queryable, and the storage underneath can be HDFS, Apache Ozone or an S3 bucket. On Cloudera Base on premises 7.3.2 the engines that read and write it are Hive, Impala and Spark, with Flink, NiFi and Trino alongside, all under one Ranger policy set.
This article explains why the old approach broke, how Iceberg's metadata tree works, what version 2 adds, how the catalog works on Cloudera, which engine supports what, how time travel, branching and maintenance work, and what to decide before the first table is created.
Why a directory is not a table
A Hive table on HDFS was a directory, a partition a subdirectory, and the Hive Metastore recorded the path, the columns and the partition list. That model had four faults every large cluster hit eventually.
- No atomic commits. A job writing a hundred files into a partition could fail after sixty, and readers saw the sixty. Two jobs writing the same partition interleaved their files.
- Expensive planning. The engine listed directories to plan a query. On an object store a listing is a slow, paged call, and on fifty thousand partitions it dominated the query time.
- Fragile schema changes. Renaming or dropping a column could silently misread old files, because Hive matched columns by position or by name depending on the file format.
- Partitioning leaked into queries. A table partitioned by
event_dateneeded aWHERE event_date = ...clause to prune, and the layout chosen in year one could not change without rewriting the data.
A table format is a metadata specification that sits between the catalog and the data files and removes these faults. Iceberg, Delta Lake and Apache Hudi are the three in use; Cloudera chose Iceberg because it is an Apache project with no single vendor behind it, has the widest engine support, and does not depend on any one engine's runtime.
The metadata tree
An Iceberg table is a tree with four levels of metadata above the data files. Every level is an immutable file: a write never modifies an existing file, it writes new ones and then moves one pointer.
| Level | File | What it records |
|---|---|---|
| Catalog | The Hive Metastore entry (or a REST catalog) | The location of the current metadata file. This is the only thing that changes on commit |
| Table metadata | vN.metadata.json |
The schema and its history, the partition spec and its history, sort orders, table properties, and the list of snapshots with the current snapshot ID |
| Manifest list | One Avro file per snapshot | Every manifest that belongs to the snapshot, with partition value ranges so whole manifests can be skipped |
| Manifests | Avro files | The data files and delete files, each with its partition values, record count, file size, and per-column lower and upper bounds, null counts and value counts |
| Data and delete files | Parquet, ORC or Avro | The rows, and for v2 tables the rows marked as deleted |
A snapshot is the complete state of the table at one commit: one manifest list, and through it every file live at that moment. A write produces new data files, new manifests, a new manifest list and a new metadata file with one more snapshot. The commit is a single atomic swap of the catalog pointer from v7.metadata.json to v8.metadata.json. If the writer dies before the swap, nothing it wrote is reachable. Two writers that race are serialised by optimistic concurrency: the loser sees the pointer moved, re-reads and retries.
Three properties follow. Planning reads manifests instead of listing directories, and the column bounds in each manifest let the engine skip files that cannot match a predicate. Schema evolution is safe because every column has a permanent ID, so renames and drops are metadata-only and old files are read correctly. And hidden partitioning makes the partition spec a transform on a column (day(event_ts), bucket(16, account_id)) that the engine applies itself: a query on event_ts prunes partitions without knowing the layout, and the spec can change later, with old files keeping their old layout.
Version 2: changing rows, not files
The first Iceberg specification handled append-only tables well. Version 2, which Cloudera supports as GA for Hive, Impala and Spark and which Cloudera Data Services 1.5.5 certifies on Ozone for Data Warehouse, Data Engineering and Cloudera AI, adds row-level UPDATE, DELETE and MERGE. There are two ways to do it, and the choice matters more than any other table property.
Copy-on-write (CoW) rewrites every data file that contains an affected row: the write is expensive, the read afterwards is a plain scan. Merge-on-read (MoR) leaves the data files alone and writes small delete files, position deletes naming a file and row number, equality deletes naming column values. Writes are cheap; every read then applies the delete files until a compaction folds them in.
On Cloudera the engines differ, and the documentation is precise about it: Hive supports both modes, chosen per table and per operation with the write.delete.mode, write.update.mode and write.merge.mode properties, while Impala supports only merge-on-read and will fail if a table is configured for copy-on-write. Spark in Cloudera Data Engineering supports both. The practical consequence is that a table Impala has to update must be MoR, and someone has to compact it.
Version 3 is arriving in pieces. With the Iceberg 1.10.0 library in Runtime 7.3.2 SP1, Hive supports deletion vectors on v3 tables, a compact bitmap replacement for position delete files, and a VARIANT type for semi-structured data; Impala's deletion vectors and row lineage are Technical Preview, and Data Services 1.5.5 SP4 lists v3 as Technical Preview as a whole. As of October 2026 v2 is the version to build on.
The catalog on Cloudera
The catalog is the small, consistent store that holds the current pointer for every table. On Base on premises it is the Hive Metastore: Hive and Impala use the Iceberg HiveCatalog by default and Spark in Data Engineering points at the same metastore, so all three see one list of tables. Because Iceberg keeps partition information in its own metadata, a table with a million partitions is one metastore row and one pointer.
Since Runtime 7.3.2 the metastore can also serve the Iceberg REST catalog protocol from inside its own JVM. The REST catalog is the specification's engine-neutral API: a client asks for a table by name, receives the metadata location and, if configured, temporary storage credentials, and reads the files directly. Cloudera builds its Data Sharing feature on it. An external engine (Cloudera's page names Databricks, Snowflake, Amazon EMR and Splunk, and any engine that understands the format qualifies) authenticates with an OAuth token issued by Knox, is authorised by Ranger at table level, and reads the data without a copy. On premises this arrived in Runtime 7.3.2 SP2 for tables on Ozone, with two Knox topologies for share management and access and the Ozone S3 Gateway vending temporary credentials. The limits matter before promising it to anyone: shares are read-only, Ranger masking and row filtering do not apply, only tables with s3a:// locations can be shared, and the feature needs an entitlement from Cloudera.
Cloudera Anywhere Cloud, the new platform in limited availability with general availability scheduled for 30 November 2026, keeps Iceberg as its table format and adds the Apache Polaris catalog, an open REST catalog that can front several engines and clouds. Tables created on Base today will be readable from it; that is the point of choosing an open format.
Which engine does what
The reason to adopt a table format is that several engines share the result, so what matters is what each engine can do with an Iceberg table. The table below follows Cloudera's feature support matrix and release notes for Base on premises 7.3.2 and Data Services 1.5.5, as of October 2026.
| Capability | Hive | Impala | Spark (Data Engineering) | Flink and SQL Stream Builder | NiFi | Trino |
|---|---|---|---|---|---|---|
| Create, insert, read v1 and v2 | Yes | Yes | Yes | Insert and insert overwrite; upsert and equality delete are Technical Preview | Append through PutIceberg into a table that already exists |
Read, in a Trino Virtual Warehouse (Technical Preview at 1.5.5 SP1, announced for on premises in February 2026) |
| Row-level update, delete, merge | Yes, CoW or MoR | Yes, MoR only | Yes, CoW or MoR | Technical Preview | No | No |
| Time travel | Yes | Yes | Yes | No | No | Not stated |
| Branching and tagging | Yes | No | Yes | No | No | No |
| Schema and partition evolution | Yes | Yes | Yes | Reads the current schema | Reads the current schema | Reads the current schema |
| Compaction | Yes | Yes, with orphan-file removal since 7.3.2 | Yes, and the Lakehouse Optimizer runs its jobs on Spark | No | No | No |
| Migrate a Hive table in place | Yes | Yes, from 7.3.1 | Yes | No | No | No |
Two patterns follow. Impala serves people and dashboards, so it reads everything and updates only as MoR; Hive and Spark do the heavy writing, the merges and the maintenance. The streaming and ingest engines append; the table's lifecycle belongs to a batch engine and the Lakehouse Optimizer.
Time travel, branches and tags
Because every snapshot is kept until something expires it, the table's history is queryable. In Hive and Impala a query can be pinned to a point in time or to a snapshot ID:
SELECT count(*) FROM bank.transactions FOR SYSTEM_TIME AS OF '2026-09-30 23:59:59';
SELECT count(*) FROM bank.transactions FOR SYSTEM_VERSION AS OF 8231570011962134901;
This is how a month-end report is reproduced after the data has moved on, how a bad load is inspected before anyone acts on it, and how "what did the table say on that date" is answered without a restore. Rolling back to a good snapshot is a metadata operation in Hive.
Tags are named snapshots kept regardless of the expiry policy: ALTER TABLE ... CREATE TAG q3_close FOR SYSTEM_TIME AS OF '...' keeps the quarter-end state readable as bank.transactions.tag_q3_close for as long as the tag exists. Branches are named lines of snapshots that diverge from the main table: a pipeline writes a day's load to an audit branch, runs its checks there, and fast-forwards main only when they pass. Both are Hive and Spark features on Cloudera; Impala reads the main table but does not work with branches or tags, so the branch workflow belongs in the engineering tier.
Maintenance and the Lakehouse Optimizer
A table that is written often decays. Streaming inserts and small batches leave thousands of files far below the 128 MB to 512 MB that scans like. MoR updates leave delete files every query must apply. Every commit keeps a snapshot and the files it references, so storage grows even when the table does not, and failed jobs leave orphan files. The remedies are standard Iceberg procedures: compaction rewrites small files and folds delete files in, snapshot expiry drops old snapshots and the files only they referenced, orphan removal deletes unreferenced files older than a cutoff, and manifest rewriting keeps planning fast. Hive and Impala expose these as ALTER TABLE ... EXECUTE statements and Spark as procedures, but someone has to schedule them for every table, with the right arguments, forever.
The Cloudera Lakehouse Optimizer is the service that does the scheduling. Introduced with Runtime 7.3.2 and Cloudera Manager 7.13.2, it runs maintenance as Spark jobs under policies. A policy is a JEXL script, optionally with a JSON configuration, that decides what to do to a table based on its state; the shipped ClouderaAdaptive policy is the template, and tables are associated with policies through a table property. Maintenance can be triggered by events such as commits, by a schedule, or ad hoc, and a dry run shows the planned actions without executing them. The operations are compaction with Iceberg's rewrite_data_files options (target file size, minimum input files, delete-file threshold, partial progress), snapshot expiration (maximum age, retain last N), orphan-file removal, manifest rewrite and positional-delete rewrite. Runtime 7.3.2 SP1 added a web UI deployed as a parcel behind Knox, task prioritisation, high availability with leader election, Puffin statistics computation, an audit trail, persisted scheduler state and, for Base on premises only, re-encoding data files with a more efficient compression codec.
Cloudera quotes up to 38 times faster queries and up to 36 per cent less storage from the Optimizer. Those are Cloudera's figures for a neglected table; the plain statement is that a compacted table with expired snapshots queries at the speed its file sizes allow and stops growing. Two cautions from Cloudera's best-practice page: snapshot expiry, orphan removal and delete rewriting delete data, so arguments and table associations should be reviewed before a policy goes live, and Optimizer schedules must not overlap with Replication Manager schedules on the same tables.
Migration, replication and storage
Most organisations arrive with Hive tables. Cloudera supports converting one in place:
ALTER TABLE sales.orders CONVERT TO ICEBERG;
ALTER TABLE sales.orders SET TBLPROPERTIES ('format-version' = '2');
No data files are rewritten; Iceberg metadata is generated over the existing Parquet or ORC files, so the conversion is fast and the files are untouched. The second statement enables row-level changes. Spark's snapshot procedure creates a trial Iceberg table over the same files, and its migrate procedure keeps a backup of the original. Tables in text or Avro, or with layouts worth changing, are better rewritten into a fresh Iceberg table with a partition spec chosen for the queries that will run.
For disaster recovery, Replication Manager in Cloudera Manager has Iceberg replication policies: the metastore metadata and the data files are copied from one Base cluster to another, with all snapshots by default so time travel works on the target, optionally with Atlas lineage and column statistics. Replication runs HDFS to HDFS or Ozone to Ozone, never across the two, and Iceberg on Ozone needs Base 7.3.2 with Cloudera Manager 7.13.2. The Iceberg Replication parcel and service must be present on both clusters.
The storage underneath is where a new deployment should think hardest. Iceberg works on HDFS, but Cloudera's direction is Ozone, its object store: Iceberg v2 is GA on Ozone across the data services, Data Sharing on premises requires it, and the AI services use it for models. Ozone's file-system-optimised buckets give Iceberg the atomic rename it likes, and its object-store buckets give external engines an S3 endpoint; the Ozone article in this series covers the choice. The practical difference from HDFS is erasure coding and the Storage Optimizer, which can cut raw storage for cold snapshots by the 45 to 60 per cent Cloudera quotes.
What to decide
- Partition spec. Choose transforms for the predicates reports actually use, usually
day(ts)for event tables andmonth(ts)for slower ones, andbucket(N, key)only for very large join keys. Over-partitioning creates small files; under-partitioning scans too much. Partition evolution means the choice is not permanent, but old files keep the old layout. - File size and write cadence. Aim for data files of 128 MB to 512 MB. A stream that commits every minute needs compaction every few hours; a nightly batch may need it weekly. Decide the cadence per table and let the Optimizer enforce it.
- Copy-on-write or merge-on-read. Append-heavy tables that are rarely updated, and anything that must be fast under Impala with few updates, suit CoW from Hive or Spark. Tables with frequent small updates, change-data-capture feeds and anything Impala has to update itself are MoR, with compaction budgeted.
- Retention. The number of days of snapshots kept decides both the storage bill and the time-travel window. A common pattern is seven days of snapshots, tags for every month-end and year-end, and expiry of the rest. In a regulated institution, agree the window with compliance before data arrives; a tag is cheap and a restore is not.
- The catalog of record. The Hive Metastore is the catalog on Base, and every engine must point at it. Decide early whether external engines will reach tables through Data Sharing, because that fixes the storage as Ozone with
s3a://locations. - Who owns the table. One team owns the schema, the partition spec and the maintenance policy of each table; other teams append or read. The alternative is the many-copies problem the format was adopted to end.
- In-country and air-gapped sites. Everything here runs without an internet connection, and the REST catalog and Ozone's S3 endpoint make the lakehouse reachable by engines that will exist later without moving data off site, which matters where data residency rules decide what the platform may do.
Further reading
- Apache Iceberg feature support matrix for Cloudera Base on premises 7.3.2
- What's new in Apache Iceberg in Runtime 7.3.2
- Iceberg features in Hive and Impala
- Branching and tagging in Hive
- Migrating a Hive table to Iceberg
- Cloudera Lakehouse Optimizer on Base on premises, its features and best practices
- Data sharing with the Cloudera Iceberg REST Catalog and configuring the Hive Metastore REST catalog for Ozone
- Iceberg replication policies in Cloudera Manager 7.13.2
In this series
- Previous: Ozone object store, the storage this lakehouse sits on.
- Next: Data Engineering, where Spark and Airflow write the tables.
- Related: Data Warehouse for Impala, Hive and Trino over Iceberg, SDX and governance for the Ranger and Atlas layer, and Observability and DR for replication.
- Elsewhere: the data pipeline overview places table formats in the wider ecosystem, and our lakehouse service page describes how we design one.