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

Switch to Plain View
HBase >> mail # user >> Hbase table with a nested entity


+
Dastagiri S Shaik 2013-02-27, 04:38
+
yonghu 2013-02-27, 11:06
Copy link to this message
-
Re: Hbase table with a nested entity
Uhm you can easily do this in HBase a couple of different ways. :-)
Your option 2 is this solution he wants.
Or option 3, store the data into a map or some serializable object, (Single column)
Option 4, use Avro single column
Option 5, if data set is large enough, store it in a sequence file and use HBase as index.

You just need to free yourself from thinking only in terms of ER modeling.

Sent from a remote device. Please excuse any typos...

Mike Segel

On Feb 27, 2013, at 5:06 AM, yonghu <[EMAIL PROTECTED]> wrote:

> Hello Dastgiri,
>
> I don't think HBase can support original nested schema which you want
> to define. But you can still store your data in HBase. I figured out
> several possible solutions:
>
> 1. row_key: profileid + profilename + date, the column will be
> monthwiseProfileCount:uk and so on. However, this approach will cause
> data redundancy (profileid + profilename will repeatably appear), and
> the data which belongs to the same user are separated into different
> tuples.
>
> 2. row_key: profileid + profilename. the column will be
> monthwiseProfileCount: date(e.g. 12/10/2010)/uk and so on. The benefit
> of this approach is that all the data belongs to the same user group
> together. However, as date is one part of column information. It will
> cause to create many columns if the value range of date is wide.
>
> regards!
>
> Yong
>
> On Wed, Feb 27, 2013 at 5:38 AM, Dastagiri S Shaik
> <[EMAIL PROTECTED]> wrote:
>> Hi All,
>>
>> I need to define a schema
>>
>> profileid  (integer)
>> profilename (String)
>> monthwiseProfileCount (is having )
>>                                        12/10/2010-->
>>                                        uk:200
>>                                        us:300
>>                                        india:500
>>
>>                                        12/11/2010-->
>>                                        uk:200
>>                                        us:300
>>                                        india:500
>>
>>
>> please help me.
>>
>> Regards
>> Dastgiri
>