[ 
https://issues.apache.org/jira/browse/HBASE-3729?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13016229#comment-13016229
 ] 

Eric Charles commented on HBASE-3729:
-------------------------------------

I applied 3729-v3.txt, and now:

hbase(main):001:0> get 'test', 'row1', { TIMERANGE => [0, 3000000000000], 
VERSIONS => 4}
COLUMN                   CELL
 cf:a                    timestamp=1301984853863, value=value2
 cf:a                    timestamp=1301984830139, value=value1
2 row(s) in 0.4100 seconds

==> Great!

hbase(main):002:0> get 'test', 'row1', { TIMERANGE => [0, 3000000000000]}
COLUMN                   CELL
 cf:a                    timestamp=1301984853863, value=value2
1 row(s) in 0.0620 seconds

==> If versions is not specified, it does not return the expected list.

I think an error message will be better suited, otherwise many users will 
simply provide the TIMERANGE predicate without the VERSIONS, and will think 
there's only one cell, but there may be more... So VERSIONS should be mandatory 
if TIMERANGE is provided. The other/better? options would be to let return all 
versions if VERSIONS is not provided.


> 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-v3.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

Reply via email to