[
https://issues.apache.org/jira/browse/HBASE-6592?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13455537#comment-13455537
]
Jie Huang commented on HBASE-6592:
----------------------------------
here list the examples in the unit test case:
{code}
+
+ define_test "get should support COLUMNS with value CONVERTER information"
do
+ @test_table.put(1, "x:c", [1024].pack('N'))
+ @test_table.put(1, "x:d", [98].pack('N'))
+ begin
+ res = @test_table._get_internal('1', ['x:c:toInt'],
['x:d:c(org.apache.hadoop.hbase.util.Bytes).toInt'])
+ assert_not_nil(res)
+ assert_kind_of(Hash, res)
+ assert_not_nil(/value=1024/.match(res['x:c']))
+ assert_not_nil(/value=98/.match(res['x:d']))
+ ensure
+ # clean up newly added columns for this test only.
+ @test_table.delete(1, "x:c")
+ @test_table.delete(1, "x:d")
+ end
+ end
+
+ define_test "scan should support COLUMNS with value CONVERTER information"
do
+ @test_table.put(1, "x:c", [1024].pack('N'))
+ @test_table.put(1, "x:d", [98].pack('N'))
+ begin
+ res = @test_table._scan_internal COLUMNS => ['x:c:toInt',
'x:d:c(org.apache.hadoop.hbase.util.Bytes).toInt']
+ assert_not_nil(res)
+ assert_kind_of(Hash, res)
+ assert_not_nil(/value=1024/.match(res['1']['x:c']))
+ assert_not_nil(/value=98/.match(res['1']['x:d']))
+ ensure
+ # clean up newly added columns for this test only.
+ @test_table.delete(1, "x:c")
+ @test_table.delete(1, "x:d")
+ end
+end
{code}
> [shell] Add means of custom formatting output by column
> -------------------------------------------------------
>
> Key: HBASE-6592
> URL: https://issues.apache.org/jira/browse/HBASE-6592
> Project: HBase
> Issue Type: New Feature
> Components: shell
> Reporter: stack
> Priority: Minor
> Labels: noob
> Attachments: hbase-6592.patch, hbase-6592-v2.patch,
> hbase-6952-v1.patch
>
>
> See Jacques suggestion toward end of this thread for how we should allow
> adding a custom formatter per column to use outputting column content in
> shell:
> http://search-hadoop.com/m/2WxUB1fuxL11/Printing+integers+in+the+Hbase+shell&subj=Printing+integers+in+the+Hbase+shell
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira