You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@hbase.apache.org by Dingding Ye <ye...@gmail.com> on 2008/09/19 17:45:22 UTC

Why timestamp only return results whose timestamp <= this value

The query apis with timestamp such as getRow, getScanner will return
results whose timestamp <= this value.
But,  Is the newer data more important than the older ones?

Is there a way to get results whose timestamp >= this value?

Thanks. Best regards.

sishen

RE: Why timestamp only return results whose timestamp <= this value

Posted by Jim Kellerman <Ji...@microsoft.com>.
You can always get the most recent version by not specifying any time stamp.
HBASE-33 & HBASE-52 cover getting all versions from a scanner or all versions within a range of timestamps. A range could be from (some time in past) - now.

HBASE-847 and its related issues do the same for gets.

---
Jim Kellerman, Powerset (Live Search, Microsoft Corporation)


> -----Original Message-----
> From: Dingding Ye [mailto:yedingding@gmail.com]
> Sent: Friday, September 19, 2008 1:45 PM
> To: hbase-user@hadoop.apache.org
> Subject: Re: Why timestamp only return results whose timestamp <= this
> value
>
> As i see, it's a bit difference with HBASE-33.
>
> 847 is to get all the versions of cells while 33 is more care about
> the top version.
>
> Personally speaking, for the range issue, i think users are mostly
> care about the top version instead of all the versions.
>
> For example, that's my usercase:  getRow('sishen', 'url:',
> minTimestamp, maxTimestamp)
>
>
>
> On Sat, Sep 20, 2008 at 4:25 AM, Jim Kellerman
> <Ji...@microsoft.com> wrote:
> > HBASE-847 (and its sub-issues) will do the same for get.
> >
> > ---
> > Jim Kellerman, Powerset (Live Search, Microsoft Corporation)
> >
> >
> >> -----Original Message-----
> >> From: Dingding Ye [mailto:yedingding@gmail.com]
> >> Sent: Friday, September 19, 2008 1:22 PM
> >> To: hbase-user@hadoop.apache.org
> >> Subject: Re: Why timestamp only return results whose timestamp <= this
> >> value
> >>
> >> Yes. It's very similar.  Besides the scanner, i also need the same
> >> functionality in getRow because i also need a range based on a row
> >> key.
> >> I have checked the getRow implemention and found that while trying to
> >> get the data from the MapFile, it has the comparation:
> >>
> >> key.matchesWithoutColumn(readkey)
> >>
> >> This statement will return the data older than the specified
> timestamps.
> >>
> >> I agree that there will be some big changes to the server side codes.
> >> Looking forward to that and hope i can help, :)
> >>
> >> Best regards.
> >>
> >> sishen
> >>
> >>
> >> On Sat, Sep 20, 2008 at 3:43 AM, stack <st...@duboce.net> wrote:
> >> > Is HBASE-33 what you need?
> >> > St.Ack
> >> >
> >> > Dingding Ye wrote:
> >> >>
> >> >> For example,  i store some urls in the table.  I want to find the
> urls
> >> >> which are added today.
> >> >>
> >> >> i would like to specify the time to the beginning of today and get
> the
> >> >> urls newer than the timestamp.
> >> >> But the problem now is that the api will return the urls older than
> >> >> the timestamp, but newer than the timestamp.
> >> >>
> >> >> What's the main thoughts to design such apis that return the older
> >> >> data?  Maybe the answer will help me understand
> >> >> the project more, :)
> >> >>
> >> >> Thanks.
> >> >>
> >> >> sishen
> >> >>
> >> >>
> >> >> On Sat, Sep 20, 2008 at 12:00 AM, stack <st...@duboce.net> wrote:
> >> >>
> >> >>>
> >> >>> Dingding Ye wrote:
> >> >>>
> >> >>>>
> >> >>>> The query apis with timestamp such as getRow, getScanner will
> return
> >> >>>> results whose timestamp <= this value.
> >> >>>> But,  Is the newer data more important than the older ones?
> >> >>>>
> >> >>>>
> >> >>>
> >> >>> Depends on your application but usually yes.
> >> >>>
> >> >>>
> >> >>>>
> >> >>>> Is there a way to get results whose timestamp >= this value?
> >> >>>>
> >> >>>>
> >> >>>>
> >> >>>
> >> >>> Not at the moment.
> >> >>>
> >> >>> Tell us more about your need Sishen.   Maybe there is a workaround
> we
> >> can
> >> >>> figure.
> >> >>>
> >> >>> St.Ack
> >> >>>
> >> >>>
> >> >
> >> >
> >
> >


Re: Why timestamp only return results whose timestamp <= this value

Posted by Dingding Ye <ye...@gmail.com>.
As i see, it's a bit difference with HBASE-33.

847 is to get all the versions of cells while 33 is more care about
the top version.

Personally speaking, for the range issue, i think users are mostly
care about the top version instead of all the versions.

For example, that's my usercase:  getRow('sishen', 'url:',
minTimestamp, maxTimestamp)



On Sat, Sep 20, 2008 at 4:25 AM, Jim Kellerman
<Ji...@microsoft.com> wrote:
> HBASE-847 (and its sub-issues) will do the same for get.
>
> ---
> Jim Kellerman, Powerset (Live Search, Microsoft Corporation)
>
>
>> -----Original Message-----
>> From: Dingding Ye [mailto:yedingding@gmail.com]
>> Sent: Friday, September 19, 2008 1:22 PM
>> To: hbase-user@hadoop.apache.org
>> Subject: Re: Why timestamp only return results whose timestamp <= this
>> value
>>
>> Yes. It's very similar.  Besides the scanner, i also need the same
>> functionality in getRow because i also need a range based on a row
>> key.
>> I have checked the getRow implemention and found that while trying to
>> get the data from the MapFile, it has the comparation:
>>
>> key.matchesWithoutColumn(readkey)
>>
>> This statement will return the data older than the specified timestamps.
>>
>> I agree that there will be some big changes to the server side codes.
>> Looking forward to that and hope i can help, :)
>>
>> Best regards.
>>
>> sishen
>>
>>
>> On Sat, Sep 20, 2008 at 3:43 AM, stack <st...@duboce.net> wrote:
>> > Is HBASE-33 what you need?
>> > St.Ack
>> >
>> > Dingding Ye wrote:
>> >>
>> >> For example,  i store some urls in the table.  I want to find the urls
>> >> which are added today.
>> >>
>> >> i would like to specify the time to the beginning of today and get the
>> >> urls newer than the timestamp.
>> >> But the problem now is that the api will return the urls older than
>> >> the timestamp, but newer than the timestamp.
>> >>
>> >> What's the main thoughts to design such apis that return the older
>> >> data?  Maybe the answer will help me understand
>> >> the project more, :)
>> >>
>> >> Thanks.
>> >>
>> >> sishen
>> >>
>> >>
>> >> On Sat, Sep 20, 2008 at 12:00 AM, stack <st...@duboce.net> wrote:
>> >>
>> >>>
>> >>> Dingding Ye wrote:
>> >>>
>> >>>>
>> >>>> The query apis with timestamp such as getRow, getScanner will return
>> >>>> results whose timestamp <= this value.
>> >>>> But,  Is the newer data more important than the older ones?
>> >>>>
>> >>>>
>> >>>
>> >>> Depends on your application but usually yes.
>> >>>
>> >>>
>> >>>>
>> >>>> Is there a way to get results whose timestamp >= this value?
>> >>>>
>> >>>>
>> >>>>
>> >>>
>> >>> Not at the moment.
>> >>>
>> >>> Tell us more about your need Sishen.   Maybe there is a workaround we
>> can
>> >>> figure.
>> >>>
>> >>> St.Ack
>> >>>
>> >>>
>> >
>> >
>
>

RE: Why timestamp only return results whose timestamp <= this value

Posted by Jim Kellerman <Ji...@microsoft.com>.
HBASE-847 (and its sub-issues) will do the same for get.

---
Jim Kellerman, Powerset (Live Search, Microsoft Corporation)


> -----Original Message-----
> From: Dingding Ye [mailto:yedingding@gmail.com]
> Sent: Friday, September 19, 2008 1:22 PM
> To: hbase-user@hadoop.apache.org
> Subject: Re: Why timestamp only return results whose timestamp <= this
> value
>
> Yes. It's very similar.  Besides the scanner, i also need the same
> functionality in getRow because i also need a range based on a row
> key.
> I have checked the getRow implemention and found that while trying to
> get the data from the MapFile, it has the comparation:
>
> key.matchesWithoutColumn(readkey)
>
> This statement will return the data older than the specified timestamps.
>
> I agree that there will be some big changes to the server side codes.
> Looking forward to that and hope i can help, :)
>
> Best regards.
>
> sishen
>
>
> On Sat, Sep 20, 2008 at 3:43 AM, stack <st...@duboce.net> wrote:
> > Is HBASE-33 what you need?
> > St.Ack
> >
> > Dingding Ye wrote:
> >>
> >> For example,  i store some urls in the table.  I want to find the urls
> >> which are added today.
> >>
> >> i would like to specify the time to the beginning of today and get the
> >> urls newer than the timestamp.
> >> But the problem now is that the api will return the urls older than
> >> the timestamp, but newer than the timestamp.
> >>
> >> What's the main thoughts to design such apis that return the older
> >> data?  Maybe the answer will help me understand
> >> the project more, :)
> >>
> >> Thanks.
> >>
> >> sishen
> >>
> >>
> >> On Sat, Sep 20, 2008 at 12:00 AM, stack <st...@duboce.net> wrote:
> >>
> >>>
> >>> Dingding Ye wrote:
> >>>
> >>>>
> >>>> The query apis with timestamp such as getRow, getScanner will return
> >>>> results whose timestamp <= this value.
> >>>> But,  Is the newer data more important than the older ones?
> >>>>
> >>>>
> >>>
> >>> Depends on your application but usually yes.
> >>>
> >>>
> >>>>
> >>>> Is there a way to get results whose timestamp >= this value?
> >>>>
> >>>>
> >>>>
> >>>
> >>> Not at the moment.
> >>>
> >>> Tell us more about your need Sishen.   Maybe there is a workaround we
> can
> >>> figure.
> >>>
> >>> St.Ack
> >>>
> >>>
> >
> >


Re: Why timestamp only return results whose timestamp <= this value

Posted by Dingding Ye <ye...@gmail.com>.
Yes. It's very similar.  Besides the scanner, i also need the same
functionality in getRow because i also need a range based on a row
key.
I have checked the getRow implemention and found that while trying to
get the data from the MapFile, it has the comparation:

key.matchesWithoutColumn(readkey)

This statement will return the data older than the specified timestamps.

I agree that there will be some big changes to the server side codes.
Looking forward to that and hope i can help, :)

Best regards.

sishen


On Sat, Sep 20, 2008 at 3:43 AM, stack <st...@duboce.net> wrote:
> Is HBASE-33 what you need?
> St.Ack
>
> Dingding Ye wrote:
>>
>> For example,  i store some urls in the table.  I want to find the urls
>> which are added today.
>>
>> i would like to specify the time to the beginning of today and get the
>> urls newer than the timestamp.
>> But the problem now is that the api will return the urls older than
>> the timestamp, but newer than the timestamp.
>>
>> What's the main thoughts to design such apis that return the older
>> data?  Maybe the answer will help me understand
>> the project more, :)
>>
>> Thanks.
>>
>> sishen
>>
>>
>> On Sat, Sep 20, 2008 at 12:00 AM, stack <st...@duboce.net> wrote:
>>
>>>
>>> Dingding Ye wrote:
>>>
>>>>
>>>> The query apis with timestamp such as getRow, getScanner will return
>>>> results whose timestamp <= this value.
>>>> But,  Is the newer data more important than the older ones?
>>>>
>>>>
>>>
>>> Depends on your application but usually yes.
>>>
>>>
>>>>
>>>> Is there a way to get results whose timestamp >= this value?
>>>>
>>>>
>>>>
>>>
>>> Not at the moment.
>>>
>>> Tell us more about your need Sishen.   Maybe there is a workaround we can
>>> figure.
>>>
>>> St.Ack
>>>
>>>
>
>

Re: Why timestamp only return results whose timestamp <= this value

Posted by stack <st...@duboce.net>.
Is HBASE-33 what you need?
St.Ack

Dingding Ye wrote:
> For example,  i store some urls in the table.  I want to find the urls
> which are added today.
>
> i would like to specify the time to the beginning of today and get the
> urls newer than the timestamp.
> But the problem now is that the api will return the urls older than
> the timestamp, but newer than the timestamp.
>
> What's the main thoughts to design such apis that return the older
> data?  Maybe the answer will help me understand
> the project more, :)
>
> Thanks.
>
> sishen
>
>
> On Sat, Sep 20, 2008 at 12:00 AM, stack <st...@duboce.net> wrote:
>   
>> Dingding Ye wrote:
>>     
>>> The query apis with timestamp such as getRow, getScanner will return
>>> results whose timestamp <= this value.
>>> But,  Is the newer data more important than the older ones?
>>>
>>>       
>> Depends on your application but usually yes.
>>
>>     
>>> Is there a way to get results whose timestamp >= this value?
>>>
>>>
>>>       
>> Not at the moment.
>>
>> Tell us more about your need Sishen.   Maybe there is a workaround we can
>> figure.
>>
>> St.Ack
>>
>>     


Re: Why timestamp only return results whose timestamp <= this value

Posted by Dingding Ye <ye...@gmail.com>.
For example,  i store some urls in the table.  I want to find the urls
which are added today.

i would like to specify the time to the beginning of today and get the
urls newer than the timestamp.
But the problem now is that the api will return the urls older than
the timestamp, but newer than the timestamp.

What's the main thoughts to design such apis that return the older
data?  Maybe the answer will help me understand
the project more, :)

Thanks.

sishen


On Sat, Sep 20, 2008 at 12:00 AM, stack <st...@duboce.net> wrote:
> Dingding Ye wrote:
>>
>> The query apis with timestamp such as getRow, getScanner will return
>> results whose timestamp <= this value.
>> But,  Is the newer data more important than the older ones?
>>
>
> Depends on your application but usually yes.
>
>> Is there a way to get results whose timestamp >= this value?
>>
>>
>
> Not at the moment.
>
> Tell us more about your need Sishen.   Maybe there is a workaround we can
> figure.
>
> St.Ack
>

Re: Why timestamp only return results whose timestamp <= this value

Posted by stack <st...@duboce.net>.
Dingding Ye wrote:
> The query apis with timestamp such as getRow, getScanner will return
> results whose timestamp <= this value.
> But,  Is the newer data more important than the older ones?
>   

Depends on your application but usually yes.

> Is there a way to get results whose timestamp >= this value?
>
>   
Not at the moment.

Tell us more about your need Sishen.   Maybe there is a workaround we 
can figure.

St.Ack