Uploaded image for project: 'HBase'
  1. HBase
  2. HBASE-26445

Procedure state pretty-printing should use printable character friendly encoding

    XMLWordPrintableJSON

Details

    • Task
    • Status: Resolved
    • Minor
    • Resolution: Later
    • 2.4.8
    • None
    • Operability
    • None

    Description

      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.

      Attachments

        Activity

          People

            Unassigned Unassigned
            apurtell Andrew Kyle Purtell
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: