You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@hbase.apache.org by Panshul Whisper <ou...@gmail.com> on 2013/01/16 11:33:07 UTC
Hbase as mongodb
Hello,
Is it possible to use hbase to query json documents in a same way as we can
do with Mongodb
Suggestions please.
If we can then a small example as how.. not the query but the process flow..
Thanku so much
Regards,
Panshul.
Re: Hbase as mongodb
Posted by Michael Segel <mi...@hotmail.com>.
The interface to pull JSON objects out of HBase will not be the same as Mongo DB.
Meaning that you can store JSON objects in HBase. ( See Avro, or Wibidata's Kiji for example)
But the infrastructure to query and interact with HBase is going to be different than with MongoDB.
HTH
-Mike
On Jan 16, 2013, at 7:23 AM, Mohammad Tariq <do...@gmail.com> wrote:
> You can do that, approach might vary though, depending upon the scenario.
> You just have to think well about your schema in order to make sure that it
> fits into your put and get requirements.
>
> I have not worked personally on JSON+Hbase combo, so could not give any
> direct suggestion at the moment. But we have a lot of folks here on the list
> who have experience on such things. Let us hope they come across with this
> thread.
>
> I have a few things in mind which I would like to share with you though. Try
> not to store too large JSON files. You might need to consider making the
> column family compressed. I would first serialize the JSON into Bytes and
> then write to Hbase cells and while pulling the data, deserialize it back
> in the
> same layer.
>
> You may find this
> thread<http://comments.gmane.org/gmane.comp.java.hadoop.hbase.user/15261>
> useful.
>
> HTH
>
> Warm Regards,
> Tariq
> https://mtariq.jux.com/
> cloudfront.blogspot.com
>
>
> On Wed, Jan 16, 2013 at 6:36 PM, Panshul Whisper <ou...@gmail.com>wrote:
>
>> Hello Tariq,
>>
>> Thank you for the reply.
>>
>> My concern is that I have been working with MongoDB, but now I am switching
>> over to Hadoop and I want to use HBase for certain reasons. I was wondering
>> if I can store Json files in Hbase in a way that I can query the Json files
>> in Hbase as I can in Mongodb. Such as I can directly say Mongodb to get me
>> all the objects having timestamp value of xxx date where timestamp is a
>> field in Json objects stored in Mongodb. Can I perform similar operations
>> on Hbase or does it have another approach for doing similar operations.
>> I do not have much knowledge on Hbase yet. I am beginning to learn it, but
>> I just want to be sure i am investing my time in the right direction.
>>
>> Thank you so much for the help,
>>
>> Regards,
>> Panshul.
>>
>>
>> On Wed, Jan 16, 2013 at 11:45 AM, Mohammad Tariq <do...@gmail.com>
>> wrote:
>>
>>> Hello Panshul,
>>>
>>> Hbase and MongoDB are built to serve different purposes. You
>> can't
>>> replace one with the other. They have different strengths and weaknesses.
>>> So, if you are using Hbase for something, think well before switching to
>>> MongoDB or vice verca.
>>>
>>> Coming back to the actual question, you can store anything which can be
>>> converted into a sequence of bytes into Hbase and query it. Could you
>>> please elaborate your problem a bit?It will help us to answer your
>> question
>>> in a better manner.
>>>
>>> Warm Regards,
>>> Tariq
>>> https://mtariq.jux.com/
>>> cloudfront.blogspot.com
>>>
>>>
>>> On Wed, Jan 16, 2013 at 4:03 PM, Panshul Whisper <ouchwhisper@gmail.com
>>>> wrote:
>>>
>>>> Hello,
>>>>
>>>> Is it possible to use hbase to query json documents in a same way as we
>>> can
>>>> do with Mongodb
>>>>
>>>> Suggestions please.
>>>> If we can then a small example as how.. not the query but the process
>>>> flow..
>>>> Thanku so much
>>>> Regards,
>>>> Panshul.
>>>>
>>>
>>
>>
>>
>> --
>> Regards,
>> Ouch Whisper
>> 010101010101
>>
Re: Hbase as mongodb
Posted by Mohammad Tariq <do...@gmail.com>.
You can do that, approach might vary though, depending upon the scenario.
You just have to think well about your schema in order to make sure that it
fits into your put and get requirements.
I have not worked personally on JSON+Hbase combo, so could not give any
direct suggestion at the moment. But we have a lot of folks here on the list
who have experience on such things. Let us hope they come across with this
thread.
I have a few things in mind which I would like to share with you though. Try
not to store too large JSON files. You might need to consider making the
column family compressed. I would first serialize the JSON into Bytes and
then write to Hbase cells and while pulling the data, deserialize it back
in the
same layer.
You may find this
thread<http://comments.gmane.org/gmane.comp.java.hadoop.hbase.user/15261>
useful.
HTH
Warm Regards,
Tariq
https://mtariq.jux.com/
cloudfront.blogspot.com
On Wed, Jan 16, 2013 at 6:36 PM, Panshul Whisper <ou...@gmail.com>wrote:
> Hello Tariq,
>
> Thank you for the reply.
>
> My concern is that I have been working with MongoDB, but now I am switching
> over to Hadoop and I want to use HBase for certain reasons. I was wondering
> if I can store Json files in Hbase in a way that I can query the Json files
> in Hbase as I can in Mongodb. Such as I can directly say Mongodb to get me
> all the objects having timestamp value of xxx date where timestamp is a
> field in Json objects stored in Mongodb. Can I perform similar operations
> on Hbase or does it have another approach for doing similar operations.
> I do not have much knowledge on Hbase yet. I am beginning to learn it, but
> I just want to be sure i am investing my time in the right direction.
>
> Thank you so much for the help,
>
> Regards,
> Panshul.
>
>
> On Wed, Jan 16, 2013 at 11:45 AM, Mohammad Tariq <do...@gmail.com>
> wrote:
>
> > Hello Panshul,
> >
> > Hbase and MongoDB are built to serve different purposes. You
> can't
> > replace one with the other. They have different strengths and weaknesses.
> > So, if you are using Hbase for something, think well before switching to
> > MongoDB or vice verca.
> >
> > Coming back to the actual question, you can store anything which can be
> > converted into a sequence of bytes into Hbase and query it. Could you
> > please elaborate your problem a bit?It will help us to answer your
> question
> > in a better manner.
> >
> > Warm Regards,
> > Tariq
> > https://mtariq.jux.com/
> > cloudfront.blogspot.com
> >
> >
> > On Wed, Jan 16, 2013 at 4:03 PM, Panshul Whisper <ouchwhisper@gmail.com
> > >wrote:
> >
> > > Hello,
> > >
> > > Is it possible to use hbase to query json documents in a same way as we
> > can
> > > do with Mongodb
> > >
> > > Suggestions please.
> > > If we can then a small example as how.. not the query but the process
> > > flow..
> > > Thanku so much
> > > Regards,
> > > Panshul.
> > >
> >
>
>
>
> --
> Regards,
> Ouch Whisper
> 010101010101
>
Re: Hbase as mongodb
Posted by Ted <yu...@gmail.com>.
Project Panthera seems to serve your use case well.
You can refer to http://mail-archives.apache.org/mod_mbox/hadoop-common-user/201209.mbox/%3C521452FCF7ACDE4795C7E150D240AFCA0FDE1395@SHSMSX102.ccr.corp.intel.com%3E
On Jan 16, 2013, at 5:38 AM, Mohammad Tariq <do...@gmail.com> wrote:
> @Anoop sir : Does it make sense to extract the timestamp of JSON
> object beforehand and use it as the rowkey? After that serialize the
> JSON object and store it in the Hbase cell. Gets would a lot faster
> then???
>
> Warm Regards,
> Tariq
> https://mtariq.jux.com/
> cloudfront.blogspot.com
>
>
> On Wed, Jan 16, 2013 at 7:02 PM, Imran M Yousuf <im...@gmail.com> wrote:
>
>> We have used Jackson library for converting Java Object to JSON String
>> and eventually to byte[] and vice-versa; but that is not scan/query
>> friendly, so we integrated Apache Solr to the stack to get that done.
>> http://smart-cms.org
>>
>> Thank you,
>>
>> Imran
>>
>> On Wed, Jan 16, 2013 at 7:27 PM, Anoop Sam John <an...@huawei.com>
>> wrote:
>>>> Such as I can directly say Mongodb to get me
>>> all the objects having timestamp value of xxx date where timestamp is a
>>> field in Json objects stored in Mongodb
>>>
>>> It is possible to store any data in HBase which can be converted into
>> byte[]. Yes using filters one can perform above kind of query. There is no
>> built in filter for above kind of need but custom one can be created. But
>> remember that there is no built in secondary indexing capability in HBase.
>> Here by I can see you have a need for indexing a part of column value.
>> [timestamp is a field in Json objects ]
>>>
>>> -Anoop-
>>> ________________________________________
>>> From: Panshul Whisper [ouchwhisper@gmail.com]
>>> Sent: Wednesday, January 16, 2013 6:36 PM
>>> To: user@hbase.apache.org
>>> Subject: Re: Hbase as mongodb
>>>
>>> Hello Tariq,
>>>
>>> Thank you for the reply.
>>>
>>> My concern is that I have been working with MongoDB, but now I am
>> switching
>>> over to Hadoop and I want to use HBase for certain reasons. I was
>> wondering
>>> if I can store Json files in Hbase in a way that I can query the Json
>> files
>>> in Hbase as I can in Mongodb. Such as I can directly say Mongodb to get
>> me
>>> all the objects having timestamp value of xxx date where timestamp is a
>>> field in Json objects stored in Mongodb. Can I perform similar operations
>>> on Hbase or does it have another approach for doing similar operations.
>>> I do not have much knowledge on Hbase yet. I am beginning to learn it,
>> but
>>> I just want to be sure i am investing my time in the right direction.
>>>
>>> Thank you so much for the help,
>>>
>>> Regards,
>>> Panshul.
>>>
>>>
>>> On Wed, Jan 16, 2013 at 11:45 AM, Mohammad Tariq <do...@gmail.com>
>> wrote:
>>>
>>>> Hello Panshul,
>>>>
>>>> Hbase and MongoDB are built to serve different purposes. You
>> can't
>>>> replace one with the other. They have different strengths and
>> weaknesses.
>>>> So, if you are using Hbase for something, think well before switching to
>>>> MongoDB or vice verca.
>>>>
>>>> Coming back to the actual question, you can store anything which can be
>>>> converted into a sequence of bytes into Hbase and query it. Could you
>>>> please elaborate your problem a bit?It will help us to answer your
>> question
>>>> in a better manner.
>>>>
>>>> Warm Regards,
>>>> Tariq
>>>> https://mtariq.jux.com/
>>>> cloudfront.blogspot.com
>>>>
>>>>
>>>> On Wed, Jan 16, 2013 at 4:03 PM, Panshul Whisper <ouchwhisper@gmail.com
>>>>> wrote:
>>>>
>>>>> Hello,
>>>>>
>>>>> Is it possible to use hbase to query json documents in a same way as
>> we
>>>> can
>>>>> do with Mongodb
>>>>>
>>>>> Suggestions please.
>>>>> If we can then a small example as how.. not the query but the process
>>>>> flow..
>>>>> Thanku so much
>>>>> Regards,
>>>>> Panshul.
>>>
>>>
>>>
>>> --
>>> Regards,
>>> Ouch Whisper
>>> 010101010101
>>
>>
>>
>> --
>> Imran M Yousuf
>> Entrepreneur & CEO
>> Smart IT Engineering Ltd.
>> Dhaka, Bangladesh
>> Twitter: @imyousuf - http://twitter.com/imyousuf
>> Blog: http://imyousuf-tech.blogs.smartitengineering.com/
>> Mobile: +880-1711402557
>> +880-1746119494
>>
RE: Hbase as mongodb
Posted by Panshul Whisper <ou...@gmail.com>.
Thank you for the suggestions, but timestamp is not a unique value in my
case so using it as key is not suggested. The data is too large, so full
table scan is also not good.
Will look into Panthera.
Regards,
Ouch Whisper
01010101010
On Jan 17, 2013 4:52 AM, "Anoop Sam John" <an...@huawei.com> wrote:
> Yes Mohammad. Smarter way like this is needed.. I was telling that even
> if the full JSON is stored as a column value it will be possible to achive
> what Panshul needs. :) But a full table scan will not be acceptable I guess.
>
> As Ted suggested pls check Panthera also. Panthera seems to use Hive HBase
> integration in a smart way.
>
> -Anoop-
> __________________________________
> From: Mohammad Tariq [dontariq@gmail.com]
> Sent: Wednesday, January 16, 2013 7:08 PM
> To: user@hbase.apache.org
> Subject: Re: Hbase as mongodb
>
> @Anoop sir : Does it make sense to extract the timestamp of JSON
> object beforehand and use it as the rowkey? After that serialize the
> JSON object and store it in the Hbase cell. Gets would a lot faster
> then???
>
> Warm Regards,
> Tariq
> https://mtariq.jux.com/
> cloudfront.blogspot.com
>
>
> On Wed, Jan 16, 2013 at 7:02 PM, Imran M Yousuf <im...@gmail.com>
> wrote:
>
> > We have used Jackson library for converting Java Object to JSON String
> > and eventually to byte[] and vice-versa; but that is not scan/query
> > friendly, so we integrated Apache Solr to the stack to get that done.
> > http://smart-cms.org
> >
> > Thank you,
> >
> > Imran
> >
> > On Wed, Jan 16, 2013 at 7:27 PM, Anoop Sam John <an...@huawei.com>
> > wrote:
> > >>Such as I can directly say Mongodb to get me
> > > all the objects having timestamp value of xxx date where timestamp is a
> > > field in Json objects stored in Mongodb
> > >
> > > It is possible to store any data in HBase which can be converted into
> > byte[]. Yes using filters one can perform above kind of query. There is
> no
> > built in filter for above kind of need but custom one can be created.
> But
> > remember that there is no built in secondary indexing capability in
> HBase.
> > Here by I can see you have a need for indexing a part of column value.
> > [timestamp is a field in Json objects ]
> > >
> > > -Anoop-
> > > ________________________________________
> > > From: Panshul Whisper [ouchwhisper@gmail.com]
> > > Sent: Wednesday, January 16, 2013 6:36 PM
> > > To: user@hbase.apache.org
> > > Subject: Re: Hbase as mongodb
> > >
> > > Hello Tariq,
> > >
> > > Thank you for the reply.
> > >
> > > My concern is that I have been working with MongoDB, but now I am
> > switching
> > > over to Hadoop and I want to use HBase for certain reasons. I was
> > wondering
> > > if I can store Json files in Hbase in a way that I can query the Json
> > files
> > > in Hbase as I can in Mongodb. Such as I can directly say Mongodb to get
> > me
> > > all the objects having timestamp value of xxx date where timestamp is a
> > > field in Json objects stored in Mongodb. Can I perform similar
> operations
> > > on Hbase or does it have another approach for doing similar operations.
> > > I do not have much knowledge on Hbase yet. I am beginning to learn it,
> > but
> > > I just want to be sure i am investing my time in the right direction.
> > >
> > > Thank you so much for the help,
> > >
> > > Regards,
> > > Panshul.
> > >
> > >
> > > On Wed, Jan 16, 2013 at 11:45 AM, Mohammad Tariq <do...@gmail.com>
> > wrote:
> > >
> > >> Hello Panshul,
> > >>
> > >> Hbase and MongoDB are built to serve different purposes. You
> > can't
> > >> replace one with the other. They have different strengths and
> > weaknesses.
> > >> So, if you are using Hbase for something, think well before switching
> to
> > >> MongoDB or vice verca.
> > >>
> > >> Coming back to the actual question, you can store anything which can
> be
> > >> converted into a sequence of bytes into Hbase and query it. Could you
> > >> please elaborate your problem a bit?It will help us to answer your
> > question
> > >> in a better manner.
> > >>
> > >> Warm Regards,
> > >> Tariq
> > >> https://mtariq.jux.com/
> > >> cloudfront.blogspot.com
> > >>
> > >>
> > >> On Wed, Jan 16, 2013 at 4:03 PM, Panshul Whisper <
> ouchwhisper@gmail.com
> > >> >wrote:
> > >>
> > >> > Hello,
> > >> >
> > >> > Is it possible to use hbase to query json documents in a same way as
> > we
> > >> can
> > >> > do with Mongodb
> > >> >
> > >> > Suggestions please.
> > >> > If we can then a small example as how.. not the query but the
> process
> > >> > flow..
> > >> > Thanku so much
> > >> > Regards,
> > >> > Panshul.
> > >> >
> > >>
> > >
> > >
> > >
> > > --
> > > Regards,
> > > Ouch Whisper
> > > 010101010101
> >
> >
> >
> > --
> > Imran M Yousuf
> > Entrepreneur & CEO
> > Smart IT Engineering Ltd.
> > Dhaka, Bangladesh
> > Twitter: @imyousuf - http://twitter.com/imyousuf
> > Blog: http://imyousuf-tech.blogs.smartitengineering.com/
> > Mobile: +880-1711402557
> > +880-1746119494
> >
RE: Hbase as mongodb
Posted by Anoop Sam John <an...@huawei.com>.
Yes Mohammad. Smarter way like this is needed.. I was telling that even if the full JSON is stored as a column value it will be possible to achive what Panshul needs. :) But a full table scan will not be acceptable I guess.
As Ted suggested pls check Panthera also. Panthera seems to use Hive HBase integration in a smart way.
-Anoop-
__________________________________
From: Mohammad Tariq [dontariq@gmail.com]
Sent: Wednesday, January 16, 2013 7:08 PM
To: user@hbase.apache.org
Subject: Re: Hbase as mongodb
@Anoop sir : Does it make sense to extract the timestamp of JSON
object beforehand and use it as the rowkey? After that serialize the
JSON object and store it in the Hbase cell. Gets would a lot faster
then???
Warm Regards,
Tariq
https://mtariq.jux.com/
cloudfront.blogspot.com
On Wed, Jan 16, 2013 at 7:02 PM, Imran M Yousuf <im...@gmail.com> wrote:
> We have used Jackson library for converting Java Object to JSON String
> and eventually to byte[] and vice-versa; but that is not scan/query
> friendly, so we integrated Apache Solr to the stack to get that done.
> http://smart-cms.org
>
> Thank you,
>
> Imran
>
> On Wed, Jan 16, 2013 at 7:27 PM, Anoop Sam John <an...@huawei.com>
> wrote:
> >>Such as I can directly say Mongodb to get me
> > all the objects having timestamp value of xxx date where timestamp is a
> > field in Json objects stored in Mongodb
> >
> > It is possible to store any data in HBase which can be converted into
> byte[]. Yes using filters one can perform above kind of query. There is no
> built in filter for above kind of need but custom one can be created. But
> remember that there is no built in secondary indexing capability in HBase.
> Here by I can see you have a need for indexing a part of column value.
> [timestamp is a field in Json objects ]
> >
> > -Anoop-
> > ________________________________________
> > From: Panshul Whisper [ouchwhisper@gmail.com]
> > Sent: Wednesday, January 16, 2013 6:36 PM
> > To: user@hbase.apache.org
> > Subject: Re: Hbase as mongodb
> >
> > Hello Tariq,
> >
> > Thank you for the reply.
> >
> > My concern is that I have been working with MongoDB, but now I am
> switching
> > over to Hadoop and I want to use HBase for certain reasons. I was
> wondering
> > if I can store Json files in Hbase in a way that I can query the Json
> files
> > in Hbase as I can in Mongodb. Such as I can directly say Mongodb to get
> me
> > all the objects having timestamp value of xxx date where timestamp is a
> > field in Json objects stored in Mongodb. Can I perform similar operations
> > on Hbase or does it have another approach for doing similar operations.
> > I do not have much knowledge on Hbase yet. I am beginning to learn it,
> but
> > I just want to be sure i am investing my time in the right direction.
> >
> > Thank you so much for the help,
> >
> > Regards,
> > Panshul.
> >
> >
> > On Wed, Jan 16, 2013 at 11:45 AM, Mohammad Tariq <do...@gmail.com>
> wrote:
> >
> >> Hello Panshul,
> >>
> >> Hbase and MongoDB are built to serve different purposes. You
> can't
> >> replace one with the other. They have different strengths and
> weaknesses.
> >> So, if you are using Hbase for something, think well before switching to
> >> MongoDB or vice verca.
> >>
> >> Coming back to the actual question, you can store anything which can be
> >> converted into a sequence of bytes into Hbase and query it. Could you
> >> please elaborate your problem a bit?It will help us to answer your
> question
> >> in a better manner.
> >>
> >> Warm Regards,
> >> Tariq
> >> https://mtariq.jux.com/
> >> cloudfront.blogspot.com
> >>
> >>
> >> On Wed, Jan 16, 2013 at 4:03 PM, Panshul Whisper <ouchwhisper@gmail.com
> >> >wrote:
> >>
> >> > Hello,
> >> >
> >> > Is it possible to use hbase to query json documents in a same way as
> we
> >> can
> >> > do with Mongodb
> >> >
> >> > Suggestions please.
> >> > If we can then a small example as how.. not the query but the process
> >> > flow..
> >> > Thanku so much
> >> > Regards,
> >> > Panshul.
> >> >
> >>
> >
> >
> >
> > --
> > Regards,
> > Ouch Whisper
> > 010101010101
>
>
>
> --
> Imran M Yousuf
> Entrepreneur & CEO
> Smart IT Engineering Ltd.
> Dhaka, Bangladesh
> Twitter: @imyousuf - http://twitter.com/imyousuf
> Blog: http://imyousuf-tech.blogs.smartitengineering.com/
> Mobile: +880-1711402557
> +880-1746119494
>
Re: Hbase as mongodb
Posted by Mohammad Tariq <do...@gmail.com>.
@Anoop sir : Does it make sense to extract the timestamp of JSON
object beforehand and use it as the rowkey? After that serialize the
JSON object and store it in the Hbase cell. Gets would a lot faster
then???
Warm Regards,
Tariq
https://mtariq.jux.com/
cloudfront.blogspot.com
On Wed, Jan 16, 2013 at 7:02 PM, Imran M Yousuf <im...@gmail.com> wrote:
> We have used Jackson library for converting Java Object to JSON String
> and eventually to byte[] and vice-versa; but that is not scan/query
> friendly, so we integrated Apache Solr to the stack to get that done.
> http://smart-cms.org
>
> Thank you,
>
> Imran
>
> On Wed, Jan 16, 2013 at 7:27 PM, Anoop Sam John <an...@huawei.com>
> wrote:
> >>Such as I can directly say Mongodb to get me
> > all the objects having timestamp value of xxx date where timestamp is a
> > field in Json objects stored in Mongodb
> >
> > It is possible to store any data in HBase which can be converted into
> byte[]. Yes using filters one can perform above kind of query. There is no
> built in filter for above kind of need but custom one can be created. But
> remember that there is no built in secondary indexing capability in HBase.
> Here by I can see you have a need for indexing a part of column value.
> [timestamp is a field in Json objects ]
> >
> > -Anoop-
> > ________________________________________
> > From: Panshul Whisper [ouchwhisper@gmail.com]
> > Sent: Wednesday, January 16, 2013 6:36 PM
> > To: user@hbase.apache.org
> > Subject: Re: Hbase as mongodb
> >
> > Hello Tariq,
> >
> > Thank you for the reply.
> >
> > My concern is that I have been working with MongoDB, but now I am
> switching
> > over to Hadoop and I want to use HBase for certain reasons. I was
> wondering
> > if I can store Json files in Hbase in a way that I can query the Json
> files
> > in Hbase as I can in Mongodb. Such as I can directly say Mongodb to get
> me
> > all the objects having timestamp value of xxx date where timestamp is a
> > field in Json objects stored in Mongodb. Can I perform similar operations
> > on Hbase or does it have another approach for doing similar operations.
> > I do not have much knowledge on Hbase yet. I am beginning to learn it,
> but
> > I just want to be sure i am investing my time in the right direction.
> >
> > Thank you so much for the help,
> >
> > Regards,
> > Panshul.
> >
> >
> > On Wed, Jan 16, 2013 at 11:45 AM, Mohammad Tariq <do...@gmail.com>
> wrote:
> >
> >> Hello Panshul,
> >>
> >> Hbase and MongoDB are built to serve different purposes. You
> can't
> >> replace one with the other. They have different strengths and
> weaknesses.
> >> So, if you are using Hbase for something, think well before switching to
> >> MongoDB or vice verca.
> >>
> >> Coming back to the actual question, you can store anything which can be
> >> converted into a sequence of bytes into Hbase and query it. Could you
> >> please elaborate your problem a bit?It will help us to answer your
> question
> >> in a better manner.
> >>
> >> Warm Regards,
> >> Tariq
> >> https://mtariq.jux.com/
> >> cloudfront.blogspot.com
> >>
> >>
> >> On Wed, Jan 16, 2013 at 4:03 PM, Panshul Whisper <ouchwhisper@gmail.com
> >> >wrote:
> >>
> >> > Hello,
> >> >
> >> > Is it possible to use hbase to query json documents in a same way as
> we
> >> can
> >> > do with Mongodb
> >> >
> >> > Suggestions please.
> >> > If we can then a small example as how.. not the query but the process
> >> > flow..
> >> > Thanku so much
> >> > Regards,
> >> > Panshul.
> >> >
> >>
> >
> >
> >
> > --
> > Regards,
> > Ouch Whisper
> > 010101010101
>
>
>
> --
> Imran M Yousuf
> Entrepreneur & CEO
> Smart IT Engineering Ltd.
> Dhaka, Bangladesh
> Twitter: @imyousuf - http://twitter.com/imyousuf
> Blog: http://imyousuf-tech.blogs.smartitengineering.com/
> Mobile: +880-1711402557
> +880-1746119494
>
Re: Hbase as mongodb
Posted by Imran M Yousuf <im...@gmail.com>.
We have used Jackson library for converting Java Object to JSON String
and eventually to byte[] and vice-versa; but that is not scan/query
friendly, so we integrated Apache Solr to the stack to get that done.
http://smart-cms.org
Thank you,
Imran
On Wed, Jan 16, 2013 at 7:27 PM, Anoop Sam John <an...@huawei.com> wrote:
>>Such as I can directly say Mongodb to get me
> all the objects having timestamp value of xxx date where timestamp is a
> field in Json objects stored in Mongodb
>
> It is possible to store any data in HBase which can be converted into byte[]. Yes using filters one can perform above kind of query. There is no built in filter for above kind of need but custom one can be created. But remember that there is no built in secondary indexing capability in HBase. Here by I can see you have a need for indexing a part of column value. [timestamp is a field in Json objects ]
>
> -Anoop-
> ________________________________________
> From: Panshul Whisper [ouchwhisper@gmail.com]
> Sent: Wednesday, January 16, 2013 6:36 PM
> To: user@hbase.apache.org
> Subject: Re: Hbase as mongodb
>
> Hello Tariq,
>
> Thank you for the reply.
>
> My concern is that I have been working with MongoDB, but now I am switching
> over to Hadoop and I want to use HBase for certain reasons. I was wondering
> if I can store Json files in Hbase in a way that I can query the Json files
> in Hbase as I can in Mongodb. Such as I can directly say Mongodb to get me
> all the objects having timestamp value of xxx date where timestamp is a
> field in Json objects stored in Mongodb. Can I perform similar operations
> on Hbase or does it have another approach for doing similar operations.
> I do not have much knowledge on Hbase yet. I am beginning to learn it, but
> I just want to be sure i am investing my time in the right direction.
>
> Thank you so much for the help,
>
> Regards,
> Panshul.
>
>
> On Wed, Jan 16, 2013 at 11:45 AM, Mohammad Tariq <do...@gmail.com> wrote:
>
>> Hello Panshul,
>>
>> Hbase and MongoDB are built to serve different purposes. You can't
>> replace one with the other. They have different strengths and weaknesses.
>> So, if you are using Hbase for something, think well before switching to
>> MongoDB or vice verca.
>>
>> Coming back to the actual question, you can store anything which can be
>> converted into a sequence of bytes into Hbase and query it. Could you
>> please elaborate your problem a bit?It will help us to answer your question
>> in a better manner.
>>
>> Warm Regards,
>> Tariq
>> https://mtariq.jux.com/
>> cloudfront.blogspot.com
>>
>>
>> On Wed, Jan 16, 2013 at 4:03 PM, Panshul Whisper <ouchwhisper@gmail.com
>> >wrote:
>>
>> > Hello,
>> >
>> > Is it possible to use hbase to query json documents in a same way as we
>> can
>> > do with Mongodb
>> >
>> > Suggestions please.
>> > If we can then a small example as how.. not the query but the process
>> > flow..
>> > Thanku so much
>> > Regards,
>> > Panshul.
>> >
>>
>
>
>
> --
> Regards,
> Ouch Whisper
> 010101010101
--
Imran M Yousuf
Entrepreneur & CEO
Smart IT Engineering Ltd.
Dhaka, Bangladesh
Twitter: @imyousuf - http://twitter.com/imyousuf
Blog: http://imyousuf-tech.blogs.smartitengineering.com/
Mobile: +880-1711402557
+880-1746119494
RE: Hbase as mongodb
Posted by Anoop Sam John <an...@huawei.com>.
>Such as I can directly say Mongodb to get me
all the objects having timestamp value of xxx date where timestamp is a
field in Json objects stored in Mongodb
It is possible to store any data in HBase which can be converted into byte[]. Yes using filters one can perform above kind of query. There is no built in filter for above kind of need but custom one can be created. But remember that there is no built in secondary indexing capability in HBase. Here by I can see you have a need for indexing a part of column value. [timestamp is a field in Json objects ]
-Anoop-
________________________________________
From: Panshul Whisper [ouchwhisper@gmail.com]
Sent: Wednesday, January 16, 2013 6:36 PM
To: user@hbase.apache.org
Subject: Re: Hbase as mongodb
Hello Tariq,
Thank you for the reply.
My concern is that I have been working with MongoDB, but now I am switching
over to Hadoop and I want to use HBase for certain reasons. I was wondering
if I can store Json files in Hbase in a way that I can query the Json files
in Hbase as I can in Mongodb. Such as I can directly say Mongodb to get me
all the objects having timestamp value of xxx date where timestamp is a
field in Json objects stored in Mongodb. Can I perform similar operations
on Hbase or does it have another approach for doing similar operations.
I do not have much knowledge on Hbase yet. I am beginning to learn it, but
I just want to be sure i am investing my time in the right direction.
Thank you so much for the help,
Regards,
Panshul.
On Wed, Jan 16, 2013 at 11:45 AM, Mohammad Tariq <do...@gmail.com> wrote:
> Hello Panshul,
>
> Hbase and MongoDB are built to serve different purposes. You can't
> replace one with the other. They have different strengths and weaknesses.
> So, if you are using Hbase for something, think well before switching to
> MongoDB or vice verca.
>
> Coming back to the actual question, you can store anything which can be
> converted into a sequence of bytes into Hbase and query it. Could you
> please elaborate your problem a bit?It will help us to answer your question
> in a better manner.
>
> Warm Regards,
> Tariq
> https://mtariq.jux.com/
> cloudfront.blogspot.com
>
>
> On Wed, Jan 16, 2013 at 4:03 PM, Panshul Whisper <ouchwhisper@gmail.com
> >wrote:
>
> > Hello,
> >
> > Is it possible to use hbase to query json documents in a same way as we
> can
> > do with Mongodb
> >
> > Suggestions please.
> > If we can then a small example as how.. not the query but the process
> > flow..
> > Thanku so much
> > Regards,
> > Panshul.
> >
>
--
Regards,
Ouch Whisper
010101010101
Re: Hbase as mongodb
Posted by Panshul Whisper <ou...@gmail.com>.
Hello Tariq,
Thank you for the reply.
My concern is that I have been working with MongoDB, but now I am switching
over to Hadoop and I want to use HBase for certain reasons. I was wondering
if I can store Json files in Hbase in a way that I can query the Json files
in Hbase as I can in Mongodb. Such as I can directly say Mongodb to get me
all the objects having timestamp value of xxx date where timestamp is a
field in Json objects stored in Mongodb. Can I perform similar operations
on Hbase or does it have another approach for doing similar operations.
I do not have much knowledge on Hbase yet. I am beginning to learn it, but
I just want to be sure i am investing my time in the right direction.
Thank you so much for the help,
Regards,
Panshul.
On Wed, Jan 16, 2013 at 11:45 AM, Mohammad Tariq <do...@gmail.com> wrote:
> Hello Panshul,
>
> Hbase and MongoDB are built to serve different purposes. You can't
> replace one with the other. They have different strengths and weaknesses.
> So, if you are using Hbase for something, think well before switching to
> MongoDB or vice verca.
>
> Coming back to the actual question, you can store anything which can be
> converted into a sequence of bytes into Hbase and query it. Could you
> please elaborate your problem a bit?It will help us to answer your question
> in a better manner.
>
> Warm Regards,
> Tariq
> https://mtariq.jux.com/
> cloudfront.blogspot.com
>
>
> On Wed, Jan 16, 2013 at 4:03 PM, Panshul Whisper <ouchwhisper@gmail.com
> >wrote:
>
> > Hello,
> >
> > Is it possible to use hbase to query json documents in a same way as we
> can
> > do with Mongodb
> >
> > Suggestions please.
> > If we can then a small example as how.. not the query but the process
> > flow..
> > Thanku so much
> > Regards,
> > Panshul.
> >
>
--
Regards,
Ouch Whisper
010101010101
Re: Hbase as mongodb
Posted by Mohammad Tariq <do...@gmail.com>.
Hello Panshul,
Hbase and MongoDB are built to serve different purposes. You can't
replace one with the other. They have different strengths and weaknesses.
So, if you are using Hbase for something, think well before switching to
MongoDB or vice verca.
Coming back to the actual question, you can store anything which can be
converted into a sequence of bytes into Hbase and query it. Could you
please elaborate your problem a bit?It will help us to answer your question
in a better manner.
Warm Regards,
Tariq
https://mtariq.jux.com/
cloudfront.blogspot.com
On Wed, Jan 16, 2013 at 4:03 PM, Panshul Whisper <ou...@gmail.com>wrote:
> Hello,
>
> Is it possible to use hbase to query json documents in a same way as we can
> do with Mongodb
>
> Suggestions please.
> If we can then a small example as how.. not the query but the process
> flow..
> Thanku so much
> Regards,
> Panshul.
>
Re: Hbase as mongodb
Posted by Nitin Pawar <ni...@gmail.com>.
may be this will help
http://sites.ieee.org/scv-cs/files/2011/03/IBM-Jaql-by-Kevin-Beyer.pdf
On Wed, Jan 16, 2013 at 4:03 PM, Panshul Whisper <ou...@gmail.com>wrote:
> Hello,
>
> Is it possible to use hbase to query json documents in a same way as we can
> do with Mongodb
>
> Suggestions please.
> If we can then a small example as how.. not the query but the process
> flow..
> Thanku so much
> Regards,
> Panshul.
>
--
Nitin Pawar