Skip to content

Commit

Permalink
HIVE-28209: Allow the use of a proxy user (apache#5233)
Browse files Browse the repository at this point in the history
* HIVE-28209 Allow the use of a proxy user

The log message indicates that `HADOOP_PROXY_USER` is set, but then doesn't allow its use by calling `getRealUser()` which will be `null`.  This change allows delegation for HiveMetaStore connections.

* Use getRealUserOrSelf from more recent Hadoop

---------

Co-authored-by: Steve Vaughan Jr <[email protected]>
  • Loading branch information
snmvaughan and Steve Vaughan Jr authored May 2, 2024
1 parent 636b0d3 commit e197890
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ public HiveMetaStoreClient(Configuration conf, HiveMetaHookLoader hookLoader, Bo
LOG.info(HADOOP_PROXY_USER + " is set. Using delegation "
+ "token for HiveMetaStore connection.");
try {
UserGroupInformation.getLoginUser().getRealUser().doAs(
UserGroupInformation.getRealUserOrSelf(UserGroupInformation.getLoginUser()).doAs(
new PrivilegedExceptionAction<Void>() {
@Override
public Void run() throws Exception {
Expand Down

0 comments on commit e197890

Please sign in to comment.