This is an automated email from the ASF dual-hosted git repository.
abstractdog 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 1b1caf9c308 HIVE-27679: Ranger Yarn Queue policies are not applying
correctly, rework done for HIVE-26352 (#4683) (Mahesh Raju Somalaraju reviewed
by Laszlo Bodor and Laszlo Vegh)
1b1caf9c308 is described below
commit 1b1caf9c308769ac8efaf8dbe8965dad5f2efebe
Author: Mahesh Raju Somalaraju <[email protected]>
AuthorDate: Tue Nov 21 17:31:06 2023 +0530
HIVE-27679: Ranger Yarn Queue policies are not applying correctly, rework
done for HIVE-26352 (#4683) (Mahesh Raju Somalaraju reviewed by Laszlo Bodor
and Laszlo Vegh)
---
.../org/apache/hadoop/hive/ql/exec/tez/YarnQueueHelper.java | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git
a/ql/src/java/org/apache/hadoop/hive/ql/exec/tez/YarnQueueHelper.java
b/ql/src/java/org/apache/hadoop/hive/ql/exec/tez/YarnQueueHelper.java
index b41a9188260..c7065156c27 100644
--- a/ql/src/java/org/apache/hadoop/hive/ql/exec/tez/YarnQueueHelper.java
+++ b/ql/src/java/org/apache/hadoop/hive/ql/exec/tez/YarnQueueHelper.java
@@ -93,6 +93,14 @@ public class YarnQueueHelper {
lastKnownGoodUrl = 0;
}
+ /**
+ * Checks yarn queue access of a given user for a given queue, and throws
+ * HiveException in case the user doesn't have access to the queue.
+ * @param queueName the yarn queue name
+ * @param userName the username
+ * @throws IOException when doAs throws an exception, we simply throw it
+ * InterruptedException when doAs throws an exception, we simply throw it
+ */
public void checkQueueAccess(
String queueName, String userName) throws IOException {
UserGroupInformation ugi = UserGroupInformation.getCurrentUser();
@@ -101,8 +109,9 @@ public class YarnQueueHelper {
checkQueueAccessInternal(queueName, userName);
return null;
});
- } catch (Exception exception) {
+ } catch (InterruptedException exception) {
LOG.error("Cannot check queue access against UGI: " + ugi, exception);
+ throw new IOException(exception);
}
}