dengzhhu653 commented on code in PR #6142:
URL: https://github.com/apache/hive/pull/6142#discussion_r2453566270
##########
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:
Agreed, IMO we need to trade off between the test coverage and the
maintenance(code smell), and reach a balance. We also have some properties such
as `hive.in*.test` for testing purpose.
--
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]