0

I was doing a scan using startRowKey and StopRowKey in HBase scan using HBase shell, but the output what I am receiving is outside the range passed. Please refer the Hbase Query -

import org.apache.hadoop.hbase.filter.CompareFilter
import org.apache.hadoop.hbase.filter.SingleColumnValueFilter
import org.apache.hadoop.hbase.filter.SubstringComparator
import org.apache.hadoop.hbase.util.Bytes


scan 'TableName',{ LIMIT => 2 , STARTROW => '000|9223370554721275807', STOPROW => '101|9223370554727575807', FILTER => SingleColumnValueFilter.new(Bytes.toBytes('col_family'), Bytes.toBytes('col_qualifier'), CompareFilter::CompareOp.valueOf('EQUAL'), Bytes.toBytes('Some Value')), COLUMNS => 'col_family:col_qualifier', REVERSED => false}

But the out what is received is outside this range -

016|9223370554960173487

021|9223370555154148992

Please let me know is my search query is correct or what could be the root cause for this?? Any help will be really appreciated.

Thanks

4

1 回答 1

1

如果您将问题中提到的四个行键放在一个文件中并对它们进行排序,结果将是:

000|9223370554721275807
016|9223370554960173487
021|9223370555154148992
101|9223370554727575807

因此,您收到的值不在扫描范围之外。

于 2016-12-19T12:30:49.337 回答