errose28 commented on a change in pull request #3004:
URL: https://github.com/apache/ozone/pull/3004#discussion_r790052854
##########
File path:
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/OzoneManager.java
##########
@@ -3900,4 +3900,26 @@ private void
updateLayoutVersionInDB(OMLayoutVersionManager lvm,
private BucketLayout getBucketLayout() {
return BucketLayout.DEFAULT;
}
+
+ /**
+ * Get supported Bucket Layouts based on upgrade state.
+ * Before finalization, the method returns an empty list. This leads to the
+ * new client's OzoneClientAdapter and CreateBucketHandler receiving an empty
+ * list - which causes them to continue with LEGACY layout.
+ * After finalization, the method returns a list with the new layouts.
+ *
+ * @return Supported Bucket Layouts.
+ */
+ public List<BucketLayout> getSupportedBucketLayouts() {
+ // Check if we are in Pre-Finalize upgrade state.
+ if (versionManager.getUpgradeState() ==
+ UpgradeFinalizer.Status.FINALIZATION_REQUIRED) {
Review comment:
Add FSO as a layout feature in `OMLayoutFeature`. Then you can call
`OzoneManager#getVersionManager#isAllowed(OMLayoutFeature.FSO)` to determine
whether FSO specifically has been finalized or not. The call written here just
checks if the OM needs to be finalized for some layout feature, which may come
after FSO. It does not check that FSO specifically has not already been
finalized.
--
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]