hbase-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Anoop Sam John <anoo...@huawei.com>
Subject RE: HBase Between Filters
Date Wed, 09 May 2012 11:54:00 GMT

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

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...

From: sanky999 [sanky999@yahoo.co.in]
Sent: Tuesday, May 08, 2012 12:16 PM
To: hbase-dev@hadoop.apache.org
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.

View raw message