You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by "Jonathan Hsieh (JIRA)" <ji...@apache.org> on 2012/12/10 19:15:22 UTC
[jira] [Comment Edited] (HBASE-7306) [shell] Count shell command to
return ruby bindable value.
[ https://issues.apache.org/jira/browse/HBASE-7306?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13528118#comment-13528118 ]
Jonathan Hsieh edited comment on HBASE-7306 at 12/10/12 6:15 PM:
-----------------------------------------------------------------
{code}
hbase(main):004:0> count 'test-table-clone'
Current count: 1000, row: 5167aca0cc67fe216140fd438eb906e3
Current count: 2000, row: a4fa7175d4757e45eac71a8487751f63
Current count: 3000, row: f7e6c85504ce6e82442c770f7c8606f0
3100 row(s) in 0.6370 seconds
=> 3100
hbase(main):005:0>
hbase(main):006:0*
hbase(main):007:0* x = count 'test-table-clone'
Current count: 1000, row: 5167aca0cc67fe216140fd438eb906e3
Current count: 2000, row: a4fa7175d4757e45eac71a8487751f63
Current count: 3000, row: f7e6c85504ce6e82442c770f7c8606f0
3100 row(s) in 0.6280 seconds
=> 3100
hbase(main):008:0> x
=> 3100
hbase(main):009:0>
{code}
was (Author: jmhsieh):
{code}
hbase(main):004:0> count 'test-table-clone'
Current count: 1000, row: 5167aca0cc67fe216140fd438eb906e3
Current count: 2000, row: a4fa7175d4757e45eac71a8487751f63
Current count: 3000, row: f7e6c85504ce6e82442c770f7c8606f0
3100 row(s) in 0.6370 seconds
=> 3100
hbase(main):005:0>
{code}
> [shell] Count shell command to return ruby bindable value.
> ----------------------------------------------------------
>
> Key: HBASE-7306
> URL: https://issues.apache.org/jira/browse/HBASE-7306
> Project: HBase
> Issue Type: Sub-task
> Components: Client
> Affects Versions: 0.96.0
> Reporter: Jonathan Hsieh
> Assignee: Jonathan Hsieh
> Fix For: 0.96.0
>
> Attachments: hbase-7306.patch
>
>
> Currently if you have a table foo with 5 rows in it, you can run this command:
> {code}
> hbase(main):001:0> x = count 'foo'
> 3100 row(s) in 0.7030 seconds
> hbase(main):001:0> x
> nil
> {code}
> Ideally, the 'x' variable should be 5. so something like this coudl be done:
> {code}
> Kernel.exit 127 if x != 5
> {code}
> This is useful for having scripts that can check a condition and act.
--
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