hbase-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Néstor Boscán <nesto...@gmail.com>
Subject Re: Can I use the Thrift API to scan with filters?
Date Tue, 25 Nov 2014 19:14:08 GMT
Hi

Thanks for the quick replies.

I've tried to apply the filters but I get in the Thrift server log screen:

SingleColumnValueFilter('familycolumn', 'column', =, 'value') => Invalid
comparator
SingleColumnValueFilter('familycolumn', 'column', EQUAL, 'value') =>
Invalid comparator
SingleColumnValueFilter('familycolumn', 'column', 'EQUAL', 'value') =>
Invalid comparator
SingleColumnValueFilter('familycolumn', 'column',
CompareFilter::CompareOp.valueOf('EQUAL'), 'value') => Expected 4 or 6 but
got: 3
SingleColumnValueFilter(Bytes.toBytes('familycolumn'),
Bytes.toBytes('column'), CompareFilter::CompareOp.valueOf('EQUAL'),
Bytes.toBytes('value')) => Expected 4 or 6 but got: 1

I couldn't find on the Internet an example of a SingleColumnValueFilter
with the Thrift Java API.

Regards,

Néstor

On Mon, Nov 24, 2014 at 10:20 PM, Stack <stack@duboce.net> wrote:

> On Mon, Nov 24, 2014 at 6:06 PM, Bharath Vissapragada <
> bharathv@cloudera.com
> > wrote:
>
> > Yes, you can. Did you try the scannerOpenWithScan() call? It takes a
> TScan
> > as input and you can build it with a filterString. Closest examples I
> could
> > find are [1] and [2]  but I believe its not difficult to extend these.
> >
> > [1]
> >
> >
> https://github.com/apache/hbase/blob/master/hbase-thrift/src/test/java/org/apache/hadoop/hbase/thrift/TestThriftServer.java#L540
> > [2]
> >
> >
> https://github.com/apache/hbase/blob/master/hbase-examples/src/main/java/org/apache/hadoop/hbase/thrift/DemoClient.java#L64
>
>
>
> To add to @Bharath's answer, see http://hbase.apache.org/book.html#thrift
>
> St.Ack
>
>
>
> >
> >
> > On Tue, Nov 25, 2014 at 6:49 AM, Néstor Boscán <nestorjb@gmail.com>
> wrote:
> >
> > > Hi
> > >
> > > I've been searching for Thrift Java API examples with filters but can't
> > > find any. Does the current Thrift API supports it?
> > >
> > > Regards,
> > >
> > > Néstor
> > >
> >
> >
> >
> > --
> > Bharath Vissapragada
> > <http://www.cloudera.com>
> >
>

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