You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hbase.apache.org by 赵辉 <hz...@gmail.com> on 2010/04/06 16:14:46 UTC

About Hbase

  hi, i am interested in HBASE and have viewed lots of materials about it,
but now i have some questions!
The first question is about the data layout and its index,maybe you can tell
me about the difference on Mfile,Hfile and Tfile.
 The second is about the caches(both metadata cache and data cache),i want
to know if there are ,where they locate in and how they work.
The third is about the hbase shell, which implements an alter command,
that can change or add or delete a column family,but i remember the column
family cannot be changed after the table is created. I also want  to know
default max VERSIONs, when i create a table i give the VERSION 2,later i put
three values for the same row+column and different timestamp, but i can get
values rather than only two.
 I wish your detail answers, thanks!

Hackathon

Posted by Jonathan Gray <jg...@facebook.com>.
Anyone who hasn't registered, don't forget.

http://www.meetup.com/hackathon/calendar/13063062/

Ryan and Todd... hope you guys can make it so sign up!

RE: About Hbase

Posted by Jonathan Gray <jg...@facebook.com>.
That's right.  If you ever see more versions than the family setting of maxVersions, something is broken in the read path and we should fix it.

> -----Original Message-----
> From: Lars George [mailto:lars.george@gmail.com]
> Sent: Friday, April 09, 2010 12:58 AM
> To: hbase-dev@hadoop.apache.org
> Subject: Re: About Hbase
> 
> Oh, discussing this here it seems I was to fast to answer. The Scan
> object will set Store.versionsToReturn() to the set max versions. So
> have also no idea what the issue is :)
> 
> Please rephrase.
> 
> Lars
> 
> On Fri, Apr 9, 2010 at 9:27 AM, Lars George <la...@gmail.com>
> wrote:
> > Hi,
> >
> >>> The third is about the hbase shell, which implements an alter
> command,
> >>> that can change or add or delete a column family,but i remember the
> column
> >>> family cannot be changed after the table is created. I also want
>  to know
> >>> default max VERSIONs, when i create a table i give the VERSION
> 2,later i put
> >>> three values for the same row+column and different timestamp, but i
> can get
> >>> values rather than only two.
> >>
> >> The column family can be changed, not sure what you are referring
> to.
> >>
> >> Default max versions is 3, the rest of the question is
> unintelligible.
> >
> > I think he means he has set Versions to 2 but sees more than those 2.
> > That is because the table has not yet been compacted. Run a major
> > compaction from the shell on that table and it will reduce the
> > versions to the enforced 2. Bottomline is, for a short period of time
> > (but can be hours, the default is < 24hrs), you may see more than the
> > set number of Versions. Think of it in terms of "Max. number of
> > versions to keep".
> >
> > HTH,
> > Lars
> >

Re: About Hbase

Posted by Lars George <la...@gmail.com>.
Oh, discussing this here it seems I was to fast to answer. The Scan
object will set Store.versionsToReturn() to the set max versions. So
have also no idea what the issue is :)

Please rephrase.

Lars

On Fri, Apr 9, 2010 at 9:27 AM, Lars George <la...@gmail.com> wrote:
> Hi,
>
>>> The third is about the hbase shell, which implements an alter command,
>>> that can change or add or delete a column family,but i remember the column
>>> family cannot be changed after the table is created. I also want  to know
>>> default max VERSIONs, when i create a table i give the VERSION 2,later i put
>>> three values for the same row+column and different timestamp, but i can get
>>> values rather than only two.
>>
>> The column family can be changed, not sure what you are referring to.
>>
>> Default max versions is 3, the rest of the question is unintelligible.
>
> I think he means he has set Versions to 2 but sees more than those 2.
> That is because the table has not yet been compacted. Run a major
> compaction from the shell on that table and it will reduce the
> versions to the enforced 2. Bottomline is, for a short period of time
> (but can be hours, the default is < 24hrs), you may see more than the
> set number of Versions. Think of it in terms of "Max. number of
> versions to keep".
>
> HTH,
> Lars
>

Re: About Hbase

Posted by Lars George <la...@gmail.com>.
Hi,

>> The third is about the hbase shell, which implements an alter command,
>> that can change or add or delete a column family,but i remember the column
>> family cannot be changed after the table is created. I also want  to know
>> default max VERSIONs, when i create a table i give the VERSION 2,later i put
>> three values for the same row+column and different timestamp, but i can get
>> values rather than only two.
>
> The column family can be changed, not sure what you are referring to.
>
> Default max versions is 3, the rest of the question is unintelligible.

I think he means he has set Versions to 2 but sees more than those 2.
That is because the table has not yet been compacted. Run a major
compaction from the shell on that table and it will reduce the
versions to the enforced 2. Bottomline is, for a short period of time
(but can be hours, the default is < 24hrs), you may see more than the
set number of Versions. Think of it in terms of "Max. number of
versions to keep".

HTH,
Lars

Re: About Hbase

Posted by Jean-Daniel Cryans <jd...@apache.org>.
On Tue, Apr 6, 2010 at 7:14 AM, 赵辉 <hz...@gmail.com> wrote:
>  hi, i am interested in HBASE and have viewed lots of materials about it,
> but now i have some questions!
> The first question is about the data layout and its index,maybe you can tell
> me about the difference on Mfile,Hfile and Tfile.

Never heard of Mfile.

HFile is a specialized TFile for HBase. Is there anything in
particular you need to know about?

>  The second is about the caches(both metadata cache and data cache),i want
> to know if there are ,where they locate in and how they work.

Like Bigtable there's a .META. cache which works like a big map in the
client and a block cache in the region servers which works like a LRU.

> The third is about the hbase shell, which implements an alter command,
> that can change or add or delete a column family,but i remember the column
> family cannot be changed after the table is created. I also want  to know
> default max VERSIONs, when i create a table i give the VERSION 2,later i put
> three values for the same row+column and different timestamp, but i can get
> values rather than only two.

The column family can be changed, not sure what you are referring to.

Default max versions is 3, the rest of the question is unintelligible.

>  I wish your detail answers, thanks!
>