You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@hbase.apache.org by Stuti Awasthi <st...@hcl.com> on 2011/12/05 12:24:53 UTC

Combining Multiple queries in Hbase

Hi all,
I have some query related to combining multiple queries in Hbase.

I want my data to be stored in decreasing order i.e latest entry should appear first in Hbase:

Schema :

Row Key                                 CF
Timestamp-userid-<public/private>               Info


Now I have to get data from 3 queries on this table :
1st Query :     *-myuserid-*
2nd Query:      *-X no of userids- *
3rd Query:      Full Row Key


For the first Query, I can use RowFilter and get all the rows based on myuserid.

I have problem with the rest 2 queries.:
For the Second query , I will be having say 1000 userid, and I want each row from these userids
Similarly for the 3rd query , I will be having say 1000 rowkey value and I want to have data where these rowkey are present.

Now the main part: I want the output from all these queries in descending order as stored in Hbase.

I have tried with FilterList, but issue with that is for 1000 userid, I will have to put 1000 filter object in FilterList. I am sure there should be some other way to solve this issue.
Other problem is if I fire 3 separate queries then output of each of them will be different order by timestamp and then I have to manually arrange them in Timestamp order.

How can I deal this problem efficiently.
Please Suggest




Regards,
Stuti Awasthi
HCL Comnet Systems and Services Ltd
F-8/9 Basement, Sec-3,Noida.


::DISCLAIMER::
-----------------------------------------------------------------------------------------------------------------------

The contents of this e-mail and any attachment(s) are confidential and intended for the named recipient(s) only.
It shall not attach any liability on the originator or HCL or its affiliates. Any views or opinions presented in
this email are solely those of the author and may not necessarily reflect the opinions of HCL or its affiliates.
Any form of reproduction, dissemination, copying, disclosure, modification, distribution and / or publication of
this message without the prior written consent of the author of this e-mail is strictly prohibited. If you have
received this email in error please delete it and notify the sender immediately. Before opening any mail and
attachments please check them for viruses and defect.

-----------------------------------------------------------------------------------------------------------------------