DanielZhu58 commented on code in PR #6829:
URL: https://github.com/apache/hive/pull/6829#discussion_r4406588637
##########
standalone-metastore/metastore-server/src/test/java/org/apache/hadoop/hive/metastore/client/MetaStoreClientTest.java:
##########
@@ -74,9 +74,14 @@ public static void startMetaStores() {
*/
public static void startMetaStores(Map<MetastoreConf.ConfVars, String>
msConf,
Map<String, String> extraConf) {
+ // The Remote mini-HMS flips the static HiveMetaStore.isMetaStoreRemote
flag for the whole JVM, so the
+ // proxy-privilege check (authorizeProxyPrivilege) would also apply to the
Embedded variant and to the
+ // test user. Disable it unless a test explicitly sets it.
+ Map<String, String> effectiveExtraConf = new HashMap<>(extraConf);
+
effectiveExtraConf.putIfAbsent(MetastoreConf.ConfVars.EVENT_DB_NOTIFICATION_API_AUTH.getVarname(),
"false");
Review Comment:
Yes. Without it, the Jenkins run for this PR had 24 failures. I also
reproduced them locally.
The Remote mini-HMS sets the static HiveMetaStore.isMetaStoreRemote flag for
the whole JVM. The Embedded variant and the non-proxy test user then hit the
new authorizeProxyPrivilege() check ("User … is not allowed to perform this API
call"). Only three test classes call the newly guarded APIs: TestRuntimeStats,
TestReplicationMetrics and TestGetAllWriteEventInfo. I removed the default from
the shared MetaStoreClientTest. Those three now set
metastore.event.db.notification.api.auth=false themselves, the same per-class
@BeforeClass pattern TestDropTable and others use. No other MetaStoreClientTest
subclass is affected.
--
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]