[ 
https://issues.apache.org/jira/browse/HBASE-26445?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Andrew Kyle Purtell resolved HBASE-26445.
-----------------------------------------
    Resolution: Later

> Procedure state pretty-printing should use printable character friendly 
> encoding
> --------------------------------------------------------------------------------
>
>                 Key: HBASE-26445
>                 URL: https://issues.apache.org/jira/browse/HBASE-26445
>             Project: HBase
>          Issue Type: Task
>          Components: Operability
>    Affects Versions: 2.4.8
>            Reporter: Andrew Kyle Purtell
>            Priority: Minor
>
> The shell 'list_procedures' command produces output like:
> ----
>  889 org.apache.hadoop.hbase.master.assignment.SplitTableRegionProcedure 
> SUCCESS 2021-11-10 22:20:34 UTC 2021-11-10 22:20:35 UTC [{"state"=>[1, 2, 3, 
> 11, 4, 5, 6, 7, 8, 9, 10, 2147483648]}, {"regionId"=>"1636579678894", 
> "tableName"=>{"namespace"=>"ZGVmYXVsdA==", 
> "qualifier"=>"SW50ZWdyYXRpb25UZXN0TG9hZENvbW1vbkNyYXds"}, 
> "startKey"=>"dWsuY28uZ3Jhbml0ZXRyYW5zZm9ybWF0aW9ucy53d3d8L2dhbGxlcnkvdA==", 
> "endKey"=>"dXMuYmFuZHwvYmFuZC81OA==", "offline"=>false, "split"=>false, 
> "replicaId"=>0}, {"userInfo"=>{"effectiveUser"=>"apurtell"}, 
> "parentRegionInfo"=>{"regionId"=>"1636579678894", 
> "tableName"=>{"namespace"=>"ZGVmYXVsdA==", 
> "qualifier"=>"SW50ZWdyYXRpb25UZXN0TG9hZENvbW1vbkNyYXds"}, 
> "startKey"=>"dWsuY28uZ3Jhbml0ZXRyYW5zZm9ybWF0aW9ucy53d3d8L2dhbGxlcnkvdA==", 
> "endKey"=>"dXMuYmFuZHwvYmFuZC81OA==", "offline"=>false, "split"=>false, 
> "replicaId"=>0}, "childRegionInfo"=>[{"regionId"=>"1636582834759", 
> "tableName"=>{"namespace"=>"ZGVmYXVsdA==", 
> "qualifier"=>"SW50ZWdyYXRpb25UZXN0TG9hZENvbW1vbkNyYXds"}, 
> "startKey"=>"dWsuY28uZ3Jhbml0ZXRyYW5zZm9ybWF0aW9ucy53d3d8L2dhbGxlcnkvdA==", 
> "endKey"=>"dWsuY28uc2ltb25hbmRzY2h1c3Rlci53d3d8L2Jvb2tzL1RoZS1P", 
> "offline"=>false, "split"=>false, "replicaId"=>0}, 
> {"regionId"=>"1636582834759", "tableName"=>{"namespace"=>"ZGVmYXVsdA==", 
> "qualifier"=>"SW50ZWdyYXRpb25UZXN0TG9hZENvbW1vbkNyYXds"}, 
> "startKey"=>"dWsuY28uc2ltb25hbmRzY2h1c3Rlci53d3d8L2Jvb2tzL1RoZS1P", 
> "endKey"=>"dXMuYmFuZHwvYmFuZC81OA==", "offline"=>false, "split"=>false, 
> "replicaId"=>0}]}]
> ----
> The base64 encoding of byte[] values offers poor usability. 
> Generally, table names etc are printable characters encoded in byte[]. Base64 
> encoding them totally obfuscates information that is important to see at a 
> glance. Even start keys and end keys might be printable characters.
> It would be better to use Bytes.toStringBinary or something else that shows 
> printable characters as-is while escaping others that would be invalid in 
> JSON formatting.



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

Reply via email to