jerryshao commented on code in PR #4261:
URL: https://github.com/apache/gravitino/pull/4261#discussion_r1696719126
##########
core/src/main/java/org/apache/gravitino/GravitinoEnv.java:
##########
@@ -220,6 +220,26 @@ public IdGenerator idGenerator() {
return idGenerator;
}
+ /**
+ * Get the CatalogManager associated with the Gravitino environment.
+ *
+ * @return The CatalogManager instance.
+ */
+ public CatalogManager catalogManager() {
+ Preconditions.checkNotNull(catalogManager, "GravitinoEnv is not
initialized.");
+ return catalogManager;
+ }
+
+ /**
+ * Get the EventBus associated with the Gravitino environment.
+ *
+ * @return The EventBus instance.
+ */
+ public EventBus eventBus() {
+ Preconditions.checkNotNull(eventBus, "GravitinoEnv is not initialized.");
Review Comment:
I remembered that for Iceberg rest service, some modules will not enabled,
so it will be null, can you please confirm this with @FANNG1 , also use
`checkArgument` not `checkNotNull`.
--
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]