Table Format
A table format defines how the files on storage make up a table: how they are laid out, which of them belong to each version of the table, and how changes are committed. Hudi keeps the table format separate from its storage engine, so the same writers and table services can work with more than one table format. The format is a property of the table, set with hoodie.table.format when the table is created.
| Table format | hoodie.table.format | Implementation |
|---|---|---|
| Native table format | native (default) | Built into Hudi |
| Apache Iceberg, as a pluggable format | ICEBERG | Apache XTable (incubating) |
Native Table Format
The following describes the general organization of files in storage for a Hudi table.
- Hudi organizes data tables into a directory structure under a base path on a storage.
- Tables are optionally broken up into partitions, based on partition columns defined in the table schema.
- Within each partition, files are organized into file groups, uniquely identified by a file ID (uuid)
- Each file group contains several file slices.
- Each slice contains a base file (parquet/orc/hfile) (defined by the config - hoodie.table.base.file.format ) written by a commit that completed at a certain instant, along with set of log files (.log.) written by commits that completed before the next base file's requested instant.
- Hudi employs Multiversion Concurrency Control (MVCC), where compaction action merges logs and base files to produce new file slices and cleaning action gets rid of unused/older file slices to reclaim space on the file system.
- All metadata including timeline, metadata table are stored in a special
.hoodiedirectory under the base path.

Please refer the tech spec for a more detailed description of the file layouts.
File Formats
A table format tracks files; the file format is how records are stored inside them. Hudi uses the file formats below for base files and for the data blocks in log files. Tables with Parquet base files can be queried from engines such as Spark, Flink, Hive, Presto and Trino (see SQL Queries for what each engine supports).
| File format | Used for | Characteristics |
|---|---|---|
| Apache Parquet | Base files (default), data blocks in log files | Columnar, for vectorized reads and compression |
| Apache ORC | Base files | Columnar, originally developed for Apache Hive |
| HFile | Base files and log data blocks of the metadata table | Sorted key-value pairs, for fast lookups by key |
| Lance | Base files (Spark only) | Columnar, for random access, VECTOR columns and AI/ML workloads |
| Apache Avro | Data blocks in log files | Row-oriented, for fast writes |
The base file format is set per table with hoodie.table.base.file.format. See Base Files and Log Files below for how the native table format uses them.
Lance File Format
Lance is a pluggable base file format selected per table via
hoodie.table.base.file.format = 'lance'. Hudi manages the table layer
(timeline, metadata, schema, file groups, table services); Lance is the on-disk file format for
base files. Log files for MOR tables remain Avro; log compaction merges Avro logs into Lance base
files.
-- COW
CREATE TABLE my_ai_table (
id STRING,
embedding VECTOR(768),
metadata STRING
) USING hudi
TBLPROPERTIES (
primaryKey = 'id',
type = 'cow',
hoodie.record.merger.impls = 'org.apache.hudi.DefaultSparkRecordMerger',
hoodie.table.base.file.format = 'lance'
);
-- MOR (Lance base + Avro logs)
CREATE TABLE my_ai_table_mor (
id STRING,
embedding VECTOR(768),
metadata STRING
) USING hudi
TBLPROPERTIES (
primaryKey = 'id',
type = 'mor',
hoodie.record.merger.impls = 'org.apache.hudi.DefaultSparkRecordMerger',
hoodie.table.base.file.format = 'lance'
);
Hudi table services on Lance-backed tables behave as follows. Compaction merges Avro log files into Lance base files. Clustering reorganizes records into new Lance files. Cleaning removes obsolete Lance file slices. Bloom filter indexing is supported; column-stats and partition-stats indices are automatically disabled for Lance base files. See Indexes for the supported set.
Type-specific behavior on Lance:
VECTORcolumns are stored natively as LanceFixedSizeList<Float32/Float64, dim>(FLOAT or DOUBLE only;INT8is not supported on Lance and fails fast at write).BLOBcolumns default toDESCRIPTORread mode, same as Parquet.VARIANTcolumns are not supported on Lance. Writing a table with a VARIANT column to Lance throwsHoodieNotSupportedException. Use Parquet for VARIANT tables.- Complex types (
STRUCT,ARRAY,MAP) are supported as Lance columns. populateMetaFields=falseis supported. User-defined key generators work normally with Lance-backed tables.
Lance is Spark-only. Reading a Lance-backed table from Flink, Hive, Presto, or Trino throws
HoodieValidationException. Lance files are also non-splittable: a single Spark task reads one
Lance base file.
The Lance JAR is not bundled in the Hudi distribution. Add the Lance Spark bundle that matches your Spark version to the Spark classpath:
| Spark version | Bundle (Maven Central) |
|---|---|
| Spark 3.4 | org.lance:lance-spark-bundle-3.4_2.12:0.4.0 |
| Spark 3.5 | org.lance:lance-spark-bundle-3.5_2.12:0.4.0 |
| Spark 4.0 | org.lance:lance-spark-bundle-4.0_2.13:0.4.0 |
| Spark 4.1 | org.lance:lance-spark-bundle-4.1_2.13:0.4.0 |
export LANCE_BUNDLE_JAR=/path/to/lance-spark-bundle-3.5_2.12-0.4.0.jar
spark-shell --jars $HUDI_BUNDLE_JAR,$LANCE_BUNDLE_JAR
File sizing and memory
| Property | Default | Description |
|---|---|---|
hoodie.lance.max.file.size | 125829120 (120 MiB) | Target file size in bytes for Lance base files (analogous to hoodie.parquet.max.file.size). |
hoodie.lance.write.allocator.size.bytes | 268435456 (256 MiB) | Maximum size of the Arrow child allocator used for buffering in-flight batch data. Increase for tables with very large BLOB columns. |
hoodie.lance.write.flush.byte.watermark | 100663296 (96 MiB) | Byte-size threshold at which the current write batch is flushed. Must be less than hoodie.lance.write.allocator.size.bytes. |
Arrow uses power-of-2 buffer doubling; the default 256 MiB allocator accommodates a 128 MiB doubling
step with headroom. The default 96 MiB watermark (~3/8 of the allocator cap) leaves room for offset
and validity buffers to double without exceeding the allocator limit. For tables with large BLOB
columns, increase the allocator and watermark together (keep watermark ≈ 3/8 of allocator).
Base Files
Base files store full records, against which change records are stored in delta log files below. Hudi currently supports following base file formats.
- columnar formats for vectorized reads, columnar compression and efficient column based access for analytics/data science.
- row-oriented avro files for fast scans for reading whole records.
- random access optimized HFiles for efficient searching for indexed records (based on SSTable format)
- Lance files for native
VECTORstorage and AI/ML workloads (Spark-only).

Mixed-Format Tables
hoodie.table.base.file.format is set per table, so different tables in the same lakehouse can use
different base file formats (Parquet, ORC, HFile, Lance) under a shared Hudi catalog and metadata
table.
Log Files
Log files store incremental changes (partial or full) to a base file, such as updates, inserts, and deletes, after the base file was created. Log files contain different blocks (data, command, delete blocks etc.) that encode specific changes to the base file. The data block encodes updates/inserts to the base file, with customizability to support different needs.
- row-oriented avro files for fast/lightweight writing
- random access optimized HFiles for efficient searching for indexed records (based on SSTable format)
- columnar parquet files for vectorized log merging.
Storage Format Versioning
Elements of Hudi's storage format like log format, log block structure, timeline file/data schema are all versioned and tied to a given table version. The table version is a monotonically increasing number that is bumped up everytime some bits produced in storage change.
Backwards compatible reading: Hudi releases are backwards compatible to ensure new software releases can read recent older table versions. The recommended way to upgrade Hudi across different engines, is by first upgrading all readers (e.g. interactive query engines that consume tables) and then upgrading any/all writers and table services. Hudi storage engine also implements auto upgrade capability that can gracefully perform a table version upgrade on the subsequent write operation, by automatically performing any necessary steps without downtime to queries/reads.
Backwards compatible writing: However, this may not be possible at all times given data platforms built on Hudi could have multi-stage pipelines that can act as readers and writers at the same time. In such cases, Hudi upgrade needs to be performed by upgrading the most downstream jobs first, tracking all the way to the first Hudi tables written possibly by ingestion systems. To ease this process, Hudi allows also writing recent older table versions, such that the new Hudi software binaries can first be rolled out across the entire deployment on top of the same older table version. Once all jobs and engines have the new binary, then upgrade to newer table version can happen in any order and readers will dynamically adapt.
Configs
The following writer configs control writing older table versions and auto upgrade behavior.
| Config Name | Default | Description |
|---|---|---|
| hoodie.write.table.version | latest (Optional) | The table version this writer is storing the table in. This should match the current table version, if table already exists. Set this to a lower version when upgrade as described above. |
| hoodie.write.auto.upgrade | true (Optional) | If enabled, writers automatically migrate the table to the specified write table version if the current table version is lower. |
Please refer here for additional configs that control storage layout and data distribution, which defines how the files are organized within a table.
Pluggable Table Format
Starting with Hudi 1.1, an external table format can be plugged in under the storage engine (see the Hudi stack and RFC-93). Hudi still organizes the data into file groups, records its actions on the timeline, and runs its indexes and table services. When a write, compaction, clustering, clean, rollback or savepoint completes on the timeline, Hudi calls the plugin, which records the action in the metadata of the external format. The plugin's timeline reports an action as complete only after both steps, so Hudi and the readers of the external format see the same table.
A plugin implements the HoodieTableFormat interface and is loaded from the classpath by the name in hoodie.table.format.
Its settings are configs that start with hoodie.table.format., set on the write that creates the table.
When no plugin on the classpath matches hoodie.table.format, Hudi fails with an error that lists the formats it found. Every
job that writes or reads the table through Hudi needs the plugin jar, including table services that run on their own.
Apache Iceberg
With the Iceberg plugin, Hudi writes Apache Iceberg tables. The Hudi storage engine runs the writes, indexes and table services, and every write, compaction, clustering, clean and savepoint commits an Iceberg snapshot that follows the Iceberg table spec, at format version 3 by default. The Iceberg metadata is the table's own metadata, so Iceberg engines read each commit as soon as it completes, and Hudi keeps its timeline, metadata table and indexes alongside it. Apache XTable (incubating) provides the plugin. This section describes the plugin on Hudi 2.0.
This differs from syncing with XTable, which keeps a native Hudi table and translates its metadata to Iceberg after the fact.
| Feature | Support |
|---|---|
| Iceberg format version | 3 (default) or 2, chosen when the table is created |
| Copy-on-Write tables | Format version 2 or 3 |
| Merge-on-Read tables | Format version 3, with updates and deletes published as deletion vectors on the base files |
| Row lineage | Format version 3. A row keeps its row ID when Hudi rewrites its file or updates it |
| Catalogs | Any Iceberg catalog, such as AWS Glue, Hive Metastore or an Iceberg REST catalog, or none |
| Hudi metadata table and indexes | Supported. Merge-on-Read tables need one of the indexes listed under Iceberg Configs |
| Partitioning | Partition paths that are plain column values |
Hudi actions map to Iceberg as follows.
| Hudi action | Iceberg metadata |
|---|---|
| Write | A snapshot that adds the new data files and deletes, and removes the files they replace |
| Compaction, clustering | A snapshot that replaces data files and keeps the rows the same |
| Clean | A snapshot with the same data files as the one before it. The snapshots that referenced the cleaned files are expired later, at archival |
| Savepoint | A snapshot with the same data files as the one before it, not yet an Iceberg tag |
| Rollback | A new snapshot that removes the rolled back files and brings back the previous ones |
| Archival | The snapshots of the archived instants are expired |
The Iceberg metadata is the source of truth: every completed Hudi action needs a snapshot, which is why a clean or a savepoint commits one even though the rows stay the same. If a Hudi commit has no Iceberg snapshot, the commit stays pending and the next write rolls it back. If the Iceberg commit fails, the Hudi operation fails too. Snapshots are expired at archival, while a clean deletes replaced files earlier, so Iceberg time travel to a snapshot whose files were cleaned fails.
Iceberg Configs
The Iceberg table format has two kinds of configs. Table configs are set on the first write, which creates the table, and later writes, table services and readers do not set them again. Catalog configs are job settings, as in Iceberg: every job that writes the table, runs its table services or reads it through Hudi sets them.
To create the table, set hoodie.table.name and hoodie.table.format=ICEBERG. Every other config below has a default.
The Iceberg metadata files always go under metadata/ in the base path; without a catalog, readers load the table from
there. To register the table in a catalog, set xtable.iceberg.catalog.impl, the catalog options it needs (such as
warehouse) and xtable.iceberg.namespace in every job. A Merge-on-Read table also needs the writer config described
below on every write.
With the Spark datasource, a later write that sets a different hoodie.table.format fails with a config conflict.
Table configs:
| Config Name | Default | Description |
|---|---|---|
hoodie.table.format | native | Set to ICEBERG to write the table as an Iceberg table. |
hoodie.table.format.iceberg.format.version | 3 | Iceberg format version of the table, 2 or 3. Merge-on-Read tables need 3. |
Catalog configs, set in the Hadoop configuration: in Spark, with the spark.hadoop. prefix, and in Flink, with the
hadoop. prefix.
| Config Name | Default | Description |
|---|---|---|
xtable.iceberg.catalog.impl | (none) | Iceberg catalog class, for example org.apache.iceberg.aws.glue.GlueCatalog. Without a catalog, readers load the table from its base path. |
xtable.iceberg.catalog.name | iceberg | Name of the catalog. |
xtable.iceberg.catalog.option.<key> | (none) | Catalog properties, such as warehouse or uri. |
xtable.iceberg.namespace | (none) | Namespace of the table in the catalog, for example db. The table name is hoodie.table.name. |
A job without the catalog configs does not find a table registered in a catalog, and fails.
A Merge-on-Read table also needs the writer config hoodie.write.updates.as.deletes.and.inserts=true on every write and
table service. An update is then written as
a positional delete of the old row plus an insert of the new one, so the log files hold only deletes. This mode needs:
- Commit-time ordering: set no ordering field, or set
hoodie.record.merge.mode=COMMIT_TIME_ORDERING. - An index that supplies record positions:
GLOBAL_SIMPLE,SIMPLE,BLOOM,GLOBAL_BLOOMorGLOBAL_RECORD_LEVEL_INDEX.
Usage
Start Spark with the catalog configs:
spark-shell \
--conf spark.hadoop.xtable.iceberg.catalog.impl=org.apache.iceberg.aws.glue.GlueCatalog \
--conf spark.hadoop.xtable.iceberg.catalog.name=glue \
--conf spark.hadoop.xtable.iceberg.catalog.option.warehouse=s3://example-bucket/warehouse \
--conf spark.hadoop.xtable.iceberg.namespace=db
The first write creates a Copy-on-Write table and registers it in AWS Glue as db.trips:
df.write.format("hudi")
.option("hoodie.table.name", "trips")
.option("hoodie.datasource.write.recordkey.field", "id")
.option("hoodie.table.format", "ICEBERG")
.mode("append")
.save("s3://example-bucket/warehouse/db/trips")
Later writes, in a job with the same catalog configs, only name the operation:
updatesDf.write.format("hudi")
.option("hoodie.datasource.write.operation", "upsert")
.mode("append")
.save("s3://example-bucket/warehouse/db/trips")
deletesDf.write.format("hudi")
.option("hoodie.datasource.write.operation", "delete")
.mode("append")
.save("s3://example-bucket/warehouse/db/trips")
For a Merge-on-Read table, add hoodie.datasource.write.table.type=MERGE_ON_READ to the first write and
hoodie.write.updates.as.deletes.and.inserts=true to every write. Hudi reads the table from its base path as usual, and
Iceberg engines read db.trips from the catalog.
Iceberg Spec Support
The tables follow the Iceberg table spec at format version 2 or 3:
- Snapshots: one per Hudi action, as mapped above, and time travel to any snapshot whose data files are still in the table.
- Deletion vectors (format version 3): Merge-on-Read updates and deletes.
- Row lineage (format version 3): a row ID on every row.
- Field IDs: written into the Parquet files by the XTable Hudi writer extension. Without it, readers resolve columns through the table's name mapping.
In development:
- Writes and table maintenance from Iceberg engines on the same table, through the catalog. Until then, Hudi is the only writer and runs the table services.
- More than one writer at a time.
- Iceberg branches and tags.