DanielZhu58 commented on code in PR #6829:
URL: https://github.com/apache/hive/pull/6829#discussion_r4406507521


##########
standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/HMSHandler.java:
##########
@@ -3910,9 +3911,10 @@ public List<RuntimeStat> 
get_runtime_stats(GetRuntimeStatsRequest rqst) throws T
     startFunction("get_runtime_stats");
     Exception ex = null;
     try {
+      authorizeProxyPrivilege();
       List<RuntimeStat> res = getMS().getRuntimeStats(rqst.getMaxWeight(), 
rqst.getMaxCreateTime());
       return res;
-    } catch (MetaException e) {
+    } catch (Exception e) {

Review Comment:
   The catch (MetaException) was needed because a failure from 
authorizeProxyPrivilege() is a TException, which that catch wouldn't see. A 
denied call would skip the error log, and endFunction would record it as a 
success. I changed it to catch (TException e). MetaException is a subclass, so 
existing behavior is kept, and I left it as a log-and-rethrow like before.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to