You are viewing a plain text version of this content. The canonical link for it is here.
Posted to gitbox@hive.apache.org by "deniskuzZ (via GitHub)" <gi...@apache.org> on 2023/08/25 12:35:40 UTC

[GitHub] [hive] deniskuzZ commented on a diff in pull request #4448: HIVE-27461: HiveMetaStoreAuthorizer lost the root cause of checkPrivileges

deniskuzZ commented on code in PR #4448:
URL: https://github.com/apache/hive/pull/4448#discussion_r1305604942


##########
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:
   @wecharyu please check `MetaStoreUtils.newMetaException(Exception e)`
   ````
   public static MetaException newMetaException(String errorMessage, Exception e) {
       MetaException metaException = new MetaException(errorMessage);
       if (e != null) {
         metaException.initCause(e);
       }
       return metaException;
     }
   ````



-- 
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: gitbox-unsubscribe@hive.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org