avijayanhwx commented on a change in pull request #3083:
URL: https://github.com/apache/ozone/pull/3083#discussion_r826604644



##########
File path: 
hadoop-ozone/recon/src/main/java/org/apache/hadoop/ozone/recon/api/ContainerEndpoint.java
##########
@@ -157,11 +159,29 @@ public Response getKeysForContainer(
       for (ContainerKeyPrefix containerKeyPrefix : containerKeyPrefixMap
           .keySet()) {
 
-        // Directly calling get() on the Key table instead of iterating since
-        // only full keys are supported now. When we change to using a prefix
-        // of the key, this needs to change to prefix seek.
-        OmKeyInfo omKeyInfo = omMetadataManager.getKeyTable(getBucketLayout())
-            .getSkipCache(containerKeyPrefix.getKeyPrefix());
+        OmKeyInfo omKeyInfo = null;
+
+        for (BucketLayout bucketLayout : getBucketLayoutList()) {
+          Table<String, OmKeyInfo> omKeyInfoTable =
+              omMetadataManager.getKeyTable(bucketLayout);
+
+          if (omKeyInfoTable == null) {
+            // keyTable for current bucketLayout not found, continue.
+            continue;
+          }
+
+          // Directly calling get() on the Key table instead of iterating since
+          // only full keys are supported now. When we change to using a prefix
+          // of the key, this needs to change to prefix seek.
+          omKeyInfo =

Review comment:
       Is this 'omKeyInfo' object expected to have bucket and volume name 
populated in it? Or will it carry their 'ids' instead?

##########
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:
       Why not LEGACY FILESYSTEM here? We still need Recon to track data in 
those buckets as well. 

##########
File path: 
hadoop-ozone/recon/src/main/java/org/apache/hadoop/ozone/recon/tasks/FileSizeCountTask.java
##########
@@ -74,18 +75,25 @@ public FileSizeCountTask(FileCountBySizeDao 
fileCountBySizeDao,
    */
   @Override
   public Pair<String, Boolean> reprocess(OMMetadataManager omMetadataManager) {

Review comment:
        getTaskTables in FileSizeCountTask should be changed to include the 
FileTable as well. 




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