Skip to content

Commit

Permalink
HIVE-27029: hive query fails with Filesystem closed error, Rework don…
Browse files Browse the repository at this point in the history
…e for HIVE-26352 (Mahesh Raju Somalaraju, reviewed by Laszlo Vegh)
  • Loading branch information
maheshrajus authored and yeahyung committed Jul 20, 2023
1 parent 9886398 commit 9fa5e8f
Showing 1 changed file with 3 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -94,19 +94,15 @@ public YarnQueueHelper(HiveConf conf) {
}

public void checkQueueAccess(
String queueName, String userName) throws IOException, InterruptedException {
String queueName, String userName) throws IOException {
UserGroupInformation ugi = UserGroupInformation.getCurrentUser();
try {
ugi.doAs((PrivilegedExceptionAction<Void>) () -> {
checkQueueAccessInternal(queueName, userName);
return null;
});
} finally {
try {
FileSystem.closeAllForUGI(ugi);
} catch (IOException exception) {
LOG.error("Could not clean up file-system handles for UGI: " + ugi, exception);
}
} catch (Exception exception) {
LOG.error("Cannot check queue access against UGI: " + ugi, exception);
}
}

Expand Down

0 comments on commit 9fa5e8f

Please sign in to comment.