hbase-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "stack (JIRA)" <j...@apache.org>
Subject [jira] Commented: (HBASE-781) The hbase shell should allow to assign the result of a command to a variable
Date Mon, 28 Jul 2008 21:50:31 GMT

    [ https://issues.apache.org/jira/browse/HBASE-781?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12617572#action_12617572

stack commented on HBASE-781:

You can do it now if rather than use little-DSL verbs get/scan, etc., instead you used actual
primitives in the shell: For example:

t = Table.new...
r = t.get(....

s t.obtainScanner(....


For examples, read bin/HBase.rb

Would that work for you Sebastien?

> 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: Hadoop HBase
>          Issue Type: New Feature
>          Components: client
>    Affects Versions: 0.3.0
>            Reporter: Sebastien Rainville
>            Priority: Minor
> 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.
You can reply to this email to add a comment to the issue online.

View raw message