hbase-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jean-Marc Spaggiari <jean-m...@spaggiari.org>
Subject Re: Flat-wide table Hbase
Date Mon, 14 Dec 2015 10:19:50 GMT
Hi Rajesh,

This is not a tall table. Tall will be something whereyou put your domain
name on the key, no on the column qualifier. Putting the domain on the
columns means you will have many many columns for the same key. At the end,
HBase always stores the key for each and every column, what ever it is tall
or wide.

Reading 1000 rows or reading 1000 columns for HBase is exactly the same
thing. The only difference is that between 1000 rows HBase might split the
rows into 2 regions. If you have 1000 columns, HBase will not split them.

HBase can return a row in few milli seconds. 2 seconds for one Cell is a
lot...

HTH

JMS

2015-12-14 5:14 GMT-05:00 Rajeshkumar J <rajeshkumarit8292@gmail.com>:

> Hi,
>
>    Thanks for your response, But you are suggesting me a tall and narrow
> table which is not working for me right now. As my use case involves
> real-time solution I need to retrieve data from hbase table within one or
> two seconds. I have tried as you suggested which may lead to 1000 rows for
> a given id which takes more than  a minute in retrieval process.
>
> Thanks
> Rajeshkumar
>
> On Mon, Dec 14, 2015 at 3:29 PM, Jean-Marc Spaggiari <
> jean-marc@spaggiari.org> wrote:
>
> > Hi,
> >
> > HBase is a key value sotre. So what you are pushing here will be stored
> as:
> > 1002 | xxx | www.sample.com | xx:xx:xx
> > 1003 | yyy | www.url,com | xx:xx:yy
> > 1002 | xxx | url.com  | yy:yy:yy
> > 1002 | xxx | urrl2.com | zz:zz:zz
> >
> > HOWEVER.... HBase will never split a region withing a key and keys are
> > always ordered. So at the end, what you will have exactly is:
> >
> > --------------------------------------------------------------
> > 1002 | xxx | url.com  | yy:yy:yy
> > 1002 | xxx | urrl2.com | zz:zz:zz
> > 1002 | xxx | www.sample.com | xx:xx:xx
> > --------------------------------------------------------------
> > 1003 | yyy | www.url,com | xx:xx:yy
> > --------------------------------------------------------------
> >
> > The only places where HBase will splis are marked with "-----"
> >
> >
> > This is if 1002-xxx is your key and "url.com" is your column qualifier.
> >
> > HTH
> >
> > JMS
> >
> >
> > 2015-12-14 3:39 GMT-05:00 Rajeshkumar J <rajeshkumarit8292@gmail.com>:
> >
> > > Hi,
> > >
> > >    I am going to use flat-wide tables in Hbase for my usecase and I
> have
> > > some doubts regarding this.
> > >
> > >    1. As per my knowledge flat-wide stores one column value as key and
> > > others as its values in a key-value pair relationship ( correct me if I
> > am
> > > wrong).
> > >
> > > I am having row  as follows
> > >
> > > id  | name | url | time
> > >
> > > 1002 | xxx | www.sample.com | xx:xx:xx
> > > 1003 | yyy | www.url,com | xx:xx:yy
> > > 1002 | xxx | url.com  | yy:yy:yy
> > > 1002 | xxx | urrl2.com | zz:zz:zz
> > >
> > >
> > >
> > > I need to store it in flat-wide table as follows
> > >
> > > 1002 | xxx | www.sample.com | xx:xx:xx | 1002 | xxx | url.com  |
> > yy:yy:yy
> > > |
> > > 1002 | xxx | urrl2.com | zz:zz:zz
> > > 1003 | yyy | www.url,com | xx:xx:yy
> > >
> > > How to store it like this?
> > > Can any on help me in this?
> > >
> >
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message