Glossary Entry

Hive Metastore (HMS): How It Works and How It Compares to Iceberg Catalogs

The Hive Metastore (HMS) is the catalog service that maps Hive tables to files. See how it compares to Iceberg REST catalogs like Polaris, Glue, and Nessie.

Written by Alex Merced

The Hive Metastore (HMS) is a service that stores table and partition metadata for data lakes. It was built for Apache Hive in the Hadoop era and became the shared catalog that Spark, Presto, Trino, Impala, and many other engines used to find tables in HDFS and later in object storage. It is part of Apache Hive, which remains an active Apache top-level project, and since Hive 4.1 it ships as a standalone component with its own binary and Docker image.

A data lake on its own is a set of files. If you write a million Parquet files to S3, an engine has no way to know which files form a table, what the columns are, or how the data is partitioned. HMS provides that map.

The Architecture of the Catalog

HMS is a Thrift service backed by a relational database, usually MySQL or PostgreSQL. You can run several HMS instances for availability, but they share that one backing database.

It stores:

  • Table definitions: a logical name such as prod.sales mapped to a storage location such as s3://data-lake/sales/.
  • Schemas: column names and types, plus the file format and SerDe used to read them.
  • Partitions: one row per partition directory (for example dt=2026-10-14), which lets an engine skip directories that do not match a filter.
  • Statistics and transactions: column statistics for the optimizer and, for Hive ACID tables, the transaction and lock state.

When a user runs SELECT * FROM prod.sales WHERE dt = '2026-10-14', the engine asks HMS for the table and the matching partitions, then lists the files in those directories and reads them.

Where HMS Struggles

  • Partition counts: every partition is a row in the backing database, and planning a query over a table with hundreds of thousands of partitions means large metastore calls plus directory listings in object storage.
  • File tracking: HMS tracks directories, not files. Engines must list storage to find files, which is slow on S3 and gives no snapshot of exactly which files make up a version of the table.
  • Transactions: ACID guarantees exist only for Hive’s own transactional tables. Plain external tables written by Spark or other engines have no commit protocol, so concurrent writers can step on each other.

Hive Metastore vs Iceberg Catalogs

Apache Iceberg moves file-level tracking out of the catalog and into metadata files (JSON table metadata plus Avro manifest lists and manifests) stored next to the data. The catalog only has to hold a pointer to the current metadata file and swap it atomically on commit.

Hive Metastore (Hive tables)HMS as Iceberg catalogIceberg REST catalog (Polaris, Glue, Nessie, Unity Catalog OSS)
What the catalog tracksTables, partitions, directoriesPointer to current metadata filePointer to current metadata file, plus access control in most implementations
File listing at query timeYesNo, manifests list filesNo, manifests list files
Multi-engine commitsNot for external tablesAtomic pointer swap with locksAtomic commit through the REST API
Client protocolThriftThrift (Iceberg HiveCatalog)HTTP REST spec, language neutral

HMS has adapted: the Iceberg HiveCatalog uses it as a pointer store, and recent Hive releases expose an Iceberg REST catalog endpoint backed by HMS. That makes it a reasonable bridge for teams with existing Hive tables. New lakehouse deployments usually choose a REST catalog such as Apache Polaris, AWS Glue, or Project Nessie for credential vending and engine neutrality. To move Hive tables into Iceberg without rewriting data, see Migrating Into Iceberg Without Moving Data and Migrating to Apache Iceberg: Strategies for Every Source System. For the catalog landscape, read What Are Lakehouse Catalogs?.

Summary

The Hive Metastore defined the idea of a catalog that sits apart from storage and is shared by many engines. Its directory-based model limits it at large partition counts and gives no multi-engine transactions for plain tables, which is why the data lakehouse moved file tracking into Iceberg metadata and the catalog role toward REST catalogs.

Learn More

To learn more about the Data Lakehouse, read The Lakehouse Built for Everyone by Alex Merced. You can find this and other books by Alex Merced at books.alexmerced.com.

Related Terms

Apache Hive and the Hive Metastore vs Apache Iceberg

Apache Hive is a SQL data warehouse system for HDFS and object storage, known for its Metastore. Compare Hive tables with Iceberg and learn how to migrate.

What is Iceberg Catalog?

An Iceberg catalog is the service that maps each Apache Iceberg table name to its current metadata file and swaps that pointer atomically so commits stay safe.

What is Apache Iceberg?

Apache Iceberg is an open table format for large analytic tables on object storage, covering its metadata tree, hidden partitioning, time travel, and catalogs.

Project Nessie: Git-Like Branches for Iceberg and How It Compares to Polaris

Project Nessie is an open source Iceberg catalog with Git-like branches, tags, and multi-table commits. See how it works and how it compares to Apache Polaris.

What is Object Storage?

Object storage keeps data as objects with keys and metadata in a flat namespace, as in Amazon S3. See how Apache Iceberg builds ACID tables on top of it.

AWS Glue for Iceberg Lakehouses: Data Catalog, ETL, and Engines

AWS Glue is Amazon's serverless data integration service with a shared Data Catalog. See how Glue serves Iceberg tables to Spark, Athena, Dremio, and Trino.

Apache Gravitino vs Polaris and Unity Catalog OSS as a Metadata Layer

Apache Gravitino is an open source metadata lake that federates many catalogs behind one API. See how it serves Iceberg and compares to Polaris and Unity.

What is an Iceberg Manifest File?

An Iceberg manifest file is an Avro metadata file listing data files with their status and column stats, so query engines can prune files without listing S3.

Work with Alex