FANNG1 commented on code in PR #4005:
URL: https://github.com/apache/gravitino/pull/4005#discussion_r1684005626
##########
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:
done, use `initBaseComponent` and `initGravitinoServerComponent` to separate
the logic
--
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]