Hi, Sure, I tried also by prefixing with admin, and it was working fine. I was just wondering that is there any way that we can get the information from Hbase using some part of Composite keys or wild card characters ?
Thanks -----Original Message----- From: Buttler, David [mailto:[email protected]] Sent: Monday, August 29, 2011 8:46 PM To: [email protected] Subject: RE: Scan not working properly on composite keys The scan started at "viewer/user3" because that is the next key after "user2". If your keys have a prefix, like admin or viewer, then you need to prepend that to your start row as well. Hbase has no magic where it can intuit your intent. Dave -----Original Message----- From: Stuti Awasthi [mailto:[email protected]] Sent: Monday, August 29, 2011 12:39 AM To: [email protected] Subject: Scan not working properly on composite keys Hi Friends, I have a query regarding scan operation on composite keys. I have table as follows : admin/user1 column=info:email, timestamp=1314594930540, value=abc admin/ user1 column=info:mobile, timestamp=1314594940686, value=123456 admin/ user1 column=info:name, timestamp=1314594915091, value=def admin/user2 column=info:email, timestamp=1314597627865, value=def admin/ user2 column=info:mobile, timestamp=1314597636663, value=67890 admin/ user2 column=info:name, timestamp=1314597614585, value=pqr viewer/user3 column=info:email, timestamp=1314601194373, value=pqr viewer/ user3 column=info:mobile, timestamp=1314601256479, value=12345 viewer/ user3 column=info:name, timestamp=1314601207662, value=xyz I want to find all the records of "user2". For this I tried following query but it is giving me all records of user3 : hbase(main):005:0> scan 'users', {STARTROW=>'user2'} ROW COLUMN+CELL viewer/user3 column=info:email, timestamp=1314601194373, [email protected] viewer/ user3 column=info:mobile, timestamp=1314601256479, value=37498734893 viewer/ user3 column=info:name, timestamp=1314601207662, value=satyendra pandey 1 row(s) in 0.0330 seconds I also tried various queries for this but not getting correct result. I am definitely missing something. Please help Thanks & Regards Stuti Awasthi Sr Specialist ________________________________ ::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. -----------------------------------------------------------------------------------------------------------------------
