hbase-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Anoop Sam John <anoo...@huawei.com>
Subject RE: Applying QualifierFilter to one column family only.
Date Thu, 19 Jul 2012 05:05:42 GMT
Hi David,
              You want the below use case in scan
Table :T1
--------------
CF : T           CF: S
q1   q2..        q1  q2 ..............

Now in Scan u want to scan all the qualifiers under S and one qualifier under T. (I think
I got ur use case correctly)

Well this use case u can achieve with out using any filter also.
Scan s = new Scan()
s.addFamily(S); // Tells to add all the qualifier(KVs) under this CF in the result
s.addColumn(T,q1) 
Use this scan object for your getScanner.
Using the addColumn you can add more than one qualifier under one CF too.

Hope this helps u.

-Anoop-
________________________________________
From: David Koch [ogdude@googlemail.com]
Sent: Thursday, July 19, 2012 3:36 AM
To: user@hbase.apache.org
Subject: Applying QualifierFilter to one column family only.

Hello,

When scanning a table with 2 column families, is it possible to apply
a QualifierFilter selectively to one family but still include the other
family in the scan?

The layout of my table is as follows:

<rowkey>    T:<timestamp> --> <data>,    S:<summary_item> -->
<value>

For each <rowkey> family T contains timestamp/data key/value pairs. Column
S contains summary information about this row key.

I want to apply a QualifierFilter to column T only - i.e filter by
<timestamp> but return also all of S whenever the set of key/values matched
in T is not empty. Is this doable using standard HBase filters? If so, how?
If not could I implement such a filter myself using FilterBase?

Thank you,

/David
Mime
View raw message