Andrew Kyle Purtell created HBASE-26445:
-------------------------------------------

             Summary: Procedure state pretty-printing should use toStringBinary 
not base64 encoding
                 Key: HBASE-26445
                 URL: https://issues.apache.org/jira/browse/HBASE-26445
             Project: HBase
          Issue Type: Task
    Affects Versions: 2.4.8
            Reporter: Andrew Kyle Purtell
             Fix For: 2.5.0, 3.0.0-alpha-2, 2.4.9


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 produces poor usability. It would be 
better to use Bytes.toStringBinary. Generally, table names etc are printable 
characters encoded in byte[]. Base64 encoding them totally obfuscates 
information that is important to see at a glance.



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

Reply via email to