aswinshakil commented on code in PR #4244:
URL: https://github.com/apache/ozone/pull/4244#discussion_r1117828958


##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/KeyManagerImpl.java:
##########
@@ -262,6 +268,24 @@ public void start(OzoneConfiguration configuration) {
         snapshotSstFilteringService.start();
       }
     }
+
+    if (snapshotDeletingService == null) {
+      long snapshotServiceInterval = configuration.getTimeDuration(
+          OZONE_SNAPSHOT_DELETION_SERVICE_INTERVAL,
+          OZONE_SNAPSHOT_DELETION_SERVICE_INTERVAL_DEFAULT,
+          TimeUnit.MILLISECONDS);
+      long snapshotServiceTimeout = configuration.getTimeDuration(
+          OZONE_SNAPSHOT_DELETION_SERVICE_TIMEOUT,
+          OZONE_SNAPSHOT_DELETION_SERVICE_TIMEOUT_DEFAULT,
+          TimeUnit.MILLISECONDS);
+      try {
+        snapshotDeletingService = new SnapshotDeletingService(
+            snapshotServiceInterval, snapshotServiceTimeout, ozoneManager);
+        snapshotDeletingService.start();

Review Comment:
   Yes it only runs on leader OM, the check is done here `shouldRun()`



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

Reply via email to