You are viewing a plain text version of this content. The canonical link for it is here.
Posted to gitbox@hive.apache.org by GitBox <gi...@apache.org> on 2021/07/16 02:28:50 UTC
[GitHub] [hive] dengzhhu653 commented on a change in pull request #2435: HIVE-25294: Optimise the metadata count queries for local mode
dengzhhu653 commented on a change in pull request #2435:
URL: https://github.com/apache/hive/pull/2435#discussion_r670920872
##########
File path: standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/HMSHandler.java
##########
@@ -374,9 +362,14 @@ public HMSHandler(String name, Configuration conf, boolean init) throws MetaExce
}
}
}
- if (init) {
- init();
- }
+ }
+
+ @VisibleForTesting
+ public static HMSHandler getInitializedHandler(String name, Configuration conf)
Review comment:
The `init` is set to true only in our tests, the [RetryingHMSHandler](https://github.com/apache/hive/blob/master/standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/RetryingHMSHandler.java#L80) will init the HMSHandler, and HiveMetaStore(including the local mode) uses RetryingHMSHandler to delegate the request to the initialized HMSHandler, so I propose to remove the boolean trick in the constructors, introduces a new method `getInitializedHandler` mainly for the tests.
--
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