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

[shell] The hbase shell should allow to assign the result of a command to a variable



    • New Feature
    • Status: Closed
    • Minor
    • Resolution: Invalid
    • 0.18.0
    • None
    • Client
    • None


      From the user point of view, what needs to be debugged in hbase is the data and currently the only thing we can do to visualize it is to run the hbase commands 'get' and 'scan'. The output of those commands is not really well formatted... but that should be the subject of another case... another way to deal with it and that would be more useful is to return the result instead of printing them on the standard output. That way the results can be assigned to a variable. When running the hbase shell we have the advantage of being in a jruby shell, which is very powerful... but currently that power is not being used. I'm thinking about being able to do stuff like this:

      row = get 'entities', 'Montreal'
      puts "The name of the entity #


      is ending by 'real'" if row['attribute:name'] =~ /real$/

      Of course that's not the most useful example but still...

      My only concern is how to manipulate non printable values since the values in hbase are byte arrays. In my case the values are always printable but if they are not it would screw up the shell.


        Issue Links



              Unassigned Unassigned
              srainville Sebastien Rainville
              0 Vote for this issue
              2 Start watching this issue