[
https://issues.apache.org/jira/browse/HBASE-4818?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Ben West updated HBASE-4818:
----------------------------
Attachment: format3.patch
New patch is a lot cleaner. It moves some formatting from table.rb to
HTableFormatter.java like Todd suggested, so it can be used elsewhere.
There is also scope creep: it parses input as well as formats output (so if you
do a get it will translate the rowkey into an internal format first). This is
just because it made my head hurt to have the output of scans be one format but
the input another.
Right now there is only one formatter which is set via a shell param, but could
be set at a table level - just wasn't sure if putting it in .irbrc was best or
if there was a way we could do it in Java so non-shell would work too. Todd
said to make it a "table property", but I don't know what this means.
> 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