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

   ## What changes were proposed in this pull request?
   When running `namespace du` command with root `/` or volume name `/volume` 
ofs paths, ofs path validation errors `INVALID_VOLUME_NAME` and 
`INVALID_BUCKET_NAME` are like below printed on the output. This is invalid 
because both `/` and `/volume` are valid paths.
   
   Fixed the path validation code to skip printing errors if paths are valid.
   
   ```
   ozone admin namespace du /
   Connecting to Recon: https://xxx:9889/api/v1/namespace/du?path=/ ...
   
   Bucket layout couldn't be verified for path: . Exception: 
INVALID_VOLUME_NAME org.apache.hadoop.ozone.om.exceptions.OMException: Bucket 
or Volume length is illegal, valid length is 3-63 characters
   Bucket layout couldn't be verified for path: . Exception: 
INVALID_VOLUME_NAME org.apache.hadoop.ozone.om.exceptions.OMException: Bucket 
or Volume length is illegal, valid length is 3-63 characters
   
   [Warning] Namespace CLI is not designed for OBS bucket layout.
   Bucket being accessed must be of type FILE_SYSTEM_OPTIMIZED bucket layout or 
   LEGACY bucket layout with 'ozone.om.enable.filesystem.paths' set to true.
   
   Path : /
   Total Size : 0 bytes
   
   DU
     Size      Path Name
     0 bytes   /s3v/
   
   ```
   
   ## What is the link to the Apache JIRA
   
   https://issues.apache.org/jira/browse/HDDS-9644
   
   ## How was this patch tested?
   
   Integration tests added.
   Manual test performed
   ```
   bash-4.2$ ozone admin namespace du /
   Connecting to Recon: http://recon:9888/api/v1/namespace/du?path=/ ...
   
   Path : /
   Total Size : 22 KB
   
   DU
     Size      Path Name
     22 KB     /s3v/
   
   bash-4.2$ ozone admin namespace du /s3v
   Connecting to Recon: http://recon:9888/api/v1/namespace/du?path=/s3v ...
   
   Path : /s3v
   Total Size : 22 KB
   
   DU
     Size      Path Name
     11 KB     /s3v/fso/
     11 KB     /s3v/obs/
   ```
   


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