anuragp010 commented on PR #11951:
URL: https://github.com/apache/ozone/pull/11951#issuecomment-6851830463

   > can we update the CLI output like below.
   
   Thanks @devmadhuu for the suggestion. Yes. Here's the output of the command 
from the now updated code.
   
   1. Scenario when all replicas are on the correct type:
   ```shell
   bash-5.1$ ozone admin storagepolicy check vol1/bucket1/file1 --show-replicas
   Storage Policy for key 'vol1/bucket1/file1': HOT
     Key Match Storage Policy: YES
   Container ID: 1
     Replica: {[SSD x 3]}, Volumes: {[SSD x 3]}
     Container Match Storage Policy: YES
     Datanode: 6fa6844c-c9d2-417c-8ea7-3b5f1fa5f4ed 
(ozone-datanode-ssd-1.ozone_default, /default-rack)
     Replica Storage Type: SSD
     Volume Storage Type: SSD
     Replica Match: YES
     Datanode: 5de0f438-061e-443b-baf8-773d9b84c8fa 
(ozone-datanode-ssd-2.ozone_default, /default-rack)
     Replica Storage Type: SSD
     Volume Storage Type: SSD
     Replica Match: YES
     Datanode: fa07496d-72d3-404e-96eb-065f99fb3495 
(ozone-datanode-ssd-3.ozone_default, /default-rack)
     Replica Storage Type: SSD
     Volume Storage Type: SSD
     Replica Match: YES
   ````
   
   2. Sample output for scenario when there is a mismatch:
   ```shell
   Storage Policy for key 'vol1/bucket1/key1': HOT
     Key Match Storage Policy: NO
   Container ID: 1
     Replica: {[SSD x 2], [DISK x 1]}, Volumes: {[SSD x 1], [DISK x 2]}
     Container Match Storage Policy: NO
     Datanode: 6fa6844c-c9d2-417c-8ea7-3b5f1fa5f4ed (dn1.example.com, /rack1)
     Replica Storage Type: DISK
     Volume Storage Type: DISK
     Replica Match: NO (storageType DISK != expected SSD; volumeStorageType 
DISK != expected SSD)
     Datanode: 7fa6844c-c9d2-417c-8ea7-3b5f1fa5f4ed (dn2.example.com, /rack2)
     Replica Storage Type: SSD
     Volume Storage Type: DISK
     Replica Match: NO (volumeStorageType DISK != expected SSD)
     Datanode: 8fa6844c-c9d2-417c-8ea7-3b5f1fa5f4ed (dn3.example.com, /rack3)
     Replica Storage Type: SSD
     Volume Storage Type: SSD
     Replica Match: YES
   ```
   
   3. Sample output for scenario where the key has no recorded policy:
   ```shell
   Storage Policy for key 'vol1/bucket1/key1': UNKNOWN
   ```


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