[ 
https://issues.apache.org/jira/browse/HDDS-12645?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17937040#comment-17937040
 ] 

Attila Doroszlai commented on HDDS-12645:
-----------------------------------------

"volume/bucket/key" in the description is intended to represent the path to an 
actual key, not three different kind of items.  I guess all of these could be 
improved to clarify that (e.g. by removing the prefix part, and keeping only 
"URI of the key" etc.):

{code}
hadoop-ozone/cli-shell/src/main/java/org/apache/hadoop/ozone/shell/bucket/BucketUri.java
31:      "URI of the volume/bucket.\n" + Shell.OZONE_URI_DESCRIPTION;

hadoop-ozone/cli-shell/src/main/java/org/apache/hadoop/ozone/shell/common/VolumeBucketUri.java
32:      "URI of the volume or bucket.\n" + Shell.OZONE_URI_DESCRIPTION;

hadoop-ozone/cli-shell/src/main/java/org/apache/hadoop/ozone/shell/keys/KeyUri.java
31:      "URI of the volume/bucket/key.\n" + Shell.OZONE_URI_DESCRIPTION;

hadoop-ozone/cli-shell/src/main/java/org/apache/hadoop/ozone/shell/prefix/PrefixUri.java
31:      "URI of the volume/bucket/prefix.\n" + Shell.OZONE_URI_DESCRIPTION;

hadoop-ozone/cli-shell/src/main/java/org/apache/hadoop/ozone/shell/snapshot/SnapshotUri.java
30:      "URI of the volume/bucket/snapshot.\n" + Shell.OZONE_URI_DESCRIPTION;
{code}

> Improve output of `ozone debug replicas chunk-info`
> ---------------------------------------------------
>
>                 Key: HDDS-12645
>                 URL: https://issues.apache.org/jira/browse/HDDS-12645
>             Project: Apache Ozone
>          Issue Type: Sub-task
>            Reporter: Ethan Rose
>            Assignee: Sarveksha Yeshavantha Raju
>            Priority: Major
>
> Current output of {{ozone debug chunk-info}} looks like this:
> {code}
> $ ozone debug replicas chunk-info /vol/bucket/HISTORY.md                      
>                                                                               
>                               
> {                                                                             
>                                                                               
>                                     
>   "KeyLocations" : [ [ {                                                      
>                                                                               
>                                     
>     "Locations" : {                                                           
>                                                                               
>                                     
>       "files" : [ 
> "/data/hdds/hdds/CID-f16eb9db-90cb-4764-8a2a-dff0a0243bd7/current/containerDir0/1/chunks/115816896921600001.block"
>  ],                                                         
>       "pipelineID" : "24fc450c-dc54-4a1c-a9e0-07d7fd86fa7e"                   
>                                                                               
>                                     
>     },                                                                        
>                                                                               
>                                     
>     "Datanode-HostName" : "ha-dn2-1.ha_net",                                  
>                                                                               
>                                     
>     "Datanode-IP" : "10.9.0.18",                                              
>                                                                               
>                                     
>     "Container-ID" : 1,                                                       
>                                                                               
>                                     
>     "Block-ID" : 115816896921600001                                           
>                                                                               
>                                     
>   }, {                                                                        
>                                                                               
>                                     
>     "Locations" : {                                                           
>                                                                               
>                                     
>       "files" : [ 
> "/data/hdds/hdds/CID-f16eb9db-90cb-4764-8a2a-dff0a0243bd7/current/containerDir0/1/chunks/115816896921600001.block"
>  ],                                                         
>       "pipelineID" : "24fc450c-dc54-4a1c-a9e0-07d7fd86fa7e"                   
>                                                                               
>                                     
>     },                                                                        
>                                                                               
>                                     
>     "Datanode-HostName" : "ha-dn5-1.ha_net",                                  
>                                                                               
>                                     
>     "Datanode-IP" : "10.9.0.21",                                              
>                                                                               
>                                     
>     "Container-ID" : 1,                                                       
>                                                                               
>                                     
>     "Block-ID" : 115816896921600001                                           
>                                                                               
>                                     
>   }, {                                                                        
>                                                                               
>                                     
>     "Locations" : {                                                           
>                                                                               
>                                     
>       "files" : [ 
> "/data/hdds/hdds/CID-f16eb9db-90cb-4764-8a2a-dff0a0243bd7/current/containerDir0/1/chunks/115816896921600001.block"
>  ],                                                         
>       "pipelineID" : "24fc450c-dc54-4a1c-a9e0-07d7fd86fa7e"                   
>                                                                               
>                                     
>     },                                                                        
>                                                                               
>                                     
>     "Datanode-HostName" : "ha-dn3-1.ha_net",                                  
>                                                                               
>                                     
>     "Datanode-IP" : "10.9.0.19",                                              
>                                                                               
>                                     
>     "Container-ID" : 1,                                                       
>                                                                               
>                                     
>     "Block-ID" : 115816896921600001                                           
>                                                                               
>                                     
>   } ] ]                                                                       
>                                                                               
>                                     
> }
> {code}
> This doesn't actually show any information about the chunks. We can make this 
> command dump the {{BlockData}} retrieved from the {{getBlock}} call with some 
> additional details about the replica, and clean up the json structure.
> The command only works for single key, which is probably fine given that we 
> plan to have fairly verbose output, but the help message needs to be fixed 
> because it says that the URI says that volumes and buckets are also valid, 
> and directory handling is unspecified.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@ozone.apache.org
For additional commands, e-mail: issues-h...@ozone.apache.org

Reply via email to