From 9520466aaca82ab1dcbc12b25d3a3d05e6a4510a Mon Sep 17 00:00:00 2001 From: Siyao Meng <50227127+smengcl@users.noreply.github.com> Date: Thu, 17 Jul 2025 15:49:24 -0700 Subject: [PATCH 1/7] HDDS-13464. Make ozone.snapshot.filtering.service.interval reconfigurable --- .../hadoop/ozone/om/KeyManagerImpl.java | 46 +++++++++++++------ .../apache/hadoop/ozone/om/OzoneManager.java | 24 +++++++++- .../hadoop/ozone/om/SstFilteringService.java | 1 + 3 files changed, 56 insertions(+), 15 deletions(-) diff --git a/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/KeyManagerImpl.java b/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/KeyManagerImpl.java index bd186df16843..80b0c9df28b0 100644 --- a/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/KeyManagerImpl.java +++ b/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/KeyManagerImpl.java @@ -307,20 +307,7 @@ public void start(OzoneConfiguration configuration) { if (snapshotSstFilteringService == null && ozoneManager.isFilesystemSnapshotEnabled()) { - long serviceInterval = configuration.getTimeDuration( - OZONE_SNAPSHOT_SST_FILTERING_SERVICE_INTERVAL, - OZONE_SNAPSHOT_SST_FILTERING_SERVICE_INTERVAL_DEFAULT, - TimeUnit.MILLISECONDS); - long serviceTimeout = configuration.getTimeDuration( - OZONE_SNAPSHOT_SST_FILTERING_SERVICE_TIMEOUT, - OZONE_SNAPSHOT_SST_FILTERING_SERVICE_TIMEOUT_DEFAULT, - TimeUnit.MILLISECONDS); - if (isSstFilteringSvcEnabled()) { - snapshotSstFilteringService = - new SstFilteringService(serviceInterval, TimeUnit.MILLISECONDS, - serviceTimeout, ozoneManager, configuration); - snapshotSstFilteringService.start(); - } + startSnapshotSstFilteringService(configuration); } if (snapshotDeletingService == null && @@ -370,6 +357,37 @@ public void start(OzoneConfiguration configuration) { : new CachedDNSToSwitchMapping(newInstance)); } + /** + * Start the snapshot SST filtering service if interval is not set to disabled value. + * @param conf + */ + public void startSnapshotSstFilteringService(OzoneConfiguration conf) { + long serviceInterval = conf.getTimeDuration( + OZONE_SNAPSHOT_SST_FILTERING_SERVICE_INTERVAL, + OZONE_SNAPSHOT_SST_FILTERING_SERVICE_INTERVAL_DEFAULT, + TimeUnit.MILLISECONDS); + long serviceTimeout = conf.getTimeDuration( + OZONE_SNAPSHOT_SST_FILTERING_SERVICE_TIMEOUT, + OZONE_SNAPSHOT_SST_FILTERING_SERVICE_TIMEOUT_DEFAULT, + TimeUnit.MILLISECONDS); + if (isSstFilteringSvcEnabled()) { + snapshotSstFilteringService = + new SstFilteringService(serviceInterval, TimeUnit.MILLISECONDS, + serviceTimeout, ozoneManager, conf); + snapshotSstFilteringService.start(); + } else { + LOG.debug("Snapshot SST filtering service is disabled."); + } + } + + public void restartSnapshotSstFilteringService(OzoneConfiguration conf) { + if (snapshotSstFilteringService != null) { + snapshotSstFilteringService.shutdown(); + snapshotSstFilteringService = null; + } + startSnapshotSstFilteringService(conf); + } + private void startCompactionService(OzoneConfiguration configuration, boolean isCompactionServiceEnabled) { if (compactionService == null && isCompactionServiceEnabled) { diff --git a/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/OzoneManager.java b/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/OzoneManager.java index a5df1337dc0d..38db8e87a5ee 100644 --- a/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/OzoneManager.java +++ b/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/OzoneManager.java @@ -83,6 +83,7 @@ import static org.apache.hadoop.ozone.om.OMConfigKeys.OZONE_SERVER_DEFAULT_REPLICATION_KEY; import static org.apache.hadoop.ozone.om.OMConfigKeys.OZONE_SERVER_DEFAULT_REPLICATION_TYPE_DEFAULT; import static org.apache.hadoop.ozone.om.OMConfigKeys.OZONE_SERVER_DEFAULT_REPLICATION_TYPE_KEY; +import static org.apache.hadoop.ozone.om.OMConfigKeys.OZONE_SNAPSHOT_SST_FILTERING_SERVICE_INTERVAL; import static org.apache.hadoop.ozone.om.OMConfigKeys.OZONE_THREAD_NUMBER_DIR_DELETION; import static org.apache.hadoop.ozone.om.exceptions.OMException.ResultCodes.DETECTED_LOOP_IN_BUCKET_LINKS; import static org.apache.hadoop.ozone.om.exceptions.OMException.ResultCodes.FEATURE_NOT_ENABLED; @@ -527,7 +528,8 @@ private OzoneManager(OzoneConfiguration conf, StartupOption startupOption) .register(OZONE_KEY_DELETING_LIMIT_PER_TASK, this::reconfOzoneKeyDeletingLimitPerTask) .register(OZONE_DIR_DELETING_SERVICE_INTERVAL, this::reconfOzoneDirDeletingServiceInterval) - .register(OZONE_THREAD_NUMBER_DIR_DELETION, this::reconfOzoneThreadNumberDirDeletion); + .register(OZONE_THREAD_NUMBER_DIR_DELETION, this::reconfOzoneThreadNumberDirDeletion) + .register(OZONE_SNAPSHOT_SST_FILTERING_SERVICE_INTERVAL, this::reconfOzoneSSTFilteringServiceInterval); reconfigurationHandler.setReconfigurationCompleteCallback(reconfigurationHandler.defaultLoggingCallback()); @@ -5206,6 +5208,26 @@ private String reconfOzoneThreadNumberDirDeletion(String newVal) { return newVal; } + private String reconfOzoneSSTFilteringServiceInterval(String newVal) { + getConfiguration().set(OZONE_SNAPSHOT_SST_FILTERING_SERVICE_INTERVAL, newVal); + + if (this.isFilesystemSnapshotEnabled()) { + if (((KeyManagerImpl) keyManager).isSstFilteringSvcEnabled()) { + LOG.info("Restarting SST filtering service as {} is reconfigured to {}", + OZONE_SNAPSHOT_SST_FILTERING_SERVICE_INTERVAL, newVal); + // Sanity check + Preconditions.checkNotNull(keyManager.getSnapshotSstFilteringService(), + "sstFilteringService should not be null when SST filtering service is enabled."); + + ((KeyManagerImpl) keyManager).restartSnapshotSstFilteringService(getConfiguration()); + } + } else { + LOG.warn("Ozone filesystem snapshot is not enabled. {} is reconfigured but will not make any difference.", + OZONE_SNAPSHOT_SST_FILTERING_SERVICE_INTERVAL); + } + return newVal; + } + public void validateReplicationConfig(ReplicationConfig replicationConfig) throws OMException { try { diff --git a/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/SstFilteringService.java b/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/SstFilteringService.java index b94fd45bf7fb..eb299064c719 100644 --- a/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/SstFilteringService.java +++ b/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/SstFilteringService.java @@ -257,6 +257,7 @@ public BootstrapStateHandler.Lock getBootstrapStateLock() { @Override public void shutdown() { + LOG.debug("Shutting down SstFilteringService"); running.set(false); super.shutdown(); } From d3cdefb2025ff796f0838fb93cd68bc4f83580b1 Mon Sep 17 00:00:00 2001 From: Siyao Meng <50227127+smengcl@users.noreply.github.com> Date: Mon, 21 Jul 2025 14:21:20 -0700 Subject: [PATCH 2/7] Adjust log messages. --- .../main/java/org/apache/hadoop/ozone/om/KeyManagerImpl.java | 2 +- .../java/org/apache/hadoop/ozone/om/SstFilteringService.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/KeyManagerImpl.java b/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/KeyManagerImpl.java index 80b0c9df28b0..6f28bec771c5 100644 --- a/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/KeyManagerImpl.java +++ b/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/KeyManagerImpl.java @@ -376,7 +376,7 @@ public void startSnapshotSstFilteringService(OzoneConfiguration conf) { serviceTimeout, ozoneManager, conf); snapshotSstFilteringService.start(); } else { - LOG.debug("Snapshot SST filtering service is disabled."); + LOG.info("SstFilteringService is disabled."); } } diff --git a/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/SstFilteringService.java b/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/SstFilteringService.java index eb299064c719..5232a4e517b0 100644 --- a/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/SstFilteringService.java +++ b/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/SstFilteringService.java @@ -257,7 +257,7 @@ public BootstrapStateHandler.Lock getBootstrapStateLock() { @Override public void shutdown() { - LOG.debug("Shutting down SstFilteringService"); + LOG.info("Shutting down SstFilteringService"); running.set(false); super.shutdown(); } From 6712c674b308fda578d95b5d8691f70692ce348a Mon Sep 17 00:00:00 2001 From: Siyao Meng <50227127+smengcl@users.noreply.github.com> Date: Mon, 21 Jul 2025 16:29:52 -0700 Subject: [PATCH 3/7] Add tests; Impl start --- .../ozone/reconfig/TestOmReconfiguration.java | 62 +++++++++++++++++++ .../hadoop/ozone/om/KeyManagerImpl.java | 11 +++- .../apache/hadoop/ozone/om/OzoneManager.java | 14 +++-- 3 files changed, 82 insertions(+), 5 deletions(-) diff --git a/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/reconfig/TestOmReconfiguration.java b/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/reconfig/TestOmReconfiguration.java index 2711982661d2..48113799e069 100644 --- a/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/reconfig/TestOmReconfiguration.java +++ b/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/reconfig/TestOmReconfiguration.java @@ -23,14 +23,20 @@ import static org.apache.hadoop.ozone.om.OMConfigKeys.OZONE_KEY_DELETING_LIMIT_PER_TASK; import static org.apache.hadoop.ozone.om.OMConfigKeys.OZONE_OM_VOLUME_LISTALL_ALLOWED; import static org.apache.hadoop.ozone.om.OMConfigKeys.OZONE_OM_VOLUME_LISTALL_ALLOWED_DEFAULT; +import static org.apache.hadoop.ozone.om.OMConfigKeys.OZONE_SNAPSHOT_SST_FILTERING_SERVICE_INTERVAL; import static org.apache.hadoop.ozone.om.OMConfigKeys.OZONE_THREAD_NUMBER_DIR_DELETION; import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertNull; +import static org.junit.jupiter.api.Assertions.assertTrue; import com.google.common.collect.ImmutableSet; import java.util.Set; import org.apache.commons.lang3.RandomStringUtils; import org.apache.hadoop.conf.ReconfigurationException; import org.apache.hadoop.hdds.conf.ReconfigurationHandler; +import org.apache.hadoop.ozone.om.KeyManagerImpl; import org.apache.hadoop.ozone.om.OmConfig; import org.junit.jupiter.api.Test; import org.junit.jupiter.params.ParameterizedTest; @@ -55,6 +61,7 @@ void reconfigurableProperties() { .add(OZONE_READONLY_ADMINISTRATORS) .add(OZONE_DIR_DELETING_SERVICE_INTERVAL) .add(OZONE_THREAD_NUMBER_DIR_DELETION) + .add(OZONE_SNAPSHOT_SST_FILTERING_SERVICE_INTERVAL) .addAll(new OmConfig().reconfigurableProperties()) .build(); @@ -125,4 +132,59 @@ void unsetAllowListAllVolumes(String newValue) throws ReconfigurationException { assertEquals(OZONE_OM_VOLUME_LISTALL_ALLOWED_DEFAULT, cluster().getOzoneManager().getAllowListAllVolumes()); } + @Test + void sstFilteringServiceInterval() throws ReconfigurationException { + // Tests reconfiguration of SST filtering service interval + + // Get the original interval value + String originalValue = cluster().getOzoneManager().getConfiguration() + .get(OZONE_SNAPSHOT_SST_FILTERING_SERVICE_INTERVAL); + // Verify the original value is valid (should be larger than -1) + long originalInterval = cluster().getOzoneManager().getConfiguration() + .getTimeDuration(OZONE_SNAPSHOT_SST_FILTERING_SERVICE_INTERVAL, + org.apache.hadoop.ozone.om.OMConfigKeys.OZONE_SNAPSHOT_SST_FILTERING_SERVICE_INTERVAL_DEFAULT, + java.util.concurrent.TimeUnit.MILLISECONDS); + assertTrue(originalInterval > -1, "Original interval should be greater than -1"); + + // 1. Test reconfiguring to a different valid interval (30 seconds) + // This should restart the SstFilteringService + final String newIntervalValue = "30s"; + getSubject().reconfigurePropertyImpl(OZONE_SNAPSHOT_SST_FILTERING_SERVICE_INTERVAL, newIntervalValue); + assertEquals(newIntervalValue, cluster().getOzoneManager().getConfiguration() + .get(OZONE_SNAPSHOT_SST_FILTERING_SERVICE_INTERVAL)); + // Verify the service is still enabled with the new interval + assertTrue(((org.apache.hadoop.ozone.om.KeyManagerImpl) cluster().getOzoneManager().getKeyManager()) + .isSstFilteringSvcEnabled(), "SstFilteringService should remain enabled with new interval"); + assertNotNull(cluster().getOzoneManager().getKeyManager().getSnapshotSstFilteringService(), + "SstFilteringService should not be null with new interval"); + // Verify the new interval is applied (30 seconds = 30000 milliseconds) + long newInterval = cluster().getOzoneManager().getConfiguration() + .getTimeDuration(OZONE_SNAPSHOT_SST_FILTERING_SERVICE_INTERVAL, + org.apache.hadoop.ozone.om.OMConfigKeys.OZONE_SNAPSHOT_SST_FILTERING_SERVICE_INTERVAL_DEFAULT, + java.util.concurrent.TimeUnit.MILLISECONDS); + assertEquals(30000, newInterval, "New interval should be 30 seconds (30000ms)"); + + // 2. Service should stop when interval is reconfigured to -1 + final String disableValue = String.valueOf(KeyManagerImpl.DISABLE_VALUE); + getSubject().reconfigurePropertyImpl(OZONE_SNAPSHOT_SST_FILTERING_SERVICE_INTERVAL, disableValue); + assertEquals(disableValue, cluster().getOzoneManager().getConfiguration() + .get(OZONE_SNAPSHOT_SST_FILTERING_SERVICE_INTERVAL)); + // Verify that the SstFilteringService is stopped + assertFalse(((org.apache.hadoop.ozone.om.KeyManagerImpl) cluster().getOzoneManager().getKeyManager()) + .isSstFilteringSvcEnabled(), "SstFilteringService should be disabled when interval is -1"); + assertNull(cluster().getOzoneManager().getKeyManager().getSnapshotSstFilteringService(), + "SstFilteringService should be null when disabled"); + + // Set the interval back to the original value + // Service should be started again when reconfigured to a valid value + getSubject().reconfigurePropertyImpl(OZONE_SNAPSHOT_SST_FILTERING_SERVICE_INTERVAL, originalValue); + assertEquals(originalValue, cluster().getOzoneManager().getConfiguration() + .get(OZONE_SNAPSHOT_SST_FILTERING_SERVICE_INTERVAL)); + // Verify that the SstFilteringService is running again + assertTrue(((org.apache.hadoop.ozone.om.KeyManagerImpl) cluster().getOzoneManager().getKeyManager()) + .isSstFilteringSvcEnabled(), "SstFilteringService should be enabled after restoring original interval"); + assertNotNull(cluster().getOzoneManager().getKeyManager().getSnapshotSstFilteringService(), + "SstFilteringService should not be null when enabled"); + } + } diff --git a/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/KeyManagerImpl.java b/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/KeyManagerImpl.java index 6f28bec771c5..be2d82440f01 100644 --- a/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/KeyManagerImpl.java +++ b/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/KeyManagerImpl.java @@ -380,11 +380,20 @@ public void startSnapshotSstFilteringService(OzoneConfiguration conf) { } } - public void restartSnapshotSstFilteringService(OzoneConfiguration conf) { + /** + * Stop the snapshot SST filtering service if it is running. + */ + public void stopSnapshotSstFilteringService() { if (snapshotSstFilteringService != null) { snapshotSstFilteringService.shutdown(); snapshotSstFilteringService = null; + } else { + LOG.info("SstFilteringService is already stopped or not started."); } + } + + public void restartSnapshotSstFilteringService(OzoneConfiguration conf) { + stopSnapshotSstFilteringService(); startSnapshotSstFilteringService(conf); } diff --git a/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/OzoneManager.java b/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/OzoneManager.java index 38db8e87a5ee..dbd4779ef182 100644 --- a/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/OzoneManager.java +++ b/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/OzoneManager.java @@ -529,7 +529,7 @@ private OzoneManager(OzoneConfiguration conf, StartupOption startupOption) this::reconfOzoneKeyDeletingLimitPerTask) .register(OZONE_DIR_DELETING_SERVICE_INTERVAL, this::reconfOzoneDirDeletingServiceInterval) .register(OZONE_THREAD_NUMBER_DIR_DELETION, this::reconfOzoneThreadNumberDirDeletion) - .register(OZONE_SNAPSHOT_SST_FILTERING_SERVICE_INTERVAL, this::reconfOzoneSSTFilteringServiceInterval); + .register(OZONE_SNAPSHOT_SST_FILTERING_SERVICE_INTERVAL, this::reconfFSSnapshotSSTFilteringServiceInterval); reconfigurationHandler.setReconfigurationCompleteCallback(reconfigurationHandler.defaultLoggingCallback()); @@ -5208,18 +5208,24 @@ private String reconfOzoneThreadNumberDirDeletion(String newVal) { return newVal; } - private String reconfOzoneSSTFilteringServiceInterval(String newVal) { + private String reconfFSSnapshotSSTFilteringServiceInterval(String newVal) { + boolean wasSstFilteringSvcEnabled = ((KeyManagerImpl) keyManager).isSstFilteringSvcEnabled(); getConfiguration().set(OZONE_SNAPSHOT_SST_FILTERING_SERVICE_INTERVAL, newVal); if (this.isFilesystemSnapshotEnabled()) { - if (((KeyManagerImpl) keyManager).isSstFilteringSvcEnabled()) { - LOG.info("Restarting SST filtering service as {} is reconfigured to {}", + if (wasSstFilteringSvcEnabled) { + LOG.info("Restarting SstFilteringService as {} is reconfigured to {}", OZONE_SNAPSHOT_SST_FILTERING_SERVICE_INTERVAL, newVal); // Sanity check Preconditions.checkNotNull(keyManager.getSnapshotSstFilteringService(), "sstFilteringService should not be null when SST filtering service is enabled."); ((KeyManagerImpl) keyManager).restartSnapshotSstFilteringService(getConfiguration()); + } else { + // Start SstFilteringService + LOG.info("Starting SstFilteringService as {} is reconfigured to {}", + OZONE_SNAPSHOT_SST_FILTERING_SERVICE_INTERVAL, newVal); + ((KeyManagerImpl) keyManager).startSnapshotSstFilteringService(getConfiguration()); } } else { LOG.warn("Ozone filesystem snapshot is not enabled. {} is reconfigured but will not make any difference.", From 2a317bc44318d40edec21150df0c74170d200bd8 Mon Sep 17 00:00:00 2001 From: Siyao Meng <50227127+smengcl@users.noreply.github.com> Date: Mon, 21 Jul 2025 19:29:54 -0700 Subject: [PATCH 4/7] Clean up code; Improve config value check --- .../apache/hadoop/fs/ozone/TestOzoneFsSnapshot.java | 2 +- .../apache/hadoop/ozone/om/TestOMRatisSnapshots.java | 2 +- .../hadoop/ozone/om/snapshot/TestOmSnapshot.java | 2 +- .../hadoop/ozone/reconfig/TestOmReconfiguration.java | 5 ++--- .../org/apache/hadoop/ozone/om/KeyManagerImpl.java | 10 ++-------- .../org/apache/hadoop/ozone/om/OzoneManager.java | 12 +++--------- .../apache/hadoop/ozone/om/SstFilteringService.java | 1 - 7 files changed, 10 insertions(+), 24 deletions(-) diff --git a/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/fs/ozone/TestOzoneFsSnapshot.java b/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/fs/ozone/TestOzoneFsSnapshot.java index 0291b556c6e0..08b8ab21426c 100644 --- a/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/fs/ozone/TestOzoneFsSnapshot.java +++ b/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/fs/ozone/TestOzoneFsSnapshot.java @@ -93,7 +93,7 @@ static void initClass() throws Exception { // Enable filesystem snapshot feature for the test regardless of the default conf.setBoolean(OMConfigKeys.OZONE_FILESYSTEM_SNAPSHOT_ENABLED_KEY, true); conf.setTimeDuration(OZONE_SNAPSHOT_DELETING_SERVICE_INTERVAL, 1, TimeUnit.SECONDS); - conf.setInt(OZONE_SNAPSHOT_SST_FILTERING_SERVICE_INTERVAL, KeyManagerImpl.DISABLE_VALUE); + conf.setInt(OZONE_SNAPSHOT_SST_FILTERING_SERVICE_INTERVAL, -1); conf.setInt(OmConfig.Keys.SERVER_LIST_MAX_SIZE, 20); conf.setInt(OZONE_FS_LISTING_PAGE_SIZE, 30); diff --git a/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/om/TestOMRatisSnapshots.java b/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/om/TestOMRatisSnapshots.java index fb8d6b30146e..c29f7edbf597 100644 --- a/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/om/TestOMRatisSnapshots.java +++ b/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/om/TestOMRatisSnapshots.java @@ -412,7 +412,7 @@ public void testInstallIncrementalSnapshot(@TempDir Path tempDir) SnapshotInfo snapshotInfo2 = createOzoneSnapshot(leaderOM, "snap100"); followerOM.getConfiguration().setInt( OZONE_SNAPSHOT_SST_FILTERING_SERVICE_INTERVAL, - KeyManagerImpl.DISABLE_VALUE); + -1); // Start the inactive OM. Checkpoint installation will happen spontaneously. cluster.startInactiveOM(followerNodeId); diff --git a/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/om/snapshot/TestOmSnapshot.java b/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/om/snapshot/TestOmSnapshot.java index 366f61990f4c..038fc491fe71 100644 --- a/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/om/snapshot/TestOmSnapshot.java +++ b/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/om/snapshot/TestOmSnapshot.java @@ -227,7 +227,7 @@ private void init() throws Exception { conf.setBoolean(OMConfigKeys.OZONE_FILESYSTEM_SNAPSHOT_ENABLED_KEY, true); conf.setInt(OMStorage.TESTING_INIT_LAYOUT_VERSION_KEY, OMLayoutFeature.BUCKET_LAYOUT_SUPPORT.layoutVersion()); conf.setTimeDuration(OZONE_SNAPSHOT_DELETING_SERVICE_INTERVAL, 1, TimeUnit.SECONDS); - conf.setInt(OZONE_SNAPSHOT_SST_FILTERING_SERVICE_INTERVAL, KeyManagerImpl.DISABLE_VALUE); + conf.setInt(OZONE_SNAPSHOT_SST_FILTERING_SERVICE_INTERVAL, -1); if (!disableNativeDiff) { conf.setTimeDuration(OZONE_OM_SNAPSHOT_COMPACTION_DAG_PRUNE_DAEMON_RUN_INTERVAL, 0, TimeUnit.SECONDS); } diff --git a/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/reconfig/TestOmReconfiguration.java b/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/reconfig/TestOmReconfiguration.java index 48113799e069..4478f1c53885 100644 --- a/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/reconfig/TestOmReconfiguration.java +++ b/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/reconfig/TestOmReconfiguration.java @@ -36,7 +36,6 @@ import org.apache.commons.lang3.RandomStringUtils; import org.apache.hadoop.conf.ReconfigurationException; import org.apache.hadoop.hdds.conf.ReconfigurationHandler; -import org.apache.hadoop.ozone.om.KeyManagerImpl; import org.apache.hadoop.ozone.om.OmConfig; import org.junit.jupiter.api.Test; import org.junit.jupiter.params.ParameterizedTest; @@ -144,7 +143,7 @@ void sstFilteringServiceInterval() throws ReconfigurationException { .getTimeDuration(OZONE_SNAPSHOT_SST_FILTERING_SERVICE_INTERVAL, org.apache.hadoop.ozone.om.OMConfigKeys.OZONE_SNAPSHOT_SST_FILTERING_SERVICE_INTERVAL_DEFAULT, java.util.concurrent.TimeUnit.MILLISECONDS); - assertTrue(originalInterval > -1, "Original interval should be greater than -1"); + assertTrue(originalInterval > 0, "Original interval should be greater than 0"); // 1. Test reconfiguring to a different valid interval (30 seconds) // This should restart the SstFilteringService @@ -165,7 +164,7 @@ void sstFilteringServiceInterval() throws ReconfigurationException { assertEquals(30000, newInterval, "New interval should be 30 seconds (30000ms)"); // 2. Service should stop when interval is reconfigured to -1 - final String disableValue = String.valueOf(KeyManagerImpl.DISABLE_VALUE); + final String disableValue = String.valueOf(-1); getSubject().reconfigurePropertyImpl(OZONE_SNAPSHOT_SST_FILTERING_SERVICE_INTERVAL, disableValue); assertEquals(disableValue, cluster().getOzoneManager().getConfiguration() .get(OZONE_SNAPSHOT_SST_FILTERING_SERVICE_INTERVAL)); diff --git a/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/KeyManagerImpl.java b/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/KeyManagerImpl.java index be2d82440f01..22a26f1735e9 100644 --- a/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/KeyManagerImpl.java +++ b/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/KeyManagerImpl.java @@ -186,7 +186,6 @@ public class KeyManagerImpl implements KeyManager { private static final Logger LOG = LoggerFactory.getLogger(KeyManagerImpl.class); - public static final int DISABLE_VALUE = -1; /** * A SCM block client, used to talk to SCM to allocate block during putKey. @@ -306,7 +305,6 @@ public void start(OzoneConfiguration configuration) { if (snapshotSstFilteringService == null && ozoneManager.isFilesystemSnapshotEnabled()) { - startSnapshotSstFilteringService(configuration); } @@ -392,11 +390,6 @@ public void stopSnapshotSstFilteringService() { } } - public void restartSnapshotSstFilteringService(OzoneConfiguration conf) { - stopSnapshotSstFilteringService(); - startSnapshotSstFilteringService(conf); - } - private void startCompactionService(OzoneConfiguration configuration, boolean isCompactionServiceEnabled) { if (compactionService == null && isCompactionServiceEnabled) { @@ -990,7 +983,8 @@ public boolean isSstFilteringSvcEnabled() { .getTimeDuration(OZONE_SNAPSHOT_SST_FILTERING_SERVICE_INTERVAL, OZONE_SNAPSHOT_SST_FILTERING_SERVICE_INTERVAL_DEFAULT, TimeUnit.MILLISECONDS); - return serviceInterval != DISABLE_VALUE; + // any interval <= 0 causes IllegalArgumentException from scheduleWithFixedDelay + return serviceInterval > 0; } @Override diff --git a/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/OzoneManager.java b/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/OzoneManager.java index dbd4779ef182..95130cdf7c1e 100644 --- a/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/OzoneManager.java +++ b/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/OzoneManager.java @@ -5214,19 +5214,13 @@ private String reconfFSSnapshotSSTFilteringServiceInterval(String newVal) { if (this.isFilesystemSnapshotEnabled()) { if (wasSstFilteringSvcEnabled) { - LOG.info("Restarting SstFilteringService as {} is reconfigured to {}", - OZONE_SNAPSHOT_SST_FILTERING_SERVICE_INTERVAL, newVal); // Sanity check Preconditions.checkNotNull(keyManager.getSnapshotSstFilteringService(), "sstFilteringService should not be null when SST filtering service is enabled."); - - ((KeyManagerImpl) keyManager).restartSnapshotSstFilteringService(getConfiguration()); - } else { - // Start SstFilteringService - LOG.info("Starting SstFilteringService as {} is reconfigured to {}", - OZONE_SNAPSHOT_SST_FILTERING_SERVICE_INTERVAL, newVal); - ((KeyManagerImpl) keyManager).startSnapshotSstFilteringService(getConfiguration()); + ((KeyManagerImpl) keyManager).stopSnapshotSstFilteringService(); } + // Note startSnapshotSstFilteringService checks whether the config is set to a value that enables the service + ((KeyManagerImpl) keyManager).startSnapshotSstFilteringService(getConfiguration()); } else { LOG.warn("Ozone filesystem snapshot is not enabled. {} is reconfigured but will not make any difference.", OZONE_SNAPSHOT_SST_FILTERING_SERVICE_INTERVAL); diff --git a/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/SstFilteringService.java b/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/SstFilteringService.java index 5232a4e517b0..b94fd45bf7fb 100644 --- a/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/SstFilteringService.java +++ b/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/SstFilteringService.java @@ -257,7 +257,6 @@ public BootstrapStateHandler.Lock getBootstrapStateLock() { @Override public void shutdown() { - LOG.info("Shutting down SstFilteringService"); running.set(false); super.shutdown(); } From 073d30d9fa2eb66e028ea4778d4abf866b4e04d2 Mon Sep 17 00:00:00 2001 From: Siyao Meng <50227127+smengcl@users.noreply.github.com> Date: Mon, 21 Jul 2025 19:33:12 -0700 Subject: [PATCH 5/7] checkstyle --- .../java/org/apache/hadoop/fs/ozone/TestOzoneFsSnapshot.java | 1 - 1 file changed, 1 deletion(-) diff --git a/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/fs/ozone/TestOzoneFsSnapshot.java b/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/fs/ozone/TestOzoneFsSnapshot.java index 08b8ab21426c..d02319a4cab6 100644 --- a/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/fs/ozone/TestOzoneFsSnapshot.java +++ b/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/fs/ozone/TestOzoneFsSnapshot.java @@ -47,7 +47,6 @@ import org.apache.commons.io.FileUtils; import org.apache.hadoop.hdds.conf.OzoneConfiguration; import org.apache.hadoop.ozone.MiniOzoneCluster; -import org.apache.hadoop.ozone.om.KeyManagerImpl; import org.apache.hadoop.ozone.om.OMConfigKeys; import org.apache.hadoop.ozone.om.OmConfig; import org.apache.hadoop.ozone.om.OzoneManager; From 1af9325c69e200e366dc3d478c49699353cbe0a1 Mon Sep 17 00:00:00 2001 From: Siyao Meng <50227127+smengcl@users.noreply.github.com> Date: Tue, 22 Jul 2025 09:42:25 -0700 Subject: [PATCH 6/7] Address Attila's comments --- .../ozone/reconfig/TestOmReconfiguration.java | 52 ++++++++++--------- .../hadoop/ozone/om/KeyManagerImpl.java | 19 +++---- .../apache/hadoop/ozone/om/OzoneManager.java | 4 +- 3 files changed, 39 insertions(+), 36 deletions(-) diff --git a/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/reconfig/TestOmReconfiguration.java b/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/reconfig/TestOmReconfiguration.java index 4478f1c53885..7f6543f2c89e 100644 --- a/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/reconfig/TestOmReconfiguration.java +++ b/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/reconfig/TestOmReconfiguration.java @@ -17,6 +17,7 @@ package org.apache.hadoop.ozone.reconfig; +import static java.util.concurrent.TimeUnit.MILLISECONDS; import static org.apache.hadoop.ozone.OzoneConfigKeys.OZONE_ADMINISTRATORS; import static org.apache.hadoop.ozone.OzoneConfigKeys.OZONE_READONLY_ADMINISTRATORS; import static org.apache.hadoop.ozone.om.OMConfigKeys.OZONE_DIR_DELETING_SERVICE_INTERVAL; @@ -24,7 +25,9 @@ import static org.apache.hadoop.ozone.om.OMConfigKeys.OZONE_OM_VOLUME_LISTALL_ALLOWED; import static org.apache.hadoop.ozone.om.OMConfigKeys.OZONE_OM_VOLUME_LISTALL_ALLOWED_DEFAULT; import static org.apache.hadoop.ozone.om.OMConfigKeys.OZONE_SNAPSHOT_SST_FILTERING_SERVICE_INTERVAL; +import static org.apache.hadoop.ozone.om.OMConfigKeys.OZONE_SNAPSHOT_SST_FILTERING_SERVICE_INTERVAL_DEFAULT; import static org.apache.hadoop.ozone.om.OMConfigKeys.OZONE_THREAD_NUMBER_DIR_DELETION; +import static org.assertj.core.api.Assertions.assertThat; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertFalse; import static org.junit.jupiter.api.Assertions.assertNotNull; @@ -36,7 +39,9 @@ import org.apache.commons.lang3.RandomStringUtils; import org.apache.hadoop.conf.ReconfigurationException; import org.apache.hadoop.hdds.conf.ReconfigurationHandler; +import org.apache.hadoop.ozone.om.KeyManagerImpl; import org.apache.hadoop.ozone.om.OmConfig; +import org.apache.hadoop.ozone.om.OzoneManager; import org.junit.jupiter.api.Test; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.ValueSource; @@ -134,55 +139,52 @@ void unsetAllowListAllVolumes(String newValue) throws ReconfigurationException { @Test void sstFilteringServiceInterval() throws ReconfigurationException { // Tests reconfiguration of SST filtering service interval + final OzoneManager om = cluster().getOzoneManager(); + final KeyManagerImpl keyManagerImpl = (KeyManagerImpl) om.getKeyManager(); // Get the original interval value - String originalValue = cluster().getOzoneManager().getConfiguration() - .get(OZONE_SNAPSHOT_SST_FILTERING_SERVICE_INTERVAL); + String originalValue = om.getConfiguration().get(OZONE_SNAPSHOT_SST_FILTERING_SERVICE_INTERVAL); // Verify the original value is valid (should be larger than -1) - long originalInterval = cluster().getOzoneManager().getConfiguration() - .getTimeDuration(OZONE_SNAPSHOT_SST_FILTERING_SERVICE_INTERVAL, - org.apache.hadoop.ozone.om.OMConfigKeys.OZONE_SNAPSHOT_SST_FILTERING_SERVICE_INTERVAL_DEFAULT, - java.util.concurrent.TimeUnit.MILLISECONDS); - assertTrue(originalInterval > 0, "Original interval should be greater than 0"); + long originalInterval = om.getConfiguration().getTimeDuration( + OZONE_SNAPSHOT_SST_FILTERING_SERVICE_INTERVAL, OZONE_SNAPSHOT_SST_FILTERING_SERVICE_INTERVAL_DEFAULT, + MILLISECONDS); + assertThat(originalInterval).isPositive(); // 1. Test reconfiguring to a different valid interval (30 seconds) // This should restart the SstFilteringService final String newIntervalValue = "30s"; getSubject().reconfigurePropertyImpl(OZONE_SNAPSHOT_SST_FILTERING_SERVICE_INTERVAL, newIntervalValue); - assertEquals(newIntervalValue, cluster().getOzoneManager().getConfiguration() + assertEquals(newIntervalValue, om.getConfiguration() .get(OZONE_SNAPSHOT_SST_FILTERING_SERVICE_INTERVAL)); // Verify the service is still enabled with the new interval - assertTrue(((org.apache.hadoop.ozone.om.KeyManagerImpl) cluster().getOzoneManager().getKeyManager()) - .isSstFilteringSvcEnabled(), "SstFilteringService should remain enabled with new interval"); - assertNotNull(cluster().getOzoneManager().getKeyManager().getSnapshotSstFilteringService(), + assertTrue(keyManagerImpl.isSstFilteringSvcEnabled(), + "SstFilteringService should remain enabled with new interval"); + assertNotNull(keyManagerImpl.getSnapshotSstFilteringService(), "SstFilteringService should not be null with new interval"); // Verify the new interval is applied (30 seconds = 30000 milliseconds) - long newInterval = cluster().getOzoneManager().getConfiguration() - .getTimeDuration(OZONE_SNAPSHOT_SST_FILTERING_SERVICE_INTERVAL, - org.apache.hadoop.ozone.om.OMConfigKeys.OZONE_SNAPSHOT_SST_FILTERING_SERVICE_INTERVAL_DEFAULT, - java.util.concurrent.TimeUnit.MILLISECONDS); + long newInterval = om.getConfiguration().getTimeDuration( + OZONE_SNAPSHOT_SST_FILTERING_SERVICE_INTERVAL, OZONE_SNAPSHOT_SST_FILTERING_SERVICE_INTERVAL_DEFAULT, + MILLISECONDS); assertEquals(30000, newInterval, "New interval should be 30 seconds (30000ms)"); // 2. Service should stop when interval is reconfigured to -1 final String disableValue = String.valueOf(-1); getSubject().reconfigurePropertyImpl(OZONE_SNAPSHOT_SST_FILTERING_SERVICE_INTERVAL, disableValue); - assertEquals(disableValue, cluster().getOzoneManager().getConfiguration() - .get(OZONE_SNAPSHOT_SST_FILTERING_SERVICE_INTERVAL)); + assertEquals(disableValue, om.getConfiguration().get(OZONE_SNAPSHOT_SST_FILTERING_SERVICE_INTERVAL)); // Verify that the SstFilteringService is stopped - assertFalse(((org.apache.hadoop.ozone.om.KeyManagerImpl) cluster().getOzoneManager().getKeyManager()) - .isSstFilteringSvcEnabled(), "SstFilteringService should be disabled when interval is -1"); - assertNull(cluster().getOzoneManager().getKeyManager().getSnapshotSstFilteringService(), + assertFalse(keyManagerImpl.isSstFilteringSvcEnabled(), + "SstFilteringService should be disabled when interval is -1"); + assertNull(keyManagerImpl.getSnapshotSstFilteringService(), "SstFilteringService should be null when disabled"); // Set the interval back to the original value // Service should be started again when reconfigured to a valid value getSubject().reconfigurePropertyImpl(OZONE_SNAPSHOT_SST_FILTERING_SERVICE_INTERVAL, originalValue); - assertEquals(originalValue, cluster().getOzoneManager().getConfiguration() - .get(OZONE_SNAPSHOT_SST_FILTERING_SERVICE_INTERVAL)); + assertEquals(originalValue, om.getConfiguration().get(OZONE_SNAPSHOT_SST_FILTERING_SERVICE_INTERVAL)); // Verify that the SstFilteringService is running again - assertTrue(((org.apache.hadoop.ozone.om.KeyManagerImpl) cluster().getOzoneManager().getKeyManager()) - .isSstFilteringSvcEnabled(), "SstFilteringService should be enabled after restoring original interval"); - assertNotNull(cluster().getOzoneManager().getKeyManager().getSnapshotSstFilteringService(), + assertTrue(keyManagerImpl.isSstFilteringSvcEnabled(), + "SstFilteringService should be enabled after restoring original interval"); + assertNotNull(keyManagerImpl.getSnapshotSstFilteringService(), "SstFilteringService should not be null when enabled"); } diff --git a/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/KeyManagerImpl.java b/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/KeyManagerImpl.java index 22a26f1735e9..ca6913edbbb3 100644 --- a/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/KeyManagerImpl.java +++ b/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/KeyManagerImpl.java @@ -213,7 +213,7 @@ public class KeyManagerImpl implements KeyManager { public KeyManagerImpl(OzoneManager om, ScmClient scmClient, OzoneConfiguration conf, OMPerformanceMetrics metrics) { - this (om, scmClient, om.getMetadataManager(), conf, + this(om, scmClient, om.getMetadataManager(), conf, om.getBlockTokenMgr(), om.getKmsProvider(), metrics); } @@ -360,15 +360,16 @@ public void start(OzoneConfiguration configuration) { * @param conf */ public void startSnapshotSstFilteringService(OzoneConfiguration conf) { - long serviceInterval = conf.getTimeDuration( - OZONE_SNAPSHOT_SST_FILTERING_SERVICE_INTERVAL, - OZONE_SNAPSHOT_SST_FILTERING_SERVICE_INTERVAL_DEFAULT, - TimeUnit.MILLISECONDS); - long serviceTimeout = conf.getTimeDuration( - OZONE_SNAPSHOT_SST_FILTERING_SERVICE_TIMEOUT, - OZONE_SNAPSHOT_SST_FILTERING_SERVICE_TIMEOUT_DEFAULT, - TimeUnit.MILLISECONDS); if (isSstFilteringSvcEnabled()) { + long serviceInterval = conf.getTimeDuration( + OZONE_SNAPSHOT_SST_FILTERING_SERVICE_INTERVAL, + OZONE_SNAPSHOT_SST_FILTERING_SERVICE_INTERVAL_DEFAULT, + TimeUnit.MILLISECONDS); + long serviceTimeout = conf.getTimeDuration( + OZONE_SNAPSHOT_SST_FILTERING_SERVICE_TIMEOUT, + OZONE_SNAPSHOT_SST_FILTERING_SERVICE_TIMEOUT_DEFAULT, + TimeUnit.MILLISECONDS); + snapshotSstFilteringService = new SstFilteringService(serviceInterval, TimeUnit.MILLISECONDS, serviceTimeout, ozoneManager, conf); diff --git a/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/OzoneManager.java b/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/OzoneManager.java index 95130cdf7c1e..8dbb5e3e7eb5 100644 --- a/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/OzoneManager.java +++ b/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/OzoneManager.java @@ -525,11 +525,11 @@ private OzoneManager(OzoneConfiguration conf, StartupOption startupOption) .register(OZONE_READONLY_ADMINISTRATORS, this::reconfOzoneReadOnlyAdmins) .register(OZONE_OM_VOLUME_LISTALL_ALLOWED, this::reconfigureAllowListAllVolumes) + .register(OZONE_SNAPSHOT_SST_FILTERING_SERVICE_INTERVAL, this::reconfFSSnapshotSSTFilteringServiceInterval) .register(OZONE_KEY_DELETING_LIMIT_PER_TASK, this::reconfOzoneKeyDeletingLimitPerTask) .register(OZONE_DIR_DELETING_SERVICE_INTERVAL, this::reconfOzoneDirDeletingServiceInterval) - .register(OZONE_THREAD_NUMBER_DIR_DELETION, this::reconfOzoneThreadNumberDirDeletion) - .register(OZONE_SNAPSHOT_SST_FILTERING_SERVICE_INTERVAL, this::reconfFSSnapshotSSTFilteringServiceInterval); + .register(OZONE_THREAD_NUMBER_DIR_DELETION, this::reconfOzoneThreadNumberDirDeletion); reconfigurationHandler.setReconfigurationCompleteCallback(reconfigurationHandler.defaultLoggingCallback()); From 13d5c57f4ee6391da0cc18382d4cc7cc1b8e8ffb Mon Sep 17 00:00:00 2001 From: Siyao Meng <50227127+smengcl@users.noreply.github.com> Date: Tue, 22 Jul 2025 09:43:48 -0700 Subject: [PATCH 7/7] Renamed reconfFSSnapshotSSTFilteringServiceInterval to reconfOzoneSnapshotSSTFilteringServiceInterval for consistency with configuration key naming. --- .../main/java/org/apache/hadoop/ozone/om/OzoneManager.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/OzoneManager.java b/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/OzoneManager.java index 8dbb5e3e7eb5..a302a01cbfcc 100644 --- a/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/OzoneManager.java +++ b/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/OzoneManager.java @@ -525,7 +525,8 @@ private OzoneManager(OzoneConfiguration conf, StartupOption startupOption) .register(OZONE_READONLY_ADMINISTRATORS, this::reconfOzoneReadOnlyAdmins) .register(OZONE_OM_VOLUME_LISTALL_ALLOWED, this::reconfigureAllowListAllVolumes) - .register(OZONE_SNAPSHOT_SST_FILTERING_SERVICE_INTERVAL, this::reconfFSSnapshotSSTFilteringServiceInterval) + .register(OZONE_SNAPSHOT_SST_FILTERING_SERVICE_INTERVAL, + this::reconfOzoneSnapshotSSTFilteringServiceInterval) .register(OZONE_KEY_DELETING_LIMIT_PER_TASK, this::reconfOzoneKeyDeletingLimitPerTask) .register(OZONE_DIR_DELETING_SERVICE_INTERVAL, this::reconfOzoneDirDeletingServiceInterval) @@ -5208,7 +5209,7 @@ private String reconfOzoneThreadNumberDirDeletion(String newVal) { return newVal; } - private String reconfFSSnapshotSSTFilteringServiceInterval(String newVal) { + private String reconfOzoneSnapshotSSTFilteringServiceInterval(String newVal) { boolean wasSstFilteringSvcEnabled = ((KeyManagerImpl) keyManager).isSstFilteringSvcEnabled(); getConfiguration().set(OZONE_SNAPSHOT_SST_FILTERING_SERVICE_INTERVAL, newVal);