Home | About | Sematext search-lucene.com search-hadoop.com
 Search Hadoop and all its subprojects:

Switch to Plain View
HBase, mail # user - PrefixFilter : not working for 'long' keys


+
Mohammad Tariq 2012-12-04, 13:30
+
ramkrishna vasudevan 2012-12-04, 14:32
+
Mohammad Tariq 2012-12-04, 14:36
+
anil gupta 2012-12-04, 17:31
+
Mohammad Tariq 2012-12-04, 19:21
+
Anil Gupta 2012-12-05, 07:26
+
Mohammad Tariq 2012-12-05, 09:06
Copy link to this message
-
Re: PrefixFilter : not working for 'long' keys
lars hofhansl 2012-12-05, 07:16
I assume you are creating your PrefixFilter with something like:
new PrefixFilter(Bytes.toBytes(val));

In your case are you maybe passing a literal like so:
new PrefixFilter(Bytes.toBytes(42));   ?

If that case toBytes will encode an int. You have to do:
new PrefixFilter(Bytes.toBytes(42L));
Just a guess, not knowing what your problem actually is...

-- Lars

________________________________
 From: Mohammad Tariq <[EMAIL PROTECTED]>
To: "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
Sent: Tuesday, December 4, 2012 5:30 AM
Subject: PrefixFilter : not working for 'long' keys
 
Hello list,

    I am trying to use PrefixFilter on my table, whose rowkeys are of type
'long'. But I am getting all the rows in the result. And if use the same
code on rowkeys of type 'String' it is working perfectly fine. Need some
help.

Many thanks.

Regards,
    Mohammad Tariq