smengcl commented on code in PR #8825:
URL: https://github.com/apache/ozone/pull/8825#discussion_r2223160248
##########
hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/reconfig/TestOmReconfiguration.java:
##########
@@ -125,4 +131,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 > 0, "Original interval should be greater than
0");
Review Comment:
Done. Thanks for the suggestion!
##########
hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/reconfig/TestOmReconfiguration.java:
##########
@@ -125,4 +131,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 > 0, "Original interval should be greater than
0");
+
+ // 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())
Review Comment:
done
--
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]