[
https://issues.apache.org/jira/browse/HBASE-3729?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13015776#comment-13015776
]
Eric Charles commented on HBASE-3729:
-------------------------------------
Right, get.rb was there.
I applied patch and tested with
hbase(main):001:0> create 'test', 'cf'
hbase(main):003:0> put 'test', 'row1', 'cf:a', 'value1'
hbase(main):004:0> scan 'test'
ROW COLUMN+CELL
row1 column=cf:a,
timestamp=1301984830139, value=value1
==> value1 ==> OK
1 row(s) in 0.0440 seconds
hbase(main):005:0> put 'test', 'row1', 'cf:a', 'value2'
0 row(s) in 0.0610 seconds
hbase(main):006:0> scan 'test'
ROW COLUMN+CELL
row1 column=cf:a,
timestamp=1301984853863, value=value2
==> value2 ==> OK (the last one)
hbase(main):007:0> get 'test', 'row1'
COLUMN CELL
cf:a timestamp=1301984853863,
value=value2
1 row(s) in 0.1350 seconds
==> value2 ==> OK (the last one)
hbase(main):009:0> get 'test', 'row1', { TIMERANGE => [0, 3000000000000]}
COLUMN CELL
cf:a timestamp=1301984853863,
value=value2
1 row(s) in 0.0260 seconds
==> I would have expected a list of values, namely value1 and value2, because
they both map the given timerange predicate.
Or maybe I missunderstood what we were talking about?
> Get cells via shell with a time range predicate
> -----------------------------------------------
>
> Key: HBASE-3729
> URL: https://issues.apache.org/jira/browse/HBASE-3729
> Project: HBase
> Issue Type: New Feature
> Components: shell
> Reporter: Eric Charles
> Assignee: Ted Yu
> Attachments: 3729-v2.txt, 3729.txt
>
>
> HBase shell allows to specify a timestamp to get a value
> - get 't1', 'r1', {COLUMN => 'c1', TIMESTAMP => ts1}
> If you don't give the exact timestamp, you get nothing... so it's difficult
> to get the cell previous versions.
> It would be fine to have a "time range" predicate based get.
> The shell syntax could be (depending on technical feasibility)
> - get 't1', 'r1', {COLUMN => 'c1', TIMERANGE => (start_timestamp,
> end_timestamp)}
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira