You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@hbase.apache.org by Néstor Boscán <ne...@gmail.com> on 2014/11/26 12:12:15 UTC

Invalid Comparater or Expected 4 or 6 but got: N using filter with Java Thrift API

Hi

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

SingleColumnValueFilter('familycolumn', 'column', =, 'value') =>
IllegalArgumentException: Invalid comparator
SingleColumnValueFilter('familycolumn', 'column', EQUAL, 'value') =>
IllegalArgumentException: Invalid comparator
SingleColumnValueFilter('familycolumn', 'column', 'EQUAL', 'value') =>
IllegalArgumentException: Invalid comparator
SingleColumnValueFilter('familycolumn', 'column',
CompareFilter::CompareOp.valueOf('EQUAL'), 'value') =>
IllegalArgumentException: Expected 4 or 6 but got: 3
SingleColumnValueFilter(Bytes.toBytes('familycolumn'),
Bytes.toBytes('column'), CompareFilter::CompareOp.valueOf('EQUAL'),
Bytes.toBytes('value')) => IllegalArgumentException: 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

Re: Invalid Comparater or Expected 4 or 6 but got: N using filter with Java Thrift API

Posted by Néstor Boscán <ne...@gmail.com>.
The error was that in 'value' I have to specify the comparator "binary:",
"binaryprefix:", etc. I was confusing comparator with the compare operator.

Regards,

Néstor

On Wed, Nov 26, 2014 at 6:42 AM, Néstor Boscán <ne...@gmail.com> wrote:

> Hi
>
> I've tried to apply the filters using the Java Thrift API but I get in the
> Thrift server log screen:
>
> SingleColumnValueFilter('familycolumn', 'column', =, 'value') =>
> IllegalArgumentException: Invalid comparator
> SingleColumnValueFilter('familycolumn', 'column', EQUAL, 'value') =>
> IllegalArgumentException: Invalid comparator
> SingleColumnValueFilter('familycolumn', 'column', 'EQUAL', 'value') =>
> IllegalArgumentException: Invalid comparator
> SingleColumnValueFilter('familycolumn', 'column',
> CompareFilter::CompareOp.valueOf('EQUAL'), 'value') =>
> IllegalArgumentException: Expected 4 or 6 but got: 3
> SingleColumnValueFilter(Bytes.toBytes('familycolumn'),
> Bytes.toBytes('column'), CompareFilter::CompareOp.valueOf('EQUAL'),
> Bytes.toBytes('value')) => IllegalArgumentException: 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
>