diff --git a/hive-1.2/service/src/java/org/apache/hive/service/cli/session/HiveSessionImplwithUGI.java b/hive-1.2/service/src/java/org/apache/hive/service/cli/session/HiveSessionImplwithUGI.java index a29e5d1d..2be9c64c 100644 --- a/hive-1.2/service/src/java/org/apache/hive/service/cli/session/HiveSessionImplwithUGI.java +++ b/hive-1.2/service/src/java/org/apache/hive/service/cli/session/HiveSessionImplwithUGI.java @@ -69,6 +69,7 @@ public void setSessionUGI(String owner) throws HiveSQLException { } if (UserGroupInformation.isSecurityEnabled()) { try { + Hive.closeCurrent(); sessionUgi = UserGroupInformation.createProxyUser( owner, UserGroupInformation.getLoginUser()); } catch (IOException e) {