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

   ## What changes were proposed in this pull request?
   - `ContainerToKeyMapping` now handles both FSO and OBS keys as a container 
may contain both types of keys. 
   
   - Introduced a flag `--onlyFileNames` that allows listing only file names 
without rebuilding the full FSO tree in case of FSO keys. This significantly 
reduces processing time when we only need to quickly check whether any keys are 
affected.
   
   ```
   bash-5.1$ ozone debug om container-key-mapping --containers "1,2" --db 
/data/metadata/om.db                
   {
     "containers" : {
       "1" : {
         "keys" : [ "vol1/bucket1/OaStVjldJA/ahVKu3nYob/HVYBiF62s9", 
"vol1/bucket1/OaStVjldJA/ahVKu3nYob/YGpvx930Of", 
"vol1/bucket1/Y8EAzAebSj/caqb3oJxb2/eyLxOUPwZj", 
"vol1/bucket1/Y8EAzAebSj/caqb3oJxb2/tyRwN9pnGa", 
"vol1/bucket1/OaStVjldJA/Po7wJsEmQV", "vol1/bucket1/OaStVjldJA/QTFkKKPla5", 
"vol1/bucket1/Y8EAzAebSj/a5LvlLLrLs", "vol1/bucket1/Y8EAzAebSj/sDd02ngnXL" ],
         "numOfKeys" : 8
       },
       "2" : {
         "keys" : [ "/vol1/obsbuck/key1" ],
         "numOfKeys" : 1
       }
     }
   }
   bash-5.1$ ozone debug om container-key-mapping --containers "1,2" --db 
/data/metadata/om.db --onlyFileNames
   {
     "containers" : {
       "1" : {
         "keys" : [ "HVYBiF62s9", "YGpvx930Of", "eyLxOUPwZj", "tyRwN9pnGa", 
"Po7wJsEmQV", "QTFkKKPla5", "a5LvlLLrLs", "sDd02ngnXL" ],
         "numOfKeys" : 8
       },
       "2" : {
         "keys" : [ "key1" ],
         "numOfKeys" : 1
       }
     }
   }
   
   ```
   
   ## What is the link to the Apache JIRA
   [HDDS-14118](https://issues.apache.org/jira/browse/HDDS-14118)
   
   ## How was this patch tested?
   Added tests in `TestContainerToKeyMapping`.
   


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