wecharyu commented on code in PR #4448:
URL: https://github.com/apache/hive/pull/4448#discussion_r1248641671
##########
ql/src/java/org/apache/hadoop/hive/ql/security/authorization/plugin/metastore/HiveMetaStoreAuthorizer.java:
##########
@@ -108,7 +110,10 @@ public final void onEvent(PreEventContext preEventContext)
}
} catch (Exception e) {
LOG.error("HiveMetaStoreAuthorizer.onEvent(): failed", e);
- throw new MetaException(e.getMessage());
+ MetaException me = new MetaException(e.getMessage());
+ // Init cause for testing check.
+ me.initCause(e);
Review Comment:
Constructor `public MetaException(MetaException other)` will only set
message, so we can not get cause if we do not call initCause. BTW the causes of
MetaException will not be transported to client side, the most valuable
function to init cause is for RetryingHMSHandler check and root cause check in
server side IMHO.
--
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]