You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@hbase.apache.org by lucio Piccoli <lu...@hotmail.com> on 2008/07/21 17:02:49 UTC

HQL usage

hi all,

i  have been reading the docs on HQL and thought it would be a great to use programatically.

but after checking out the src, it seems it is only used for the shell.

is that the intended usage of HQL or can it (or its replacement)  be used programatically?

adios dude

-lucio
-----------------------------------
lucio_piccoli@hotmail.com
_________________________________________________________________
Want to help Windows Live Messenger plant more Aussie trees?
http://livelife.ninemsn.com.au/article.aspx?id=443698

Re: HQL usage

Posted by stack <st...@duboce.net>.
Please let us know how you came across HQL documentation so we can 
replace the links with pointers to its replacement: See 
http://wiki.apache.org/hadoop/Hbase/Shell.

Use the hbase shell for scripting and experimenting with hbase.  Would 
suggest that for more intense usage, going direct against the java API 
or the thrift interface will serve you better.

Thanks,
St.Ack



lucio Piccoli wrote:
> hi all,
>
> i  have been reading the docs on HQL and thought it would be a great to use programatically.
>
> but after checking out the src, it seems it is only used for the shell.
>
> is that the intended usage of HQL or can it (or its replacement)  be used programatically?
>
> adios dude
>
> -lucio
> -----------------------------------
> lucio_piccoli@hotmail.com
> _________________________________________________________________
> Want to help Windows Live Messenger plant more Aussie trees?
> http://livelife.ninemsn.com.au/article.aspx?id=443698
>   


Re: HQL usage

Posted by "Edward J. Yoon" <ed...@udanax.org>.
HQL will be integrated to HRdfStore project.
See http://groups.google.com/group/hrdfstore

Thanks,
Edward J. Yoon

On 7/22/08, stack <st...@duboce.net> wrote:
> lucio Piccoli wrote:
> > hi Tho Pham
> >
> > i have checked the HQL api but the only reference i found was the
> org.apache.hadoop.hbase.hql package.
> > is this correct?
> >
> >
>
> HQL was the shell in 0.1.x.  Its been deprecated in TRUNK and the pending
> 0.2.0 release.
> > Since it use a TableFormatter to display the result set, i *cant* see how
> to use it efficently to retrieve a result set. i guess i was expecting a
> JDBC like semantic.
> > i really would like to port my existing application over to HBase but use
> existing SQL like (Hibernate)  query syntax.
> >  Is this what HBase is all about or have i missunderstood?
> >
> > any help appreciated.
> >
> >
> >
>
> Disabuse yourself of any notion that hbase is an RDBMS.  There's no SQL,
> JDBC, hibernate connector, etc.
>
> Going by your questions above, I'd suggest you do a little background
> reading so you get better sense of what hbase is about.  Start in with the
> hbase architecture paper up on our wiki:
> http://wiki.apache.org/hadoop/Hbase.   Feel free to ask
> questions in here in this forum if there is anything you need help with.
>
> Yours,
> St.Ack
>
>
>
> > adios dude
> >
> > -lucioto pop
> > -----------------------------------
> > lucio_piccoli@hotmail.com
> >
> >
> >
> > > Date: Mon, 21 Jul 2008 22:14:33 +0700
> > > From: thopham.asnet@gmail.com
> > > To: hbase-user@hadoop.apache.org
> > > Subject: Re: HQL usage
> > >
> > > Dear lucio,
> > >
> > > Yes, sure.
> > > 1. Download hbase-0.1.3 library
> > > 2. Create new Java project
> > > 3. Refer to the download package
> > > 4. Using hql package in HBase. You should see the API docs of HBase for
> more detail.
> > >
> > > Good luck,
> > > Best regards,
> > > Tho Pham
> > >
> > > lucio Piccoli wrote:
> > >
> > >
> > > > hi all,
> > > >
> > > > i  have been reading the docs on HQL and thought it would be a great
> to use programatically.
> > > >
> > > > but after checking out the src, it seems it is only used for the
> shell.
> > > >
> > > > is that the intended usage of HQL or can it (or its replacement)  be
> used programatically?
> > > >
> > > > adios dude
> > > >
> > > > -lucio
> > > > -----------------------------------
> > > > lucio_piccoli@hotmail.com
> > > >
> _________________________________________________________________
> > > > Want to help Windows Live Messenger plant more Aussie trees?
> > > > http://livelife.ninemsn.com.au/article.aspx?id=443698
> > > >
> > > >
> > >
> >
> >
> _________________________________________________________________
> > Meet singles near you. Try ninemsn dating now!
> >
> http://a.ninemsn.com.au/b.aspx?URL=http%3A%2F%2Fdating%2Eninemsn%2Ecom%2Eau%2Fchannel%2Findex%2Easpx%3Ftrackingid%3D1046247&_t=773166080&_r=WL_TAGLINE&_m=EXT
> >
> >
>
>


-- 
Best regards,
Edward J. Yoon,
http://blog.udanax.org

Re: HQL usage

Posted by "Edward J. Yoon" <ed...@udanax.org>.
HQL will be integrated to HRdfStore project.
See http://groups.google.com/group/hrdfstore

Thanks,
Edward J. Yoon

On 7/22/08, stack <st...@duboce.net> wrote:
> lucio Piccoli wrote:
> > hi Tho Pham
> >
> > i have checked the HQL api but the only reference i found was the
> org.apache.hadoop.hbase.hql package.
> > is this correct?
> >
> >
>
> HQL was the shell in 0.1.x.  Its been deprecated in TRUNK and the pending
> 0.2.0 release.
> > Since it use a TableFormatter to display the result set, i *cant* see how
> to use it efficently to retrieve a result set. i guess i was expecting a
> JDBC like semantic.
> > i really would like to port my existing application over to HBase but use
> existing SQL like (Hibernate)  query syntax.
> >  Is this what HBase is all about or have i missunderstood?
> >
> > any help appreciated.
> >
> >
> >
>
> Disabuse yourself of any notion that hbase is an RDBMS.  There's no SQL,
> JDBC, hibernate connector, etc.
>
> Going by your questions above, I'd suggest you do a little background
> reading so you get better sense of what hbase is about.  Start in with the
> hbase architecture paper up on our wiki:
> http://wiki.apache.org/hadoop/Hbase.   Feel free to ask
> questions in here in this forum if there is anything you need help with.
>
> Yours,
> St.Ack
>
>
>
> > adios dude
> >
> > -lucioto pop
> > -----------------------------------
> > lucio_piccoli@hotmail.com
> >
> >
> >
> > > Date: Mon, 21 Jul 2008 22:14:33 +0700
> > > From: thopham.asnet@gmail.com
> > > To: hbase-user@hadoop.apache.org
> > > Subject: Re: HQL usage
> > >
> > > Dear lucio,
> > >
> > > Yes, sure.
> > > 1. Download hbase-0.1.3 library
> > > 2. Create new Java project
> > > 3. Refer to the download package
> > > 4. Using hql package in HBase. You should see the API docs of HBase for
> more detail.
> > >
> > > Good luck,
> > > Best regards,
> > > Tho Pham
> > >
> > > lucio Piccoli wrote:
> > >
> > >
> > > > hi all,
> > > >
> > > > i  have been reading the docs on HQL and thought it would be a great
> to use programatically.
> > > >
> > > > but after checking out the src, it seems it is only used for the
> shell.
> > > >
> > > > is that the intended usage of HQL or can it (or its replacement)  be
> used programatically?
> > > >
> > > > adios dude
> > > >
> > > > -lucio
> > > > -----------------------------------
> > > > lucio_piccoli@hotmail.com
> > > >
> _________________________________________________________________
> > > > Want to help Windows Live Messenger plant more Aussie trees?
> > > > http://livelife.ninemsn.com.au/article.aspx?id=443698
> > > >
> > > >
> > >
> >
> >
> _________________________________________________________________
> > Meet singles near you. Try ninemsn dating now!
> >
> http://a.ninemsn.com.au/b.aspx?URL=http%3A%2F%2Fdating%2Eninemsn%2Ecom%2Eau%2Fchannel%2Findex%2Easpx%3Ftrackingid%3D1046247&_t=773166080&_r=WL_TAGLINE&_m=EXT
> >
> >
>
>


-- 
Best regards,
Edward J. Yoon,
http://blog.udanax.org

Re: HQL usage

Posted by Jean-Daniel Cryans <jd...@gmail.com>.
http://wiki.python.org/jython/DjangoOnJython

On Tue, Jul 22, 2008 at 4:49 PM, stack <st...@duboce.net> wrote:

> Jean-Daniel Cryans wrote:
>
>> ....if implementing a HBase GAE
>> is your thing, getting some documentation done first would be great. Don't
>> forget that AppEngine is based on the Django framework so maybe just
>> modifying it would be enough.
>>
> Can you run Django on jython I wonder?
> St.Ack
>

Re: HQL usage

Posted by stack <st...@duboce.net>.
Jean-Daniel Cryans wrote:
> ....if implementing a HBase GAE
> is your thing, getting some documentation done first would be great. Don't
> forget that AppEngine is based on the Django framework so maybe just
> modifying it would be enough.
Can you run Django on jython I wonder?
St.Ack

Re: HQL usage

Posted by Jean-Daniel Cryans <jd...@gmail.com>.
Lucio,

We do have a road map for 0.3 on the wiki but it is still pretty much empty
and there is no "nice to have" list. To begin your involvement you can
always take a look at our open issues:
https://issues.apache.org/jira/browse/HBASE or if implementing a HBase GAE
is your thing, getting some documentation done first would be great. Don't
forget that AppEngine is based on the Django framework so maybe just
modifying it would be enough.

J-D

On Tue, Jul 22, 2008 at 3:52 PM, lucio Piccoli <lu...@hotmail.com>
wrote:

>
> > So, really, there is for the moment no answer to your question apart from
> > "try something, if it works, publish it!".
> >
> > Hope that helped understanding HBase. On a separate note, an HBase
> > implementation of GAE is on the "nice to have" list. If you would like to
> > contribute, we would all be glad.
>
> hmmm good idea.
>
> is there a roadmap page or something that outline 'nice to have'
> functionality?
>
> if not how would u suggest i commence my  involvement?
>
> -lucio
>
> _________________________________________________________________
> It's simple! Sell your car for just $40 at CarPoint.com.au
>
> http://a.ninemsn.com.au/b.aspx?URL=http%3A%2F%2Fsecure%2Dau%2Eimrworldwide%2Ecom%2Fcgi%2Dbin%2Fa%2Fci%5F450304%2Fet%5F2%2Fcg%5F801459%2Fpi%5F1004813%2Fai%5F859641&_t=762955845&_r=tig_OCT07&_m=EXT
>

RE: HQL usage

Posted by lucio Piccoli <lu...@hotmail.com>.
> So, really, there is for the moment no answer to your question apart from
> "try something, if it works, publish it!".
> 
> Hope that helped understanding HBase. On a separate note, an HBase
> implementation of GAE is on the "nice to have" list. If you would like to
> contribute, we would all be glad.

hmmm good idea.

is there a roadmap page or something that outline 'nice to have' functionality? 

if not how would u suggest i commence my  involvement?

-lucio

_________________________________________________________________
It's simple! Sell your car for just $40 at CarPoint.com.au
http://a.ninemsn.com.au/b.aspx?URL=http%3A%2F%2Fsecure%2Dau%2Eimrworldwide%2Ecom%2Fcgi%2Dbin%2Fa%2Fci%5F450304%2Fet%5F2%2Fcg%5F801459%2Fpi%5F1004813%2Fai%5F859641&_t=762955845&_r=tig_OCT07&_m=EXT

Re: HQL usage

Posted by Jean-Daniel Cryans <jd...@gmail.com>.
 1) why is having a query language mutual exclusive to HBase goals?

Using SQL-like languages for HBase proved. to this date, to be more
confusing than helpful. Seeing questions like "why is there no joins?" or
"where can I find a JDBC connector to HBase?" overkilled the fact the, to
this point, HQL was used only for administration purposes (maybe the
original goal of HQL was different but this will not be discussed in this
answer). So is it mutually exclusive to HBase? No, I don't think so, but if
such language is ever officially developed it will be a very crippled one
like GQL.

HBase is basically a map with enhanced features, so why not using it
according to it's nature? MapReduce is also a good way to manipulate your
data in batch btw.

2) what is the expected integration point to a J2EE application for HBase?

I personally use HBase in a small project based on Spring (which is not JEE,
I agree, but near) and it proved to be easy to integrate behind some DAO.
But something is important to note: Bigtable is born because typical RDBMS
cannot provide enough scalability, availability and performance on a very
huge scale. If your are reaching a point where all your shards of
master-slave replicated MySQL cannot handle your load, you already gave up
normalization a long long time ago. At that scale, all you want to have is a
single place to store your data and you don't mind handling the rest. There
is no recipe, no framework that will help you unless you paid millions to
have ultra-specialized hardware and software (which is note HBase goal).

So, really, there is for the moment no answer to your question apart from
"try something, if it works, publish it!".

Hope that helped understanding HBase. On a separate note, an HBase
implementation of GAE is on the "nice to have" list. If you would like to
contribute, we would all be glad.

Regards,

J-D

On Tue, Jul 22, 2008 at 3:39 AM, lucio Piccoli <lu...@hotmail.com>
wrote:

>
>
>
> > Disabuse yourself of any notion that hbase is an RDBMS.  There's no SQL,
> > JDBC, hibernate connector, etc.
>
> perhaps not SQL/JDBC but a query language like HQL.
>
> since there are many comparisons betwen HBase and google bigtable, i was
> hoping for a query capability found in GAE.
> http://code.google.com/appengine/docs/datastore/queriesandindexes.html
>
> # The GqlQuery interface prepares a query using a GQL query string.
> q = db.GqlQuery("SELECT * FROM Person " +
>                "WHERE last_name = :1 AND height < :2 " +
>                "ORDER BY height DESC",
>                "Smith", 72)
>
>
> as u can see the query language is very similar to SQL and easy to use.
>
>
> > Going by your questions above, I'd suggest you do a little background
> > reading so you get better sense of what hbase is about.  Start in with
> > the hbase architecture paper up on our wiki:
> > http://wiki.apache.org/hadoop/Hbase.   Feel free to ask questions in
> > here in this forum if there is anything you need help with.
>
> i have read the docs and was hoping for GAE like functionality to access
> the datastore.
>
> so my questions are
>
> 1) why is having a query language mutual exclusive to HBase goals?
> 2) what is the expected integration point to a J2EE appllication for HBase?
>
> any help is appreciated.
>
> -lucio
>
> _________________________________________________________________
> It's simple! Sell your car for just $40 at CarPoint.com.au
>
> http://a.ninemsn.com.au/b.aspx?URL=http%3A%2F%2Fsecure%2Dau%2Eimrworldwide%2Ecom%2Fcgi%2Dbin%2Fa%2Fci%5F450304%2Fet%5F2%2Fcg%5F801459%2Fpi%5F1004813%2Fai%5F859641&_t=762955845&_r=tig_OCT07&_m=EXT

RE: HQL usage

Posted by Andrew Purtell <ap...@yahoo.com>.
You might consider looking into query languages being built on top of Hadoop and/or HBase:

   Pig Latin: http://incubator.apache.org/pig/

   JAQL: http://jaql.org/release/0.2/jaql-overview.html

These are the two I'm familiar with anyway.

JAQL in particular is something I have my eye on. Probably it is closest to what you are looking for as well. I hope IBM releases a version up to date for Hadoop 0.17.x soon, and can/will consider open sourcing it as well.

Hope this helps,

   - Andy

> From: lucio Piccoli <lu...@hotmail.com>
> Subject: RE: HQL usage
> To: hbase-user@hadoop.apache.org
> Date: Tuesday, July 22, 2008, 12:39 AM
> > Disabuse yourself of any notion that hbase is an RDBMS. There's no
> > SQL, JDBC, hibernate connector, etc.
> 
> perhaps not SQL/JDBC but a query language like HQL.
> 
> since there are many comparisons betwen HBase and google
> bigtable, i was hoping for a query capability found in GAE.
> http://code.google.com/appengine/docs/datastore/queriesandindexes.html
> 
> # The GqlQuery interface prepares a query using a GQL query string.
> q = db.GqlQuery("SELECT * FROM Person " + 
>                 "WHERE last_name = :1 AND height < :2 " +
>                 "ORDER BY height DESC",
>                 "Smith", 72)
> 
> as u can see the query language is very similar to SQL and
> easy to use.



      

RE: HQL usage

Posted by lucio Piccoli <lu...@hotmail.com>.


> Disabuse yourself of any notion that hbase is an RDBMS.  There's no SQL, 
> JDBC, hibernate connector, etc.

perhaps not SQL/JDBC but a query language like HQL.

since there are many comparisons betwen HBase and google bigtable, i was hoping for a query capability found in GAE.
http://code.google.com/appengine/docs/datastore/queriesandindexes.html

# The GqlQuery interface prepares a query using a GQL query string.
q = db.GqlQuery("SELECT * FROM Person " + 
                "WHERE last_name = :1 AND height < :2 " +
                "ORDER BY height DESC",
                "Smith", 72)


as u can see the query language is very similar to SQL and easy to use.

 
> Going by your questions above, I'd suggest you do a little background 
> reading so you get better sense of what hbase is about.  Start in with 
> the hbase architecture paper up on our wiki:  
> http://wiki.apache.org/hadoop/Hbase.   Feel free to ask questions in 
> here in this forum if there is anything you need help with.

i have read the docs and was hoping for GAE like functionality to access the datastore.

so my questions are 

1) why is having a query language mutual exclusive to HBase goals?
2) what is the expected integration point to a J2EE appllication for HBase?

any help is appreciated.

-lucio

_________________________________________________________________
It's simple! Sell your car for just $40 at CarPoint.com.au
http://a.ninemsn.com.au/b.aspx?URL=http%3A%2F%2Fsecure%2Dau%2Eimrworldwide%2Ecom%2Fcgi%2Dbin%2Fa%2Fci%5F450304%2Fet%5F2%2Fcg%5F801459%2Fpi%5F1004813%2Fai%5F859641&_t=762955845&_r=tig_OCT07&_m=EXT

Re: HQL usage

Posted by stack <st...@duboce.net>.
lucio Piccoli wrote:
> hi Tho Pham
>
> i have checked the HQL api but the only reference i found was the 
> org.apache.hadoop.hbase.hql package.
> is this correct?
>   

HQL was the shell in 0.1.x.  Its been deprecated in TRUNK and the 
pending 0.2.0 release.
> Since it use a TableFormatter to display the result set, i *cant* see how to use it efficently to retrieve a result set. 
> i guess i was expecting a JDBC like semantic.
> i really would like to port my existing application over to HBase but use existing SQL like (Hibernate)  query syntax. 
>
>   
> Is this what HBase is all about or have i missunderstood?
>
> any help appreciated.
>
>   

Disabuse yourself of any notion that hbase is an RDBMS.  There's no SQL, 
JDBC, hibernate connector, etc.

Going by your questions above, I'd suggest you do a little background 
reading so you get better sense of what hbase is about.  Start in with 
the hbase architecture paper up on our wiki:  
http://wiki.apache.org/hadoop/Hbase.   Feel free to ask questions in 
here in this forum if there is anything you need help with.

Yours,
St.Ack


> adios dude
>
> -lucioto pop
> -----------------------------------
> lucio_piccoli@hotmail.com
>
>   
>> Date: Mon, 21 Jul 2008 22:14:33 +0700
>> From: thopham.asnet@gmail.com
>> To: hbase-user@hadoop.apache.org
>> Subject: Re: HQL usage
>>
>> Dear lucio,
>>
>> Yes, sure.
>> 1. Download hbase-0.1.3 library
>> 2. Create new Java project
>> 3. Refer to the download package
>> 4. Using hql package in HBase. You should see the API docs of HBase for 
>> more detail.
>>
>> Good luck,
>> Best regards,
>> Tho Pham
>>
>> lucio Piccoli wrote:
>>     
>>> hi all,
>>>
>>> i  have been reading the docs on HQL and thought it would be a great to use programatically.
>>>
>>> but after checking out the src, it seems it is only used for the shell.
>>>
>>> is that the intended usage of HQL or can it (or its replacement)  be used programatically?
>>>
>>> adios dude
>>>
>>> -lucio
>>> -----------------------------------
>>> lucio_piccoli@hotmail.com
>>> _________________________________________________________________
>>> Want to help Windows Live Messenger plant more Aussie trees?
>>> http://livelife.ninemsn.com.au/article.aspx?id=443698
>>>   
>>>       
>
> _________________________________________________________________
> Meet singles near you. Try ninemsn dating now!
> http://a.ninemsn.com.au/b.aspx?URL=http%3A%2F%2Fdating%2Eninemsn%2Ecom%2Eau%2Fchannel%2Findex%2Easpx%3Ftrackingid%3D1046247&_t=773166080&_r=WL_TAGLINE&_m=EXT
>   


RE: HQL usage

Posted by lucio Piccoli <lu...@hotmail.com>.
hi Tho Pham

i have checked the HQL api but the only reference i found was the 
org.apache.hadoop.hbase.hql package.
is this correct?

Since it use a TableFormatter to display the result set, i *cant* see how to use it efficently to retrieve a result set. 
i guess i was expecting a JDBC like semantic.

i really would like to port my existing application over to HBase but use existing SQL like (Hibernate)  query syntax. 

Is this what HBase is all about or have i missunderstood?

any help appreciated.


adios dude

-lucioto pop
-----------------------------------
lucio_piccoli@hotmail.com

> Date: Mon, 21 Jul 2008 22:14:33 +0700
> From: thopham.asnet@gmail.com
> To: hbase-user@hadoop.apache.org
> Subject: Re: HQL usage
> 
> Dear lucio,
> 
> Yes, sure.
> 1. Download hbase-0.1.3 library
> 2. Create new Java project
> 3. Refer to the download package
> 4. Using hql package in HBase. You should see the API docs of HBase for 
> more detail.
> 
> Good luck,
> Best regards,
> Tho Pham
> 
> lucio Piccoli wrote:
> > hi all,
> >
> > i  have been reading the docs on HQL and thought it would be a great to use programatically.
> >
> > but after checking out the src, it seems it is only used for the shell.
> >
> > is that the intended usage of HQL or can it (or its replacement)  be used programatically?
> >
> > adios dude
> >
> > -lucio
> > -----------------------------------
> > lucio_piccoli@hotmail.com
> > _________________________________________________________________
> > Want to help Windows Live Messenger plant more Aussie trees?
> > http://livelife.ninemsn.com.au/article.aspx?id=443698
> >   
> 

_________________________________________________________________
Meet singles near you. Try ninemsn dating now!
http://a.ninemsn.com.au/b.aspx?URL=http%3A%2F%2Fdating%2Eninemsn%2Ecom%2Eau%2Fchannel%2Findex%2Easpx%3Ftrackingid%3D1046247&_t=773166080&_r=WL_TAGLINE&_m=EXT

Re: HQL usage

Posted by "thopham.asnet" <th...@gmail.com>.
Dear lucio,

Yes, sure.
1. Download hbase-0.1.3 library
2. Create new Java project
3. Refer to the download package
4. Using hql package in HBase. You should see the API docs of HBase for 
more detail.

Good luck,
Best regards,
Tho Pham

lucio Piccoli wrote:
> hi all,
>
> i  have been reading the docs on HQL and thought it would be a great to use programatically.
>
> but after checking out the src, it seems it is only used for the shell.
>
> is that the intended usage of HQL or can it (or its replacement)  be used programatically?
>
> adios dude
>
> -lucio
> -----------------------------------
> lucio_piccoli@hotmail.com
> _________________________________________________________________
> Want to help Windows Live Messenger plant more Aussie trees?
> http://livelife.ninemsn.com.au/article.aspx?id=443698
>