问题描述
我想用滤镜进行hbase扫描。例如,我的表具有列族A,B,C,而且A具有列X.一些行具有列X,而一些行不具有列。我怎样才能实现过滤器过滤掉列X的所有行?我想你正在寻找<$ c HBase中的$ c> SingleColumnValueFilter 。正如 API中所述, a>
但是 SingleColumnValueFilter
如果值失败,如果ColumnX不能使用的定点值,如果ColumnX ==X
或
带上了这一行和 setFilterIfMissing(true)
,这样如果ColumnX有一些值,它会返回。
你在正确的方向。
I want to do a hbase scan with filters. For example, my table has column family A,B,C, and A has a column X. Some rows have the column X and some do not. How can I implement the filter to filter out all the rows with column X?
I guess you are looking for SingleColumnValueFilter
in HBase. As mentioned in the API
But SingleColumnValueFilter
would want a value to have Column X "CompareOp" to something, say bring this row if ColumnX == "X" or bring this row if ColumnX != "A sentinel value that ColumnX can never take" and setFilterIfMissing(true)
so that if ColumnX has some value, it is returned.
I hope this nudges you in the right direction.
这篇关于如何用给定列(非空)过滤出行?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!