Home | About | Sematext search-lucene.com search-hadoop.com
 Search Hadoop and all its subprojects:

Switch to Threaded View
HBase, mail # user - Composite Row Key and Partial Matching


Copy link to this message
-
Re: Composite Row Key and Partial Matching
Andrey Stepachev 2010-09-17, 09:13
my bad. thrift doesn't support this.

2010/9/17 Shuja Rehman <[EMAIL PROTECTED]>:
> Andrey
>
> I have checked this filters but i think they can be used with java client
> API, are you confirmed that these can be used with thrift api?
>
> On Thu, Sep 16, 2010 at 5:29 PM, Andrey Stepachev <[EMAIL PROTECTED]> wrote:
>
>> DateTime easy, scan [DateTime;DateTime+1]
>>
>> for  DateTime_xxxxx_ProductName use row filter
>>
>> http://hbase.apache.org/docs/current/api/org/apache/hadoop/hbase/filter/RowFilter.html
>> or FilterSet to compose predicate for server side filtering. CompareOp
>> can be any of
>>
>> http://hbase.apache.org/docs/current/api/org/apache/hadoop/hbase/filter/WritableByteArrayComparable.html
>>
>> Of cources you should also make correct scan (because filters only
>> filter data, and don't restrict scan)
>> For example above you should make scan [DateTime;DateTime+1]
>>
>> 2010/9/15 Shuja Rehman <[EMAIL PROTECTED]>:
>> > Hi
>> >
>> > I am using thrift to get data from remote hbase and using
>> > client.get(tableName.getBytes(), rowKey.getBytes(),
>> > "ColFamily:colName".getBytes()); method to get the data for particular
>> > columns. I am using composite row key in the format of *
>> > DataTime_CategoryName_ProductName*. Now my question is that can i get the
>> > data with partial key. e.g if I just want to get data with Particular
>> > dateTime only or Particular DateTime_xxxxx_ProductName where category
>> does
>> > not needs to use.
>> >
>> > Kindly share your thoughts
>> > Thanks
>> >
>> > --
>> > Regards
>> > Shuja-ur-Rehman Baig
>> > http://pk.linkedin.com/in/shujamughal
>> > Cell: +92 3214207445
>> >
>>
>
>
>
> --
> Regards
> Shuja-ur-Rehman Baig
> http://pk.linkedin.com/in/shujamughal
> Cell: +92 3214207445
>