You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hive.apache.org by pr...@apache.org on 2019/06/24 22:38:39 UTC
[hive] branch branch-3 updated: HIVE-21913: GenericUDTFGetSplits
should handle usernames in the same way as LLAP (Prasanth Jayachandran
reviewed by Jason Dere)
This is an automated email from the ASF dual-hosted git repository.
prasanthj pushed a commit to branch branch-3
in repository https://gitbox.apache.org/repos/asf/hive.git
The following commit(s) were added to refs/heads/branch-3 by this push:
new 2b0af5e HIVE-21913: GenericUDTFGetSplits should handle usernames in the same way as LLAP (Prasanth Jayachandran reviewed by Jason Dere)
2b0af5e is described below
commit 2b0af5e184afc60c95214dc7e14868a3c43a99b2
Author: Prasanth Jayachandran <pr...@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;