jerryshao commented on code in PR #4005:
URL: https://github.com/apache/gravitino/pull/4005#discussion_r1682807770
##########
core/src/main/java/org/apache/gravitino/GravitinoEnv.java:
##########
@@ -120,25 +120,29 @@ public static GravitinoEnv getInstance() {
*
* @param config The configuration object to initialize the environment.
*/
- public void initialize(Config config) {
+ public void initialize(Config config, boolean initGravitinoServerComponent) {
LOG.info("Initializing Gravitino Environment...");
this.config = config;
this.metricsSystem = new MetricsSystem();
metricsSystem.register(new JVMMetricsSource());
+ this.eventListenerManager = new EventListenerManager();
+ eventListenerManager.init(
+
config.getConfigsWithPrefix(EventListenerManager.GRAVITINO_EVENT_LISTENER_PREFIX));
+ EventBus eventBus = eventListenerManager.createEventBus();
+
+ if (!initGravitinoServerComponent) {
+ return;
+ }
Review Comment:
The implementation here is quite hacky, it highly relies on where it
returns. I think you'd better refactor the current implementation.
--
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]