hbase2.1.x shell scan SingleColumnValueFilter 列不存在时,满足所有过滤条件,无法过滤(废弃) 作者:马育民 • 2021-11-29 20:33 • 阅读:10130 # 废弃,详见 [hbase2.1.x shell scan SingleColumnValueFilter 过滤条件的列的值不存在时,满足所有过滤条件](https://www.malaoshi.top/show_1IX2zD7Dex1t.html "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中可以解决 原文出处:http://malaoshi.top/show_1IX2JiM2O58n.html