hbase-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ben West (Commented) (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HBASE-4818) HBase Shell - Add support for formatting row keys before output
Date Wed, 28 Mar 2012 14:39:28 GMT

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

Ben West commented on HBASE-4818:

The ReverseIDFormatter in that patch overrides the default formatter to display row keys in
reverse order.

Something which we will have to think about is how we can maintain usability with these new
formatters. Scans, for example, might not go in the order the user predicts because the stored
format is different from the displayed one. Similarly with where regions split and so forth.
Maybe we should require sort order to be constant across formatted and unformatted row keys
(which would make the ReverseIDFormatter and probably most formatters impossible).

I'm not super familiar with the web UI, but it looks like the only spots we display row keys
is when we specify the start and end rows of each region, and when we issue splits/compactions.
So that shouldn't be too bad to change.
> HBase Shell - Add support for formatting row keys before output
> ---------------------------------------------------------------
>                 Key: HBASE-4818
>                 URL: https://issues.apache.org/jira/browse/HBASE-4818
>             Project: HBase
>          Issue Type: Improvement
>          Components: shell
>            Reporter: Eran Kampf
>            Priority: Trivial
>         Attachments: format3.patch, hbase-4818.patch
>   Original Estimate: 24h
>  Remaining Estimate: 24h
> As many HBase users use binary row keys rather than strings to optimize memory consumption
displaying an escaped string in the HBase shell isn't useful (and takes a lot of screen space)
> Allowing user to provide a row key formatter as part of the scan\get commands would allow
developers to display the row key in a way thats makes sense for them.
> Example:
> scan 'stats', { ROWFORMATTER => MyRowFormatter.new }
> The row formatter simply gets the bytes array key and formats it to a string.
> Its an easy change tomake with simple monkey-patching of the shell commands but I would
be happy to see it as part of the shell itself.

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira


View raw message