mchades commented on code in PR #13367:
URL: https://github.com/apache/gravitino/pull/13367#discussion_r4060306555
##########
core/src/main/java/org/apache/gravitino/GravitinoEnv.java:
##########
@@ -739,13 +771,26 @@ public StatisticDispatcher statisticDispatcher() {
return statisticDispatcher;
}
+ /**
+ * Get the internal StatisticDispatcher associated with the Gravitino
environment.
+ *
+ * @return The internal StatisticDispatcher instance.
+ */
+ public StatisticDispatcher internalStatisticDispatcher() {
+ Preconditions.checkArgument(
+ internalStatisticDispatcher != null, "GravitinoEnv is not
initialized.");
+ return internalStatisticDispatcher;
Review Comment:
There is no in-repo production caller for these two accessors today. They
are intentionally part of the metadata-profile boundary: the profile
initializes the internal partition and statistic dispatchers while leaving
their event-dispatching counterparts unavailable. Making the accessors
package-private would make those initialized capabilities inaccessible to
out-of-package embedded consumers and would also differ from the existing
public `internal*Dispatcher()` accessors. Updated in `d8a01334d2`:
`internalPartitionDispatcher()` now enforces the same initialized-state
precondition as `internalStatisticDispatcher()`, and the test covers both
accessors before initialization.
--
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]