You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@hbase.apache.org by "Edward J. Yoon" <ed...@apache.org> on 2008/11/25 11:57:08 UTC

Q, Paging

Let's assume that row key is a email address, a unique identifier for
login user and also a sender & receiver. and column families are meta
data. (e.g. from, to, cc, bcc, reply-to, subject, content, ..., etc)
And, the inbox will display the page as describe below:

ID (row key) : edward@udanax.org
Inbox(3849)
----
from:edward | subject:"hello there"
from:hadoop | subject:"[jira] update ..."
....

Then, I need to sort and page them by historical receive mails. Is it
possible? If so, what is the best way to do pagination on column key
results?

If it won't solved by one table, what is the best schema?
-- 
Best Regards, Edward J. Yoon @ NHN, corp.
edwardyoon@apache.org
http://blog.udanax.org

Re: Q, Paging

Posted by Krzysztof Szlapinski <kr...@starline.hk>.
Edward J. Yoon pisze:
> Thanks, krzysiek
>
> BTW, Could you please show me some example? or How about directly
> contribute to Hbase?
>
>   
Here is a list of documents with examples

http://www.pigi-project.org/index.php?prtlid=1130&kat_id=200&art_id=238

Please take a look at OneToMany getting started example 
<http://docs.google.com/Present?docid=dhsz359t_13g7679qfs&skipauth=true>

krzysiek


> On Tue, Nov 25, 2008 at 9:44 PM, Krzysztof Szlapinski
> <kr...@starline.hk> wrote:
>   
>> Edward J. Yoon pisze:
>>     
>>> Let's assume that row key is a email address, a unique identifier for
>>> login user and also a sender & receiver. and column families are meta
>>> data. (e.g. from, to, cc, bcc, reply-to, subject, content, ..., etc)
>>> And, the inbox will display the page as describe below:
>>>
>>> ID (row key) : edward@udanax.org
>>> Inbox(3849)
>>> ----
>>> from:edward | subject:"hello there"
>>> from:hadoop | subject:"[jira] update ..."
>>> ....
>>>
>>> Then, I need to sort and page them by historical receive mails. Is it
>>> possible? If so, what is the best way to do pagination on column key
>>> results?
>>>
>>> If it won't solved by one table, what is the best schema?
>>>
>>>       
>> Try using indexing engine for Hbase - http://www.pigi-project.org/ - paging,
>> sorting, searching, indexing, ordering is supported
>>
>> krzysiek szlapinski
>>
>>
>>     
>
>
>
>   


Re: Q, Paging

Posted by "Edward J. Yoon" <ed...@apache.org>.
Thanks, krzysiek

BTW, Could you please show me some example? or How about directly
contribute to Hbase?

On Tue, Nov 25, 2008 at 9:44 PM, Krzysztof Szlapinski
<kr...@starline.hk> wrote:
> Edward J. Yoon pisze:
>>
>> Let's assume that row key is a email address, a unique identifier for
>> login user and also a sender & receiver. and column families are meta
>> data. (e.g. from, to, cc, bcc, reply-to, subject, content, ..., etc)
>> And, the inbox will display the page as describe below:
>>
>> ID (row key) : edward@udanax.org
>> Inbox(3849)
>> ----
>> from:edward | subject:"hello there"
>> from:hadoop | subject:"[jira] update ..."
>> ....
>>
>> Then, I need to sort and page them by historical receive mails. Is it
>> possible? If so, what is the best way to do pagination on column key
>> results?
>>
>> If it won't solved by one table, what is the best schema?
>>
>
> Try using indexing engine for Hbase - http://www.pigi-project.org/ - paging,
> sorting, searching, indexing, ordering is supported
>
> krzysiek szlapinski
>
>



-- 
Best Regards, Edward J. Yoon @ NHN, corp.
edwardyoon@apache.org
http://blog.udanax.org

Re: Q, Paging

Posted by Andrew Purtell <ap...@yahoo.com>.
If you are using trunk you can consider secondary indexes
(HBASE-883):

    https://issues.apache.org/jira/browse/HBASE-883

You need to run regionserver.tableindexed.IndexedRegionServer
instead of standard HRegionServer and client side you'll
need to use the classes in client.tableindexed, but this will
"transparently" (more or less) support scanners that return
rows in ascending sort order on the column data of your
choice. Secondary indexes must be established at table
creation time by using IndexedTableAdmin to create the table.

You can create any number of secondary indexes on a table.

This has not been well tested so if you do use it and 
encounter a problem, please file a report.  

   - Andy

> Edward J. Yoon wrote:
> Let's assume that row key is a email address, a unique
> identifier for login user and also a sender & receiver.
> and column families are meta data. (e.g. from, to, cc,
> bcc, reply-to, subject, content, ..., etc) And, the
> inbox will display the page as describe below:
> 
> ID (row key) : edward@udanax.org
> Inbox(3849)
> ----
> from:edward | subject:"hello there"
> from:hadoop | subject:"[jira] update ..."
> ....
>
> Then, I need to sort and page them by historical receive
> mails. Is it possible? If so, what is the best way to do
> pagination on column key results?
>
> If it won't solved by one table, what is the best schema?



      

Re: Q, Paging

Posted by Krzysztof Szlapinski <kr...@starline.hk>.
Edward J. Yoon pisze:
> Let's assume that row key is a email address, a unique identifier for
> login user and also a sender & receiver. and column families are meta
> data. (e.g. from, to, cc, bcc, reply-to, subject, content, ..., etc)
> And, the inbox will display the page as describe below:
>
> ID (row key) : edward@udanax.org
> Inbox(3849)
> ----
> from:edward | subject:"hello there"
> from:hadoop | subject:"[jira] update ..."
> ....
>
> Then, I need to sort and page them by historical receive mails. Is it
> possible? If so, what is the best way to do pagination on column key
> results?
>
> If it won't solved by one table, what is the best schema?
>   
Try using indexing engine for Hbase - http://www.pigi-project.org/ - 
paging, sorting, searching, indexing, ordering is supported

krzysiek szlapinski