[SPARK-44976][CORE] Preserve full principal user name on executor side #44244
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.
What changes were proposed in this pull request?
Use full principal name as spark user name to respect
hadoop.security.auth_to_local
when accessing non-kerberized hdfs from kerberized hadoop cluster.Why are the changes needed?
Since https://issues.apache.org/jira/browse/SPARK-6558, spark uses short user name, it causes not to respect
hadoop.security.auto_to_local
on the NameNode in non-kerberized hadoop cluster.Also, if an user provides
--principal
and--keytab
options when submitting spark job on kerberized cluster and creating output on non-kerberized HDFS, file/directory ownerships are not coherent.Additional description is on https://issues.apache.org/jira/browse/SPARK-44976.
Does this PR introduce any user-facing change?
The ownerships of output file/directory will be coherent even in non-kerberized hdfs cluster from spark job in kerberized cluster.
How was this patch tested?
Manually tested.
Was this patch authored or co-authored using generative AI tooling?
No.