You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by GitBox <gi...@apache.org> on 2022/03/15 10:48:56 UTC
[GitHub] [ozone] JyotinderSingh commented on a change in pull request #3083: HDDS-5904. Update Recon for files created with FSO Buckets.
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: issues-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org