废弃,详见
hbase2.1.x shell scan SingleColumnValueFilter 过滤条件的列的值不存在时,满足所有过滤条件
描述问题
添加测试数据
put 'student2','1000','info:name','lilei'
put 'student2','1000','info:age','20'
put 'student2','1001','info:name','lucy'
put 'student2','1001','info:age','19'
put 'student2','1002','info:name','hanmeimei'
put 'student2','1002','info:age','23'
put 'student2','1003','info:name','lili'
注意: rowkey
是 1003
的,只有 name
,没有 age
查询
查询 age>20
的记录:
scan 'student2',{FILTER => "SingleColumnValueFilter('info','age',>,'binary:20')"}
执行结果:也会查询出 lili
原因:因为 lili
没有 age
,在 hbase 中,默认 满足所有过滤条件
在 shell
中没有找到解决方法,在java中可以解决