ChenSammi commented on code in PR #11721:
URL: https://github.com/apache/ozone/pull/11721#discussion_r4374917808
##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/service/KeyLifecycleService.java:
##########
@@ -238,7 +262,90 @@ private boolean shouldRun() {
// OzoneManager can be null for testing
return true;
}
- return isServiceEnabled.get() && !suspended.get() &&
getOzoneManager().isLeaderReady();
+ return isServiceEnabled.get() && !suspended.get() && !restarting.get() &&
getOzoneManager().isLeaderReady();
+ }
+
+ /**
+ * Apply the new value of a property in {@link
#OZONE_KEY_LIFECYCLE_PROPERTIES
+ * } without restarting OM.
+ * Changes to batch sizes and limits take effect on the next scheduled task.
A new interval restarts the service,
+ * running tasks stop at their next checkpoint and resume from the saved
scan state in the next run.
+ * @param property the property being reconfigured
+ * @param conf configuration holding the new value, or not holding the
property to fall back to the default
+ */
+ public void reconfigure(String property, ConfigurationSource conf) {
+ switch (property) {
+ case OZONE_KEY_LIFECYCLE_SERVICE_ENABLED:
+ isServiceEnabled.set(conf.getBoolean(property,
OZONE_KEY_LIFECYCLE_SERVICE_ENABLED_DEFAULT));
Review Comment:
I believe we should call the start() if the change is from false to enabled,
and do nothing if it's from true-> false.
--
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]