FANNG1 commented on code in PR #4005:
URL: https://github.com/apache/gravitino/pull/4005#discussion_r1686637904
##########
catalogs/catalog-lakehouse-iceberg/build.gradle.kts:
##########
@@ -35,45 +35,18 @@ dependencies {
implementation(project(":catalogs:bundled-catalog", configuration =
"shadow"))
implementation(project(":common"))
implementation(project(":core"))
+ implementation(project(":iceberg:iceberg-common"))
implementation(project(":server-common"))
implementation(libs.bundles.iceberg)
- implementation(libs.bundles.jetty)
implementation(libs.bundles.jersey)
+ implementation(libs.bundles.jetty)
+
Review Comment:
done
##########
core/src/main/java/org/apache/gravitino/GravitinoEnv.java:
##########
@@ -119,86 +120,17 @@ public static GravitinoEnv getInstance() {
* Initialize the Gravitino environment.
*
* @param config The configuration object to initialize the environment.
+ * @param isGravitinoServer A boolean flag indicating whether the
initialization is for the
+ * Gravitino server. If true, server-specific components will be
initialized in addition to
+ * the base components.
*/
- public void initialize(Config config) {
+ public void initialize(Config config, boolean isGravitinoServer) {
LOG.info("Initializing Gravitino Environment...");
-
this.config = config;
- this.metricsSystem = new MetricsSystem();
- metricsSystem.register(new JVMMetricsSource());
-
- // Initialize EntityStore
- this.entityStore = EntityStoreFactory.createEntityStore(config);
- entityStore.initialize(config);
-
- // create and initialize a random id generator
- this.idGenerator = new RandomIdGenerator();
-
- this.eventListenerManager = new EventListenerManager();
- eventListenerManager.init(
-
config.getConfigsWithPrefix(EventListenerManager.GRAVITINO_EVENT_LISTENER_PREFIX));
- EventBus eventBus = eventListenerManager.createEventBus();
-
- // Create and initialize metalake related modules
- MetalakeManager metalakeManager = new MetalakeManager(entityStore,
idGenerator);
- MetalakeNormalizeDispatcher metalakeNormalizeDispatcher =
- new MetalakeNormalizeDispatcher(metalakeManager);
- this.metalakeDispatcher = new MetalakeEventDispatcher(eventBus,
metalakeNormalizeDispatcher);
-
- // Create and initialize Catalog related modules
- this.catalogManager = new CatalogManager(config, entityStore, idGenerator);
- CatalogNormalizeDispatcher catalogNormalizeDispatcher =
- new CatalogNormalizeDispatcher(catalogManager);
- this.catalogDispatcher = new CatalogEventDispatcher(eventBus,
catalogNormalizeDispatcher);
-
- SchemaOperationDispatcher schemaOperationDispatcher =
- new SchemaOperationDispatcher(catalogManager, entityStore,
idGenerator);
- SchemaNormalizeDispatcher schemaNormalizeDispatcher =
- new SchemaNormalizeDispatcher(schemaOperationDispatcher,
catalogManager);
- this.schemaDispatcher = new SchemaEventDispatcher(eventBus,
schemaNormalizeDispatcher);
-
- TableOperationDispatcher tableOperationDispatcher =
- new TableOperationDispatcher(catalogManager, entityStore, idGenerator);
- TableNormalizeDispatcher tableNormalizeDispatcher =
- new TableNormalizeDispatcher(tableOperationDispatcher, catalogManager);
- this.tableDispatcher = new TableEventDispatcher(eventBus,
tableNormalizeDispatcher);
-
- PartitionOperationDispatcher partitionOperationDispatcher =
- new PartitionOperationDispatcher(catalogManager, entityStore,
idGenerator);
- // todo: support PartitionEventDispatcher
- this.partitionDispatcher =
- new PartitionNormalizeDispatcher(partitionOperationDispatcher,
catalogManager);
-
- FilesetOperationDispatcher filesetOperationDispatcher =
- new FilesetOperationDispatcher(catalogManager, entityStore,
idGenerator);
- FilesetNormalizeDispatcher filesetNormalizeDispatcher =
- new FilesetNormalizeDispatcher(filesetOperationDispatcher,
catalogManager);
- this.filesetDispatcher = new FilesetEventDispatcher(eventBus,
filesetNormalizeDispatcher);
-
- TopicOperationDispatcher topicOperationDispatcher =
- new TopicOperationDispatcher(catalogManager, entityStore, idGenerator);
- TopicNormalizeDispatcher topicNormalizeDispatcher =
- new TopicNormalizeDispatcher(topicOperationDispatcher, catalogManager);
- this.topicDispatcher = new TopicEventDispatcher(eventBus,
topicNormalizeDispatcher);
-
- // Create and initialize access control related modules
- boolean enableAuthorization = config.get(Configs.ENABLE_AUTHORIZATION);
- if (enableAuthorization) {
- this.accessControlManager = new AccessControlManager(entityStore,
idGenerator, config);
- } else {
- this.accessControlManager = null;
+ initBaseComponent();
Review Comment:
done
--
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]