ArafatKhan2198 opened a new pull request, #6492:
URL: https://github.com/apache/ozone/pull/6492

   ## What changes were proposed in this pull request?
   We've made some updates to improve how we manage and display complete file 
paths in recon. This includes a new way to build the full paths of files, 
especially useful for our FSO keys, ensuring that file paths are shown 
correctly no matter how they're stored.
   
   ### Key Changes:
   1. **NSSummary Adjustments**: To support the new path-building 
functionality, we've made modifications to the Namespace Summary (`NSSummary`). 
This includes the introduction of a `parentID` attribute for directories, 
enabling the recursive construction of paths from any given file or directory 
back to its root.
   2. **Path Construction Utility** : Constructs the full path for a given key 
based on its `OmKeyInfo` and the hierarchical structure of parent directories. 
This method begins with the key name from the provided `OmKeyInfo` object and 
recursively prepends the names of parent directories by fetching `NSSummary` 
objects from the namespace summary manager. This process continues until a 
parent ID of `-1` is encountered, indicating the root of the directory 
structure. Finally, the volume and bucket names are prepended to construct the 
complete path.
   
   
   ## What is the link to the Apache JIRA
   
   https://issues.apache.org/jira/browse/HDDS-10608
   
   ## How was this patch tested?
   
   ### Unit Testing :- 
   Wrote multiple unit test to test out the complete correct path and also to 
check if the parent ID is getting populated properly.
   
   ### Manual Testing :- 
   The implementation of these changes has been thoroughly tested across 
various bucket layouts, including `FSO`, `Legacy` buckets with `FsEnabled`, and 
Object Storage Bucket (`OBS`) layouts. 
   
   FSO Bucket Path:
   ```
   {
     "totalCount": 1,
     "keys": [
       {
         "Volume": "volume1",
         "Bucket": "fso-bucket",
         "Key": "key1-fso"
         "CompletePath": "volume1/fso-bucket/dir1/dir2/dir3/key1-fso",
         "DataSize": 1000000
       }
     ]
   }
   ```
   Legacy Bucket with FsEnabled:
   ```
   {
     "totalCount": 4,
     "keys": [
       {
         "Volume": "s3v",
         "Bucket": "legacy-bucket",
         "Key": "dir1/dir2/dir3/key1-legacy"
         "CompletePath": "s3v/legacy-bucket/dir1/dir2/dir3/key1-legacy",
         "DataSize": 1000000
       }
     ]
   }
   ```
   OBS Bucket Path:
   ```
   {
     "totalCount": 1,
     "keys": [
       {
         "Volume": "volume1",
         "Bucket": "obs-bucket",
         "Key": "key1-obs"
         "CompletePath": "volume1/obs-bucket/key1-obs",
         "DataSize": 17289
       }
     ]
   }
   
   ```


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