You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@hbase.apache.org by Jürgen Kaatz <ka...@etracker.com> on 2009/07/01 15:14:37 UTC

Hbase with ColumnValueFilter via thrift/php

Hi,

I'm very new to Hbase and try to read the Thrift Hbase implementation and the Java API. On the Java API there is a filter for dedicated column values. Is there also an implementation via Thrift/PHP or what else can  I do to grep dedicated columns values from a list of rows?

Example:

hbase(main):206:0> scan 'cc_attributes'
ROW                          COLUMN+CELL
 12345                       column=attributes:keyword, timestamp=1246451867154, value=etracker
 12345                       column=attributes:referer, timestamp=1246451854424, value=www.google.de
 12345                       column=attributes:typ, timestamp=1246451843751, value=SEM
 67890                       column=attributes:keyword, timestamp=1246453948765, value=etracker
 67890                       column=attributes:referer, timestamp=1246453938366, value=www.yahoo.de
 67890                       column=attributes:typ, timestamp=1246453926492, value=SEM
6 row(s) in 0.0092 seconds

hbase(main):207:0> scan 'cc_attributes', {COLUMNS => ['attributes:referer', 'attributes:typ']}
ROW                          COLUMN+CELL
 12345                       column=attributes:referer, timestamp=1246451854424, value=www.google.de
 12345                       column=attributes:typ, timestamp=1246451843751, value=SEM
 67890                       column=attributes:referer, timestamp=1246453938366, value=www.yahoo.de
 67890                       column=attributes:typ, timestamp=1246453926492, value=SEM
4 row(s) in 0.0164 seconds

=> is there a possibility to 'select' only the rows with 'www.google.de'? I assume this must be work with the Java 'ColumnValueFilter'

Juergen


RE: SPAM, Re: Hbase with ColumnValueFilter via thrift/php

Posted by Jürgen Kaatz <ka...@etracker.com>.
Hi Andy,

thank you for your reply; so I have to use Java to access Hbase with the respective functionality.

Juergen

> -----Original Message-----
> From: Andrew Purtell [mailto:apurtell@apache.org]
> Sent: Wednesday, July 01, 2009 6:59 PM
> To: hbase-user@hadoop.apache.org
> Subject: SPAM, Re: Hbase with ColumnValueFilter via thrift/php
> 
> Spam detection software, running on the system "mail.etracker.de", has
> identified this incoming email as possible spam.  The original message has
> been attached to this so you can view it (if it isn't spam) or label similar
> future email.  If you have any questions, see postmaster for details.
> 
> Content preview:  We will need to tackle this for 0.21 for the C/C++ API. When
>    it is ready any integration that uses that library, including possibly a
>   reimplemented Thrift access method, will have full use of filters, somehow.
>    [...]
> 
> Content analysis details:   (4.8 points, 3.0 required)
> 
>  pts rule name              description
> ---- ---------------------- --------------------------------------------------
>  2.0 BAYES_80               BODY: Bayesian spam probability is 80 to 95%
>                             [score: 0.9383]
>  2.8 UNWANTED_LANGUAGE_BODY BODY: Message written in an undesired language
> 
> The original message was not completely plain text, and may be unsafe to open
> with some email clients; in particular, it may contain a virus, or confirm
> that your address can receive spam.  If you wish to view it, it may be safer
> to save it to a file and open it with an editor.


Re: Hbase with ColumnValueFilter via thrift/php

Posted by Andrew Purtell <ap...@apache.org>.
We will need to tackle this for 0.21 for the C/C++ API. When it is ready
any integration that uses that library, including possibly a reimplemented
Thrift access method, will have full use of filters, somehow. 

   - Andy




________________________________
From: Jonathan Gray <jl...@streamy.com>
To: hbase-user@hadoop.apache.org
Sent: Wednesday, July 1, 2009 8:25:17 AM
Subject: Re: Hbase with ColumnValueFilter via thrift/php

Juergen,

I'm not a big user of the thrift interface, but to my knowledge there is
no integration with user-defined filters like the ColumnValueFilter.

I don't see a reason that this would be impossible, just has not been
implemented.

JG

On Wed, July 1, 2009 6:14 am, Jürgen Kaatz wrote:
> Hi,
>
>
> I'm very new to Hbase and try to read the Thrift Hbase implementation and
> the Java API. On the Java API there is a filter for dedicated column
> values. Is there also an implementation via Thrift/PHP or what else can
> I do to grep dedicated columns values from a list of rows?
>
>
> Example:
>
>
> hbase(main):206:0> scan 'cc_attributes'
> ROW                          COLUMN+CELL
> 12345                       column=attributes:keyword,
> timestamp=1246451867154, value=etracker 12345
> column=attributes:referer, timestamp=1246451854424, value=www.google.de
> 12345                       column=attributes:typ,
> timestamp=1246451843751, value=SEM 67890
> column=attributes:keyword, timestamp=1246453948765, value=etracker
> 67890                       column=attributes:referer,
> timestamp=1246453938366, value=www.yahoo.de 67890
> column=attributes:typ, timestamp=1246453926492, value=SEM
> 6 row(s) in 0.0092 seconds
>
>
> hbase(main):207:0> scan 'cc_attributes', {COLUMNS =>
> ['attributes:referer', 'attributes:typ']}
> ROW                          COLUMN+CELL
> 12345                       column=attributes:referer,
> timestamp=1246451854424, value=www.google.de 12345
> column=attributes:typ, timestamp=1246451843751, value=SEM
> 67890                       column=attributes:referer,
> timestamp=1246453938366, value=www.yahoo.de 67890
> column=attributes:typ, timestamp=1246453926492, value=SEM
> 4 row(s) in 0.0164 seconds
>
>
> => is there a possibility to 'select' only the rows with 'www.google.de'?
> I assume this must be work with the Java 'ColumnValueFilter'
>
>
> Juergen
>
>
>
>


      

Re: Hbase with ColumnValueFilter via thrift/php

Posted by Jonathan Gray <jl...@streamy.com>.
Juergen,

I'm not a big user of the thrift interface, but to my knowledge there is
no integration with user-defined filters like the ColumnValueFilter.

I don't see a reason that this would be impossible, just has not been
implemented.

JG

On Wed, July 1, 2009 6:14 am, Jürgen Kaatz wrote:
> Hi,
>
>
> I'm very new to Hbase and try to read the Thrift Hbase implementation and
> the Java API. On the Java API there is a filter for dedicated column
> values. Is there also an implementation via Thrift/PHP or what else can
> I do to grep dedicated columns values from a list of rows?
>
>
> Example:
>
>
> hbase(main):206:0> scan 'cc_attributes'
> ROW                          COLUMN+CELL
> 12345                       column=attributes:keyword,
> timestamp=1246451867154, value=etracker 12345
> column=attributes:referer, timestamp=1246451854424, value=www.google.de
> 12345                       column=attributes:typ,
> timestamp=1246451843751, value=SEM 67890
> column=attributes:keyword, timestamp=1246453948765, value=etracker
> 67890                       column=attributes:referer,
> timestamp=1246453938366, value=www.yahoo.de 67890
> column=attributes:typ, timestamp=1246453926492, value=SEM
> 6 row(s) in 0.0092 seconds
>
>
> hbase(main):207:0> scan 'cc_attributes', {COLUMNS =>
> ['attributes:referer', 'attributes:typ']}
> ROW                          COLUMN+CELL
> 12345                       column=attributes:referer,
> timestamp=1246451854424, value=www.google.de 12345
> column=attributes:typ, timestamp=1246451843751, value=SEM
> 67890                       column=attributes:referer,
> timestamp=1246453938366, value=www.yahoo.de 67890
> column=attributes:typ, timestamp=1246453926492, value=SEM
> 4 row(s) in 0.0164 seconds
>
>
> => is there a possibility to 'select' only the rows with 'www.google.de'?
> I assume this must be work with the Java 'ColumnValueFilter'
>
>
> Juergen
>
>
>
>