JyotinderSingh commented on a change in pull request #3083:
URL: https://github.com/apache/ozone/pull/3083#discussion_r826830534
##########
File path:
hadoop-ozone/recon/src/main/java/org/apache/hadoop/ozone/recon/ReconUtils.java
##########
@@ -338,6 +341,18 @@ private static int nextClosestPowerIndexOfTwo(long
dataSize) {
return index;
}
+ /**
+ * Fetches a list of supported bucket layouts.
+ *
+ * @return List of supported bucket layouts.
+ */
+ public static List<BucketLayout> getBucketLayoutList() {
+ return Arrays.asList(
+ BucketLayout.FILE_SYSTEM_OPTIMIZED,
+ BucketLayout.OBJECT_STORE
Review comment:
Internally the metadata layout for LEGACY and OBJECT_STORE is the same.
This method is used to fetch the different kinds of bucket layouts that can
refer to different internal representations.
Further, we use the bucket layouts returned from this method in the
following manner:
```java
Table<String, OmKeyInfo> omKeyInfoTable =
omMetadataManager.getKeyTable(bucketLayout);
```
The getKeyTable method is implemented as follows:
```java
public Table<String, OmKeyInfo> getKeyTable(BucketLayout bucketLayout) {
// Checks if bucket layout is FILE_SYSTEM_OPTIMIZED
if (bucketLayout.isFileSystemOptimized()) {
return fileTable;
}
return keyTable;
}
```
This will return the same table in case of LEGACY and OBJECT_STORE - so we
don't need to have a separate case for LEGACY.
--
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]