devmadhuu commented on code in PR #8856:
URL: https://github.com/apache/ozone/pull/8856#discussion_r2240384080
##########
hadoop-ozone/recon/src/main/java/org/apache/hadoop/ozone/recon/ReconUtils.java:
##########
@@ -111,6 +109,43 @@ public class ReconUtils {
public ReconUtils() {
}
+ /**
+ * Get the current rebuild state of NSSummary tree.
+ * Delegates to NSSummaryTask's unified control mechanism.
+ *
+ * @return current RebuildState from NSSummaryTask
+ */
+ public static org.apache.hadoop.ozone.recon.tasks.NSSummaryTask.RebuildState
getNSSummaryRebuildState() {
+ return org.apache.hadoop.ozone.recon.tasks.NSSummaryTask.getRebuildState();
+ }
+
+ /**
+ * Convenience method to trigger asynchronous NSSummary tree rebuild.
+ * Uses the unified control mechanism in NSSummaryTask.
+ *
+ * @param reconNamespaceSummaryManager The namespace summary manager
+ * @param omMetadataManager The OM metadata manager
+ * @return true if rebuild was triggered successfully, false otherwise
+ */
+ public static boolean triggerAsyncNSSummaryRebuild(
+ ReconNamespaceSummaryManager reconNamespaceSummaryManager,
+ ReconOMMetadataManager omMetadataManager) {
+
+ // Submit rebuild task to single thread executor for async execution
+ NSSUMMARY_REBUILD_EXECUTOR.submit(() -> {
Review Comment:
No, state of reprocess of NSSummary is not controlled from this method. This
is only to submit, actual control is in reprocess method of NSSummary task
class because some code flows are calling this reprocess method directly. So
state is controlled in that method.
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]