Home | About | Sematext search-lucene.com search-hadoop.com
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB
 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
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
>
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB