hbase-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kun yan <yankunhad...@gmail.com>
Subject how to use SingleColumnValueFilter
Date Fri, 11 Oct 2013 08:22:43 GMT
Hi all
This is part of my hbase code, I want to query longitude greater than 144,
but I can not get the correct results
My question is whether the comparison is based on dictionary order. If I
want to filter it based on a comparison of type double what to do, that is,
the numerical comparison

thanks a lot

 HTablePool pool = new HTablePool();
          HTableInterface table = pool.getTable(data_rh);
SingleColumnValueFilter filter1 = new SingleColumnValueFilter(
Bytes.toBytes("s"), Bytes.toBytes("LONGITUDE"),
CompareFilter.CompareOp.GREATER,
Bytes.toBytes(LONGTIUDE_DOUBLE));
Scan scan = new Scan();
scan.addColumn(Bytes.toBytes("s"), Bytes.toBytes("LONGITUDE"));
scan.setFilter(filter1);
-- 

In the Hadoop world, I am just a novice, explore the entire Hadoop
ecosystem, I hope one day I can contribute their own code

YanBit
yankunhadoop@gmail.com

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