feat(catalog): hadoop cli integration#1034
Merged
Merged
Conversation
zeroshade
requested changes
May 7, 2026
Member
zeroshade
left a comment
There was a problem hiding this comment.
add updates to the README for the support please
Comment on lines
+401
to
+404
| // writeMetadataLocationKey is the Java Iceberg property that allows relocating | ||
| // metadata to a custom path. The Hadoop catalog forbids this because it derives | ||
| // metadata paths from the table identifier. | ||
| const writeMetadataLocationKey = "write.metadata.location" |
Member
There was a problem hiding this comment.
should this be a constant at the catalog package level or in table properties instead of being in the hadoop package?
Contributor
Author
There was a problem hiding this comment.
Makes sense, originally scoped it to the hadoop package since it was only used there for the rejection check, but table/properties.go is the right home given that's where all the other write.metadata.* keys live. Moved it there as a public WriteMetadataLocationKey constant.
…p catalog Implement the three core table operations: - CreateTable: validates namespace exists, rejects custom locations, writes v1.metadata.json via temp-file+rename, updates version hint - LoadTable: uses findVersion with three-tier fallback, delegates to table.NewFromLocation for metadata parsing - CheckTableExists: delegates to isTableDir Relates to apache#798 Depends-on: PR 2 (version-hint), PR 3 (namespace-ops) Depended-on-by: PR 6 (CommitTable)
Implement the full atomic commit flow: 1. Load current table (nil for create-via-commit) 2. Validate requirements against current metadata 3. Apply updates via internal.UpdateTableMetadata 4. Validate table location unchanged 5. Reject write.metadata.location property 6. Determine next version via findVersion + 1 7. Write temp file, conflict-check target, atomic rename 8. Best-effort version hint update, cleanup temp on error Relates to apache#798 Depends-on: PR 4 (table CRUD) Depended-on-by: PR 7 (CLI integration)
Add catalog.Hadoop case to the CLI catalog switch in cmd/iceberg/main.go, passing the warehouse path from --warehouse flag. Import the hadoop package to make the catalog available. Relates to apache#798 Depends-on: PR 6 (CommitTable) Depended-on-by: none (leaf PR)
9c60942 to
cdef96e
Compare
zeroshade
approved these changes
May 7, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
7: CLI integration
Added a case catalog.Hadoop: branch to the catalog switch in cmd/iceberg/main.go, wire the cfg.Warehouse property, and add the blank import for catalog/hadoop.