[
https://issues.apache.org/jira/browse/HBASE-4818?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13226347#comment-13226347
]
Ben West commented on HBASE-4818:
---------------------------------
Todd: I think since we're using JRuby the formatter can be a java class, right?
You'd just have --format=org.apache....
But I guess we could store it as a table property.
(Btw: if the formatters are to be useful outside of shell, we'll need a revamp
of how they work. Right now, it just formats text without much knowledge of
what the text is - we'd probably want to have FormatKey() FormatColumn() etc.
methods. Which is a good idea anyway.)
> 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: 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