Anoop Sam John | 9 May 2012 13:54
Favicon

RE: HBase Between Filters

 <at> Sanky

SingleColumnValueFilter filter1 = new SingleColumnValueFilter(Bytes.toBytes("TRAN"),
              Bytes.toBytes("TRAN_ID"), CompareFilter.CompareOp.GREATER, new
BinaryComparator(Bytes.toBytes("1000")));

Are you sure you have used Bytes.toBytes(int) for storing?  Here when you created the filter atleast I can
see you passed 1000 as String to create the bytes. Pls make sure to use int and create the bytes both while
storing the [Creation of Put] and when u create the filter and see once....  I have checked the
BinaryComparator and it should work as per your expectation if you have used int in all places....

Bytes.toBytes(int) to be used every where when your column type is int...

-Anoop-
________________________________________
From: sanky999 [sanky999@...]
Sent: Tuesday, May 08, 2012 12:16 PM
To: hbase-dev@...
Subject: RE: HBase Between Filters

When  using org.apache.hadoop.hbase.client.Increment api it allows to
addColumn with Long value, but there is no way to do the same using
org.apache.hadoop.hbase.client.Put api and when I tried adding Long values
using Put api it stores in\x0 format but when I try to retrieve it, it
prints as unknown character.

--
View this message in context: http://apache-hbase.679495.n3.nabble.com/HBase-Between-Filters-tp3962242p3970550.html
Sent from the HBase - Developer mailing list archive at Nabble.com.


Gmane