You can use the range here. here startRow will be "userId | useridType|" and endRow will "userId | useridType|+~" i am adding '~' for termination. You need to read about how range scan work in Hbase.
Regards jeetendra On 24 November 2015 at 09:35, beeshma r <beeshm...@gmail.com> wrote: > HI , > > You can use prefixfilter class while scan > > > > byte[] prefix = Bytes.toBytes("key"); Scan scan = new Scan(); > Filter > prefixFilter = new PrefixFilter(prefix); > scan.setFilter(prefixFilter); ResultScanner resultScanner = > Main_Table.getScanner(scan); > > > > > Thanks > > Beeshma > > > On Tue, Nov 24, 2015 at 9:34 AM, beeshma r <beeshm...@gmail.com> wrote: > > > HI > > > > You can use prefixfilter class while scan > > > > > > > > > > On Thu, Nov 19, 2015 at 10:25 AM, dheeraj kavalur < > > dheerajkavalu...@gmail.com> wrote: > > > >> Hi, > >> > >> Can someone help how to query on partial rowkey. > >> > >> *Table Name :* URLdata > >> > >> > >> *Column Family:* BaseID > >> > >> > >> *Columns:*1. userId > >> > >> 2. userIdType > >> > >> 3. username > >> > >> 4. country > >> > >> *RowKey Design :* > >> > >> userId | useridType|country (Pipe > >> separated > >> columns concatenated) > >> > >> > >> *Requirement*: : > >> > >> ยท Count Distinct > >> (userId| useridType) combination from the table. > >> Have to do partial scan (read ) on the > >> composite rowkey. > >> > >> The count has to been done on Map-side only by > >> reading partial key and actual userid from column in hbase and count the > >> distinct. > >> > > > > > > > > -- > > > > > > > > > > > > > > > --