diff --git shims/common/src/main/java/org/apache/hadoop/hive/shims/Utils.java shims/common/src/main/java/org/apache/hadoop/hive/shims/Utils.java index b898343..14f9ae8 100644 --- shims/common/src/main/java/org/apache/hadoop/hive/shims/Utils.java +++ shims/common/src/main/java/org/apache/hadoop/hive/shims/Utils.java @@ -41,7 +41,7 @@ public static UserGroupInformation getUGI() throws LoginException, IOException { String doAs = System.getenv("HADOOP_USER_NAME"); - if(doAs != null && doAs.length() > 0) { + if(doAs != null && doAs.length() > 0 && !doAs.equals(UserGroupInformation.getCurrentUser().getUserName())) { /* * this allows doAs (proxy user) to be passed along across process boundary where * delegation tokens are not supported. For example, a DDL stmt via WebHCat with