Skip to content

Core: Add a filesystem-only HadoopCatalog - #4450

Open
Anurag-S1ngh wants to merge 2 commits into
apache:mainfrom
Anurag-S1ngh:feat/3897-hadoop-catalog
Open

Anurag-S1ngh wants to merge 2 commits into
apache:mainfrom
Anurag-S1ngh:feat/3897-hadoop-catalog

Conversation

@Anurag-S1ngh

Copy link
Copy Markdown
Contributor

Rationale for this change

Add pyiceberg.catalog.hadoop.HadoopCatalog, a filesystem-only catalog with the same layout as the Java HadoopCatalog: tables live under <warehouse>/<namespace>/<table>, metadata is written as v{n}.metadata.json, and version-hint.text points at the current version. When the hint is missing or stale, the latest metadata file is found by listing the metadata directory, which also opens tables named with the 00000-<uuid>.metadata.json convention used by the REST and SQL catalogs.

Namespaces map to directories and have no stored properties, matching Java. Rename, registration, views, and namespace property updates are not supported.

New catalog type: type=hadoop with a warehouse property.

Are these changes tested?

Yes. tests/catalog/test_hadoop.py covers create, load, append, commit, version-hint updates, uuid-named metadata without a hint, stale hints, nested namespaces, listing, drop rules, custom locations, and unsupported operations. tests/catalog/test_base.py passes.

Are there any user-facing changes?

Yes. A new HadoopCatalog and the hadoop catalog type are available.

Store tables under warehouse/<namespace>/<table> with metadata in
v{n}.metadata.json and a version-hint.text, matching the Java
HadoopCatalog. Read the latest metadata by following the hint and falling
back to listing the metadata directory, so tables named with the uuid
metadata convention can be opened too.

Namespaces map to directories and carry no properties. Renames, views,
registration, and namespace properties are not supported, the same as the
Java catalog.
Rename the metadata writer so it does not override the base helper with a
different signature, match the register_table signature, and cast the
format version for the schema conversion.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant