Home > database >  According to hbase rowkey range query methods of time?
According to hbase rowkey range query methods of time?

Time:10-02

Rowkey format: phone number _ time
For example: 15875574802 _20171110

Requirement: all data to query a time range, such as to check data from 20170901 ~ 20171110

In the case of prefix cell number uncertainty can only use rowfilter, but test cannot achieve range queries, the following code
RowFilter rf1=new RowFilter (CompareOp GREATER_OR_EQUAL, new SubstringComparator (" 20170901 "));
RowFilter rf2=new RowFilter (CompareOp LESS_OR_EQUAL, new SubstringComparator (" 20171110 "));

Consult a great god is there any way to realize my this requirement
  • Related