3

I am pretty new to Hadoop and hbase. Can anybody help me with the scan and filter command.

I was trying to pull the records in hbase for a range of rows and for a particular drug, using Filter. When I am giving this shell command: scan 'Mytable', {COLUMNS => ['abc'], FILTER => "avil",STARTROW => "1100",STOPROW => "1121"}

It is showing me an error as: Incorrect Filter String

I am trying to use this command as a reference:

 hbase> scan 't1', {FILTER => "(PrefixFilter ('row2') AND (QualifierFilter (>=, 'binary:xyz'))) AND (TimestampsFilter ( 123, 456))"}

can somebody please help me explain what is Prefixfilter and QualifierFilter?

4

1 回答 1

5

我已经了解了 hbase 中的 Filter 和 scan shell 命令的一些基础知识,发现 SingleColumnValueFilter 非常适合基于值过滤单元格。下面的命令对我有用:

扫描 'Mytable', {COLUMNS => ['abc'], FILTER => "SingleColumnValueFilter('abc','drug',=,'binary:avil')",STARTROW => "1100", ENDROW => " 1121"}

于 2014-08-21T03:31:11.117 回答