hbase-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeetendra Gangele <gangele...@gmail.com>
Subject Re: Hbase Row Key Scan
Date Tue, 24 Nov 2015 07:58:06 GMT
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 <beeshma48@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 <beeshma48@gmail.com> wrote:
>
> > HI
> >
> > You can use prefixfilter class while scan
> >
> >
> >
> >
> > On Thu, Nov 19, 2015 at 10:25 AM, dheeraj kavalur <
> > dheerajkavalur50@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.
> >>
> >
> >
> >
> > --
> >
> >
> >
> >
> >
> >
>
>
> --

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message