jerryshao commented on code in PR #5002:
URL: https://github.com/apache/gravitino/pull/5002#discussion_r1808473193


##########
iceberg/iceberg-rest-server/src/main/java/org/apache/gravitino/iceberg/RESTService.java:
##########
@@ -70,14 +77,25 @@ private void initServer(IcebergConfig icebergConfig) {
         new 
HttpServerMetricsSource(MetricsSource.ICEBERG_REST_SERVER_METRIC_NAME, config, 
server);
     metricsSystem.register(httpServerMetricsSource);
 
-    icebergCatalogWrapperManager = new 
IcebergCatalogWrapperManager(icebergConfig.getAllConfig());
-    icebergMetricsManager = new IcebergMetricsManager(icebergConfig);
+    Map<String, String> configProperties = icebergConfig.getAllConfig();
+    EventBus eventBus = GravitinoEnv.getInstance().eventBus();
+    this.configProvider = 
IcebergConfigProviderFactory.create(configProperties);
+    configProvider.initialize(configProperties);
+    String metalakeName = configProvider.getMetalakeName();
+    this.icebergCatalogWrapperManager =
+        new IcebergCatalogWrapperManager(configProperties, configProvider);
+    this.icebergMetricsManager = new IcebergMetricsManager(icebergConfig);
+    IcebergTableOperationExecutor icebergTableOperationExecutor =
+        new IcebergTableOperationExecutor(icebergCatalogWrapperManager);
+    IcebergTableEventDispatcher icebergTableEventDispatcher =
+        new IcebergTableEventDispatcher(icebergTableOperationExecutor, 
eventBus, metalakeName);

Review Comment:
   Can we add some necessary blank line in this code block to make this code 
block easy to read.



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

Reply via email to