hbase-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Slava Gorelik <slava.gore...@gmail.com>
Subject Re: Retrieve columns by RegEx
Date Tue, 17 Feb 2009 15:28:42 GMT
Hi.I tried to understand this filter and from method

 public boolean filterColumn(final byte [] rowKey, final byte [] colKey,
      final byte[] data) {
    if (filterRowKey(rowKey)) {
      return true;
    }
    if (filtersByColumnValue()) {
      byte[] filterValue = equalsMap.get(colKey);
      if (null != filterValue) {
        return !Arrays.equals(filterValue, data);
      }
    }
    if (nullColumns.contains(colKey)) {
      if (data != null && !HLogEdit.isDeleted(data)) {
        return true;
      }
    }
    return false;
  }

I see that filtering is done on column value and not column name and as i
see it from code the  comparison not even done
by RegEx (the regex is applied only on rowkey).

Correct me if I wrong.

Thank You and Best Regards.
Slava.


On Tue, Feb 17, 2009 at 4:33 PM, Slava Gorelik <slava.gorelik@gmail.com>wrote:

> Thank You !I'll look on this closer.
>
>
> On Tue, Feb 17, 2009 at 4:15 PM, Rasit OZDAS <rasitozdas@gmail.com> wrote:
>
>> In that API documentation, filterColumn function has the definition:
>> "Filters on row key, column name, and column value."
>>
>> http://hadoop.apache.org/hbase/docs/current/api/org/apache/hadoop/hbase/filter/RegExpRowFilter.html#filterColumn(byte[],%20byte[],%20byte[])
>> <
>> http://hadoop.apache.org/hbase/docs/current/api/org/apache/hadoop/hbase/filter/RegExpRowFilter.html#filterColumn%28byte%5B%5D,%20byte%5B%5D,%20byte%5B%5D%29
>> >
>>
>> Sorry if you tried this and didn't help.
>>
>> Rasit
>>
>>
>> 2009/2/17 Slava Gorelik <slava.gorelik@gmail.com>
>>
>> > HiThank You for the answer but as i understand this filter works on
>> column
>> > value and i need column name.
>> >
>> > Best Regards.
>> >
>> >
>> > On Tue, Feb 17, 2009 at 3:17 PM, Rasit OZDAS <rasitozdas@gmail.com>
>> wrote:
>> >
>> > > Slava, there is a regex filter in HBase, (I didn't try yet).
>> > >
>> > >
>> >
>> http://hadoop.apache.org/hbase/docs/current/api/org/apache/hadoop/hbase/filter/RegExpRowFilter.html
>> > >
>> > > and there is an extension of this:
>> > >
>> > >
>> >
>> http://hadoop.apache.org/hbase/docs/current/api/org/apache/hadoop/hbase/filter/WhileMatchRowFilter.html
>> > >
>> > > Rasit
>> > >
>> > > 2009/2/16 Slava Gorelik <slava.gorelik@gmail.com>:
>> > > > Do you have any example of this ?
>> > > >
>> > > > Thank You.
>> > > > Slava.
>> > > >
>> > > > On Mon, Feb 16, 2009 at 8:48 PM, stack <stack@duboce.net> wrote:
>> > > >
>> > > >> A regex filter?
>> > > >> St.Ack
>> > > >>
>> > > >> On Mon, Feb 16, 2009 at 10:46 AM, Slava Gorelik <
>> > > slava.gorelik@gmail.com
>> > > >> >wrote:
>> > > >>
>> > > >> > Hi.
>> > > >> > I'm looking for a way retrieve columns by regular expression.
>> > > >> > Is in 0.19.0 such functionality ? If not, what do you think
the
>> best
>> > > way
>> > > >> to
>> > > >> > do it ?
>> > > >> >
>> > > >> > Thank You and Best Regards.
>> > > >> > Slava.
>> > > >> >
>> > > >>
>> > > >
>> > >
>> > >
>> > >
>> > > --
>> > > M. Raşit ÖZDAŞ
>> > >
>> >
>>
>>
>>
>> --
>> M. Raşit ÖZDAŞ
>>
>
>

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