ChenSammi commented on code in PR #9426:
URL: https://github.com/apache/ozone/pull/9426#discussion_r2605391331


##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/OzoneManager.java:
##########
@@ -5157,6 +5176,20 @@ private String reconfOzoneKeyDeletingLimitPerTask(String 
newVal) {
     return newVal;
   }
 
+  private String reconfKeyLifecycleServiceEnabled(String newVal) {
+    boolean enabled = StringUtils.isEmpty(newVal) ?
+        OZONE_KEY_LIFECYCLE_SERVICE_ENABLED_DEFAULT : 
Boolean.parseBoolean(newVal);
+    KeyLifecycleService keyLifecycleService = 
getKeyManager().getKeyLifecycleService();
+    if (keyLifecycleService != null) {
+      keyLifecycleService.setServiceEnabled(enabled);
+    } else {
+      LOG.warn("Failed reconfiguration for '{}'. KeyLifecycleService is not 
initialized.",
+          OZONE_KEY_LIFECYCLE_SERVICE_ENABLED);
+    }
+    getConfiguration().setBoolean(OZONE_KEY_LIFECYCLE_SERVICE_ENABLED, 
enabled);

Review Comment:
   Let's change the configuration first, and then update the service state. 



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