hbase-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sebastien Rainville (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 23:22:33 GMT

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

Sebastien Rainville commented on HBASE-781:

It works but it would be nice to have wrapper methods because:
1) the api is crude for simple tasks, especially when it comes to scanners
2) the primitives are java objects and even though jruby makes a pretty good abstraction of
them it's still much better to manipulate true ruby objects

Actually, I have some code I could share that does that and it would be nice to integrate
it directly in the shell. I'll see if I can contribute that piece of code or not...

> 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