Gargi-jais11 commented on code in PR #9638:
URL: https://github.com/apache/ozone/pull/9638#discussion_r2715245125
##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/OzoneManager.java:
##########
@@ -1095,6 +1099,24 @@ public void checkS3MultiTenancyEnabled() throws
OMException {
FEATURE_NOT_ENABLED);
}
+ /**
+ * Returns true if lifecycle is enabled; false otherwise.
+ */
+ public boolean isLifecycleEnabled() {
+ return isLifecycleEnabled;
+ }
+
+ /**
+ * Throws OMException FEATURE_NOT_ENABLED if lifecycle is not enabled.
+ */
+ public void checkLifecycleEnabled() throws OMException {
+ if (!isLifecycleEnabled()) {
+ throw new OMException("OM Lifecycle feature is not enabled. Please "
+ + "set ozone.om.lifecycle.service.enabled to true and restart all
OMs.",
Review Comment:
Please use `OZONE_KEY_LIFECYCLE_SERVICE_ENABLED` instead of hardcoding it.
```
throw new OMException("OM Lifecycle feature is not enabled. Please set " +
OZONE_KEY_LIFECYCLE_SERVICE_ENABLED + "to true and restart all OMs."
```
--
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]