hbase-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ted Yu <yuzhih...@gmail.com>
Subject Re: filtering a row that DOESN'T have a column
Date Thu, 02 Feb 2017 17:10:31 GMT
Have you looked at SingleColumnValueFilter ?
For SingleColumnValueFilter, there is a field:

  protected boolean filterIfMissing = false;

You should call setFilterIfMissing(true) on the SingleColumnValueFilter
instance:

   * Get whether entire row should be filtered if column is not found.

   * @return true if row should be skipped if column not found, false if row

   * should be let through anyways

FYI

On Thu, Feb 2, 2017 at 2:00 AM, Eko Susilo <eko.harmawan.susilo@gmail.com>
wrote:

> Hi,
>
> I am looking for a way in hbase how to find rows that doesn't have a
> particular column.
>
> I tried combination of QualifierFilter and SkipFilter, but it still can't
> pick up the expected rows.
>
> Any suggestion will be appreciated.
>
>
> Filter filter = new QualifierFilter(CompareFilter.CompareOp.EQUAL,new
> BinaryComparator(Bytes.toBytes("column-name")));
> Filter filter2 = new SkipFilter(filter);
> scan.setFilter(filter2);
>
>
> --
> Best Regards,
> Eko Susilo
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message