[AMORO-4268][AMS] Support HDFS owner impersonation for optimizing commits - #4333
Open
johntomcat7408-cmyk wants to merge 1 commit into
Open
Conversation
…mits Add opt-in table-owner proxy impersonation to AMS-side optimizing commits. Resolve the effective owner from Hive Metastore or refreshed Iceberg metadata, keep ordinary table loads unchanged, and fail without service-user fallback. Document Hadoop proxy-user requirements and cover configuration precedence, owner resolution, FileIO identity, and failure paths. Optimizer task writes and other maintenance operations remain out of scope.
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.
Why are the changes needed?
AMS currently constructs optimizing commits with tables whose Hadoop FileIO runs as the catalog service identity. In secured, table-owner-controlled warehouses, optimizer tasks can succeed while the AMS commit fails to write metadata or clean up files.
This is the first scoped part of #4268. It covers AMS-side optimizing commits only; optimizer task writes and other maintenance operations are unchanged.
Brief change log
hdfs.impersonation.enabledconfiguration, disabled by default. An explicit table value overrides the direct catalog value and the catalogtable.default.How was this patch tested?
Commands and results:
.\mvnw.cmd test -pl amoro-format-iceberg -am -Dtest=TestAuthenticatedHadoopFileIO,TestTableOwnerResolver -Dsurefire.failIfNoSpecifiedTests=false— 17 tests passed..\mvnw.cmd test -pl amoro-format-mixed/amoro-mixed-hive -am -Dtest=TestMixedHiveTablesImpersonation -Dsurefire.failIfNoSpecifiedTests=false— 2 tests passed.TestInternalIcebergHandlerImpersonation— 1 test passed in the AMS-focused run..\mvnw.cmd validate -pl amoro-format-iceberg,amoro-format-mixed/amoro-mixed-hive,amoro-ams -am— all 15 reactor modules passed Spotless and Checkstyle validation.git diff HEAD^ HEAD --check— passed.The AMS-focused run could not initialize
TestOptimizingQueue's Hive metastore on Windows becauseHADOOP_HOME/winutils.exeis unavailable. A real Kerberos/MiniDFS/HMS environment and the full test suite were not run locally.Compatibility and risks
hdfsowner is not special-cased; cluster proxy-user policy remains authoritative.Provenance and contribution boundaries
The implementation is original to this PR. It builds on the existing
TableMetaStore#doAsImpersonatingand authenticated FileIO patterns already present in upstream commit96a4d781aac60c4080b3f4a41322848e2308649a. No code was copied from open or unmerged pull requests or third-party sources.Documentation
docs/admin-guides/managing-catalogs.md