hbase-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Madhukar Pandey <madhu...@easility.com>
Subject HBase: Filters not working for negative integers
Date Wed, 26 Jun 2013 07:03:30 GMT
We have implemented QualifierFilter as well as ValueFilter (using
BinaryComparator) of Hbase successfully and they are working fine for most
of our cases. However they are failing in cases like number > -10 or number
< -10

Please note that number = -10 is working perfectly fine. Also, number > 10
and number < 10 are also working fine.

If you want to see the code, please check following links:
1. Q<https://github.com/deanhiller/playorm/blob/master/src/main/java/com/alvazan/orm/layer9z/spi/db/hadoop/CursorColumnSliceHbase.java>We
have implemented QualifierFilter as well as ValueFilter (using
BinaryComparator) of Hbase successfully and they are working fine for most
of our cases. However they are failing in cases like number > -10 or number
< -10


Please note that number = -10 is working perfectly fine. Also, number > 10
and number < 10 are also working fine.


If you want to see the code, please check following links:

1. QualifierFilter - Relevant lines are 126-142

2. Value Filter - Relevant lines are 107-128


As per this blog, this can be an issue with serialization if we want to
store negative values for rowkeys and we should write our own serializers
for comparison.

So we wanted to know:

1. Is it really necessary to write our own serializer in this case?

2. If yes, how? Any example would be great
help.ualifierFilter<https://github.com/deanhiller/playorm/blob/master/src/main/java/com/alvazan/orm/layer9z/spi/db/hadoop/CursorColumnSliceHbase.java>
-
Relevant lines are 126-142
2. Value Filter<https://github.com/deanhiller/playorm/blob/master/src/main/java/com/alvazan/orm/layer9z/spi/db/hadoop/CursorOfHbaseIndexes.java>
-
Relevant lines are 107-128

As per this blog <http://flurrytechblog.wordpress.com/2012/06/12/137492485/>,
this can be an issue with serialization if we want to store negative values
for rowkeys and we should write our own serializers for comparison.
So we wanted to know:
1. Is it really necessary to write our own serializer in this case?
2. If yes, how? Any example would be great help.

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