hbase-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alexey Kovyrin (JIRA)" <j...@apache.org>
Subject [jira] Assigned: (HBASE-2314) [shell] Support for getting counters
Date Fri, 12 Mar 2010 15:53:27 GMT

     [ https://issues.apache.org/jira/browse/HBASE-2314?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Alexey Kovyrin reassigned HBASE-2314:
-------------------------------------

    Assignee: Alexey Kovyrin

> [shell] Support for getting counters
> ------------------------------------
>
>                 Key: HBASE-2314
>                 URL: https://issues.apache.org/jira/browse/HBASE-2314
>             Project: Hadoop HBase
>          Issue Type: Improvement
>            Reporter: stack
>            Assignee: Alexey Kovyrin
>
> From the list:
> {code}
> On Fri, Mar 12, 2010 at 7:11 AM, Ray Duong <ray.duong@gmail.com> wrote:
> > Hi Hbase,
> >
> > I'm a little confuse on how the auto increment works in Hbase.  Shouldn't
> > the value be a number instead of a bytearray?  Is there a way to convert the
> > value into a string?
> >
> >
> > hbase(main):013:0> create 'testcounter', 'cf'
> > 0 row(s) in 2.0950 seconds
> > 3854.986: [GC 3854.987: [ParNew: 19136K->1671K(19136K), 0.0175270 secs]
> > 27147K->11204K(83008K) icms_dc=7 , 0.0177320 secs] [Times: user=0.02
> > sys=0.03, real=0.01 secs]
> > hbase(main):014:0> scan 'testcounter'
> > ROW
> > COLUMN+CELL
> >
> > 0 row(s) in 0.0080 seconds
> > hbase(main):015:0> incr 'testcounter', 'r1', 'cf:counter', 1
> > 0 row(s) in 0.0040 seconds
> > hbase(main):016:0> scan 'testcounter'
> > ROW
> > COLUMN+CELL
> >
> >  r1                          column=cf:counter, timestamp=1268406376222,
> > value=\x00\x00\x00\x00\x00\x00\x00\x0
> >
> > 1
> >
> > 1 row(s) in 0.0110 seconds
> > hbase(main):017:0> incr 'testcounter', 'r1', 'cf:counter', 1
> > 0 row(s) in 0.0030 seconds
> > hbase(main):018:0> scan 'testcounter'
> > ROW
> > COLUMN+CELL
> >
> >  r1                          column=cf:counter, timestamp=1268406376222,
> > value=\x00\x00\x00\x00\x00\x00\x00\x0
> >
> > 2
> >
> > 1 row(s) in 0.0090 seconds
> > hbase(main):019:0> incr 'testcounter', 'r1', 'cf:counter', 1
> > 0 row(s) in 0.0040 seconds
> > hbase(main):020:0> scan 'testcounter'
> > ROW
> > COLUMN+CELL
> >
> >  r1                          column=cf:counter, timestamp=1268406376222,
> > value=\x00\x00\x00\x00\x00\x00\x00\x0
> >
> > 3
> >
> > 1 row(s) in 0.0080 seconds
> > hbase(main):021:0> incr 'testcounter', 'r1', 'cf:counter', 10
> > 0 row(s) in 0.0040 seconds
> > hbase(main):022:0> scan 'testcounter'
> > ROW
> > COLUMN+CELL
> >
> >  r1                          column=cf:counter, timestamp=1268406376222,
> > value=\x00\x00\x00\x00\x00\x00\x00\x0
> >
> > D
> >
> > 1 row(s) in 0.0090 seconds
> > hbase(main):023:0> incr 'testcounter', 'r1', 'cf:counter', 100
> > 0 row(s) in 0.0030 seconds
> > hbase(main):024:0> scan 'testcounter'
> > ROW
> > COLUMN+CELL
> >
> >  r1                          column=cf:counter, timestamp=1268406376222,
> > value=\x00\x00\x00\x00\x00\x00\x00q
> > 1 row(s) in 0.0230 seconds
> >
> {code}
> Add support for counters, something that will get the cell value, turn it into a value
and emit it as a jruby int.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message