try creating a FilterList and attach it to scan object.
A FilterList may contain any number of filters, with MUSTPASS.ALL or
This way scan.setFilter(yourFilerList) returns you a ResultScanner object
where rows are not contiguous.
Or you can make use of HTable.batch(...) operation, create as many Get
object u want and then call it like HTable.batch(List<Get> yourGetObjs,
On Fri, May 25, 2012 at 11:18 PM, jack chrispoo <[EMAIL PROTECTED]>wrote:
> Thanks Dhaval, and is there a way to get multiple rows (their keys not
> contiguous) from HBase server with only one request? it seems to me it's
> expensive to send one get request for each one row.
> On Thu, May 24, 2012 at 5:40 PM, Dhaval Shah <[EMAIL PROTECTED]
> > Jack, you can use filters on Get's too..
> > ------------------------------
> > On Fri 25 May, 2012 5:36 AM IST jack chrispoo wrote:
> > >Hi,
> > >
> > >I'm new to HBase and I have a question about using filters. I know that
> > >can use filters with scan, say scan start-key=key1 & end-key=key2 and
> > >a SingleColumnValueFilter: columnA=valueA. But in my java program I need
> > to
> > >do filtering on a set of rows which are not contiguous, my client needs
> > >get all rows with rowid in a set<String> and with columnA=valueA. I
> > >know how this can be done efficiently. I can imagine that I can do a
> > >of the entire table and set filers rowid=... and columnA=valueA; or I
> > >use get function to get the rows with rowid in my set all to my client
> > >do the filtering on my client side. But I think neither way is
> > >Can anyone give me a hint on this?
> > >
> > >Thanks
> > >Yixiao