filter - 如何过滤给定列的行(不为null)?

标签 filter null hbase out

我想使用过滤器进行hbase扫描。例如,我的表的列族为A,B,C,而A的列为X。某些行的列为X,有些行的列为X。如何实现过滤器以过滤出所有具有X列的行?

最佳答案

我猜您正在HBase中寻找SingleColumnValueFilter。如API中所述

To prevent the entire row from being emitted if the column is not found on a row, use setFilterIfMissing(boolean) on Filter object. Otherwise, if the column is found, the entire row will be emitted only if the value passes. If the value fails, the row will be filtered out.



但是SingleColumnValueFilter希望一个值使X列“CompareOp”具有某种含义,例如,如果ColumnX ==“X”,则将该行带入
或者
如果ColumnX!=“”这是ColumnX永远无法接受的哨兵值“和setFilterIfMissing(true),请带此行,以便如果ColumnX具有某些值,则将其返回。

我希望这能朝着正确的方向前进。

关于filter - 如何过滤给定列的行(不为null)?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12858995/

相关文章:

delphi - SuperObject 无法处理空字符串

Hbase 错误。 org.apache.hadoop.hbase.client.RetriesExhaustedException : Failed after attempts=10, 异常

javascript - 使用 Javascript 将油画/素描效果应用于照片

javascript - 使用 lodash 函数映射柯里化(Currying)过滤器

javascript - ngRepeat 按深度属性过滤

null - 使用单个空参数调用 Java varargs 方法?

c# - 在 C# 中处理来自 SQL 的 Null 类型

hadoop - 在 hbase 中的一行上建立写锁

hadoop - 每秒 HBase 请求为零

c++ - C/C++ 中的 Retro、Lomo、Vignette 滤镜?