[ 
https://issues.apache.org/jira/browse/HADOOP-2554?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12557083#action_12557083
 ] 

stack commented on HADOOP-2554:
-------------------------------

I was going to ask if following works:

{code}
  public byte[][] get(Text row, Text column, long maxTimestamp, int numVersions)
{code}

where numVersions is the number of items to display on a single page + 1 so you 
know if you should show the 'next' page button or not.

But that you'd have to look at the results, sort and chop the ones not 
wanted... that seems sufficient reason to add the methods you propose.

+1

(Note you'll need to add long type to the HbaseMapWritable)

> Add a HTable get method that retrieves all versions of a particular column 
> and row between two timestamps
> ---------------------------------------------------------------------------------------------------------
>
>                 Key: HADOOP-2554
>                 URL: https://issues.apache.org/jira/browse/HADOOP-2554
>             Project: Hadoop
>          Issue Type: New Feature
>          Components: contrib/hbase
>            Reporter: Peter Dolan
>            Priority: Minor
>
> The use case:
> * A weblog application for which rows are user ids and posts are stored in a 
> single column, with post date specified by the cell's timestamp.  The 
> application would then need to be able to display all posts for the last week 
> or month.
> * A feedfetcher for which rows are URLs and feed posts are stored in a single 
> column with the post publish date or fetch time stored in the cell's 
> timestamp.  The application would then need to be able to display all posts 
> for the last week or month.
> Proposed API:
> // Get all versions of the specified row and column whose timestamps are in 
> [minTimestamp, maxTimestamp]
> SortedMap<long, byte[]> getTimestamps(Text row, Text column, long 
> minTimestamp, long maxTimestamp);
> // Get all versions of the specified row and column whose timestamps are >= 
> minTimestamp
> SortedMap<long, byte[]> getTimestamps(Text row, Text column, long 
> minTimestamp);
> I'd be happy to take this on myself, as I need it for the above use cases 
> before migrating my application over to HBase.

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

Reply via email to