[ https://issues.apache.org/jira/browse/HBASE-781?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13535139#comment-13535139 ]
Jesse Yates commented on HBASE-781: ----------------------------------- This might end up being a generalization of HBASE-5548, just a thought. > [shell] The hbase shell should allow to assign the result of a command to a > variable > ------------------------------------------------------------------------------------ > > Key: HBASE-781 > URL: https://issues.apache.org/jira/browse/HBASE-781 > Project: HBase > Issue Type: New Feature > Components: Client > Affects Versions: 0.18.0 > Reporter: Sebastien Rainville > Priority: Minor > Labels: noob > > 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 #{row['attribute:name']} 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. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira