Hi, Chaitanya. My code snippet have some problem before. The snippet below
is my new code, it works well in my machine.

    byte[] cfBytes = Bytes.toBytes("cf");
    byte[] qBytes = Bytes.toBytes("q");
    Scan scan = new Scan(Bytes.toBytes(0), Bytes.toBytes(10));
    FilterList filterList = new FilterList();
    SingleColumnValueFilter filter = new SingleColumnValueFilter(
            cfBytes,
            qBytes,
            CompareFilter.CompareOp.GREATER_OR_EQUAL,
            Bytes.toBytes(1));
    filterList.addFilter(filter);
    filter = new SingleColumnValueFilter(
            cfBytes,
            qBytes,
            CompareFilter.CompareOp.LESS,
            Bytes.toBytes(Integer.MIN_VALUE));
    filterList.addFilter(filter);
    scan.setFilter(filterList);



On Wed, Mar 19, 2014 at 8:26 PM, Chaitanya <[email protected]>wrote:

> Hi Ramkrishna,
>
> There is one more problem, i.e. I don't have the rights to add anything to
> the hbase jar.
> The problem with writing a custom comparator is that we have to add it to
> the jar so that its available to all the hbase region servers.
> Please correct me if I am wrong.
> Thanks
>
>
>
> -----
> Regards,
> Chaitanya
> --
> View this message in context:
> http://apache-hbase.679495.n3.nabble.com/Filters-failing-to-compare-negative-numbers-int-float-double-or-long-tp4057268p4057279.html
> Sent from the HBase User mailing list archive at Nabble.com.
>



-- 
Best Regards,
Haosdent Huang

Reply via email to