[
https://issues.apache.org/jira/browse/HBASE-3729?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13016256#comment-13016256
]
Eric Charles commented on HBASE-3729:
-------------------------------------
I agree that shell and client behavior must be the same.
Now the question is about the client:I can read on
http://hbase.apache.org/docs/current/api/org/apache/hadoop/hbase/client/Get.html#setTimeRange%28long,%20long%29
"Get versions of columns only within the specified timestamp range, [minStamp,
maxStamp)."
The Get class javadoc also says "To only retrieve columns within a specific
range of version timestamps, execute setTimeRange.".
The setMaxVersions doc says : "Get up to the specified number of versions of
each column.".
>From that, I don't see how I can guess that the result further a setTimeRange
>is limited by setMaxVersions...
At first sight, I find that if you don't set a maxVersion, you should simply
return all results within the time range, but that's another discussion...
To map the client, shell should thus return only 1 result if VERSIONS is not
provided.
Also, the setTimeRange javadoc could be enhanced to mention the result is
limited by the version (with default = 1) (btw, I don't think it is worth I
open a jira for the javadoc upgrade).
Cheers,
Eric
> 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-v4.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