Home | About | Sematext search-lucene.com search-hadoop.com
 Search Hadoop and all its subprojects:

Switch to Threaded View
HBase, mail # user - Hbase as mongodb


Copy link to this message
-
Re: Hbase as mongodb
Michael Segel 2013-01-17, 15:25
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 <[EMAIL PROTECTED]> 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 <[EMAIL PROTECTED]>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 <[EMAIL PROTECTED]>
>> 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 <[EMAIL PROTECTED]
>>>> 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
>>