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


##########
standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/leader/LeaderElectionContext.java:
##########
@@ -100,8 +101,14 @@ public void start() throws Exception {
     Map<TTYPE, List<LeadershipStateListener>> listenerMap = this.listeners;
     if (conf.getBoolean(LEADER_IN_TEST, false)) {
       Map<TTYPE, List<LeadershipStateListener>> newListeners = new HashMap<>();
-      newListeners.put(TTYPE.HOUSEKEEPING, new ArrayList<>());
-      listenerMap.forEach((k, v) -> 
newListeners.get(TTYPE.HOUSEKEEPING).addAll(v));
+      List<LeadershipStateListener> listeners = new ArrayList<>();
+      listenerMap.forEach((k, v) -> listeners.addAll(v));
+      String testListenerCls = conf.get("metastore.leader.test.listener");

Review Comment:
   > We also have some properties such as hive.in*.test for testing purpose
   
   True — those are legacy and should be removed once all tests are refactored 
(I’ve already done this in several cases). 
   However, that’s not a reason to introduce more such configs. The code should 
be structured in a way that makes it easy to test using the existing test 
framework tools.



-- 
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