This is an automated email from the ASF dual-hosted git repository. prasanthj pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/hive.git
The following commit(s) were added to refs/heads/master by this push: new 84b5ba7 HIVE-21913: GenericUDTFGetSplits should handle usernames in the same way as LLAP (Prasanth Jayachandran reviewed by Jason Dere) 84b5ba7 is described below commit 84b5ba7ac9f93c6a496386db91ae4cd5ab7a451d Author: Prasanth Jayachandran <prasan...@apache.org> AuthorDate: Mon Jun 24 15:37:54 2019 -0700 HIVE-21913: GenericUDTFGetSplits should handle usernames in the same way as LLAP (Prasanth Jayachandran reviewed by Jason Dere) --- .../org/apache/hadoop/hive/ql/udf/generic/GenericUDTFGetSplits.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDTFGetSplits.java b/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDTFGetSplits.java index 30673ce..c925a3f 100644 --- a/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDTFGetSplits.java +++ b/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDTFGetSplits.java @@ -93,6 +93,7 @@ import org.apache.hadoop.io.Text; import org.apache.hadoop.mapred.InputSplit; import org.apache.hadoop.mapred.JobConf; import org.apache.hadoop.mapred.SplitLocationInfo; +import org.apache.hadoop.registry.client.binding.RegistryUtils; import org.apache.hadoop.security.UserGroupInformation; import org.apache.hadoop.security.token.Token; import org.apache.hadoop.yarn.api.records.ApplicationId; @@ -441,7 +442,7 @@ public class GenericUDTFGetSplits extends GenericUDTF { } // This assumes LLAP cluster owner is always the HS2 user. - String llapUser = UserGroupInformation.getLoginUser().getShortUserName(); + String llapUser = RegistryUtils.currentUser(); String queryUser = null; byte[] tokenBytes = null;