hbase-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ted Yu <yuzhih...@gmail.com>
Subject Re: How to query based on partial row key
Date Wed, 16 Oct 2013 17:30:07 GMT
You can use RowFilter in combination with RegexStringComparator.
See RegexStringComparator's javadoc:

 * This comparator is for use with {@link CompareFilter} implementations,
such

 * as {@link RowFilter}, {@link QualifierFilter}, and {@link ValueFilter},
for

See also TestFilter#testRowFilter()


On Wed, Oct 16, 2013 at 2:36 AM, Ramasubramanian <
ramasubramanian.narayanan@gmail.com> wrote:

> Hi yuzihong,
>
> Yes the component length will vary. But I have use ads where it will have
> uniform length. Is there any way to query in that use case?
>
> Regards,
> Rams
>
> On 16-Oct-2013, at 2:40 PM, Ted Yu <yuzhihong@gmail.com> wrote:
>
> > Ram:
> > Do components of your row key have the same width ?
> >
> > From example below, it looks like widths can vary.
> >
> > Cheers
> >
> > On Oct 16, 2013, at 1:59 AM, Bing Jiang <jiangbinglover@gmail.com>
> wrote:
> >
> >> hi, Rams
> >> FuzzyRow Filter can help you.
> >> You can refer to https://issues.apache.org/jira/browse/HBASE-6509
> >>
> >>
> >> Bing
> >>
> >>
> >> 2013/10/16 Ramasubramanian <ramasubramanian.narayanan@gmail.com>
> >>
> >>> Hi,
> >>>
> >>> Can someone help how to query on partial rowkey.
> >>>
> >>> For example I have rowkey like below:
> >>>
> >>> Name1|accounts|t120
> >>> Name2|HR|t110
> >>>
> >>> Etc.,
> >>>
> >>> I need to get all records which has "accounts" in the rowkey.
> >>>
> >>> Pls help how to frame the query.
> >>>
> >>> Regards,
> >>> Rams
> >>
> >>
> >>
> >> --
> >> Bing Jiang
> >> Tel:(86)134-2619-1361
> >> weibo: http://weibo.com/jiangbinglover
> >> BLOG: www.binospace.com
> >> BLOG: http://blog.sina.com.cn/jiangbinglover
> >> Focus on distributed computing, HDFS/HBase
>

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