You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hbase.apache.org by "Ramkrishna.S.Vasudevan" <ra...@huawei.com> on 2012/04/23 08:58:37 UTC
Additional fields written to HTD while writing htableDescriptor
Hi Devs
Currently while creating htable descriptor after the column families are
persisted we write
2 new lines and the htable name also in the descriptor. But they are not
read anywhere? What is the significance of writing it?
Regards
Ram
RE: Additional fields written to HTD while writing htableDescriptor
Posted by "Ramkrishna.S.Vasudevan" <ra...@huawei.com>.
Thanks Jon. Will look into and get back to you in case of any queries.
Regards
Ram
> -----Original Message-----
> From: Jonathan Hsieh [mailto:jon@cloudera.com]
> Sent: Monday, April 23, 2012 2:01 PM
> To: dev@hbase.apache.org
> Subject: Re: Additional fields written to HTD while writing
> htableDescriptor
>
> Ram,
>
> The .tableinfo code (
> https://github.com/apache/hbase/blob/trunk/src/main/java/org/apache/had
> oop/hbase/util/FSTableDescriptors.java#L502)
> is similar to the .regioninfo write code (
> https://github.com/apache/hbase/blob/trunk/src/main/java/org/apache/had
> oop/hbase/regionserver/HRegion.java#L716)
> which also also dumps the stringified version of the structure. This
> is
> useful because we can dump the contents using 'hadoop -cat' without
> having
> to use some script to have a human-readable version of the data.
>
> I've used this during repairs:
> https://github.com/jmhsieh/hbase-repair-
> scripts/blob/master/dumpHriFile.rb )
> but it might be better to add a main to HRegionInfo and
> FSTableDescriptor
> that can open and dump the files.
>
> Jon.
>
> On Sun, Apr 22, 2012 at 11:58 PM, Ramkrishna.S.Vasudevan <
> ramkrishna.vasudevan@huawei.com> wrote:
>
> > Hi Devs
> >
> >
> >
> > Currently while creating htable descriptor after the column families
> are
> > persisted we write
> >
> > 2 new lines and the htable name also in the descriptor. But they are
> not
> > read anywhere? What is the significance of writing it?
> >
> >
> >
> >
> >
> > Regards
> >
> > Ram
> >
> >
>
>
> --
> // Jonathan Hsieh (shay)
> // Software Engineer, Cloudera
> // jon@cloudera.com
Re: Additional fields written to HTD while writing htableDescriptor
Posted by Jonathan Hsieh <jo...@cloudera.com>.
Ram,
The .tableinfo code (
https://github.com/apache/hbase/blob/trunk/src/main/java/org/apache/hadoop/hbase/util/FSTableDescriptors.java#L502)
is similar to the .regioninfo write code (
https://github.com/apache/hbase/blob/trunk/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java#L716)
which also also dumps the stringified version of the structure. This is
useful because we can dump the contents using 'hadoop -cat' without having
to use some script to have a human-readable version of the data.
I've used this during repairs:
https://github.com/jmhsieh/hbase-repair-scripts/blob/master/dumpHriFile.rb )
but it might be better to add a main to HRegionInfo and FSTableDescriptor
that can open and dump the files.
Jon.
On Sun, Apr 22, 2012 at 11:58 PM, Ramkrishna.S.Vasudevan <
ramkrishna.vasudevan@huawei.com> wrote:
> Hi Devs
>
>
>
> Currently while creating htable descriptor after the column families are
> persisted we write
>
> 2 new lines and the htable name also in the descriptor. But they are not
> read anywhere? What is the significance of writing it?
>
>
>
>
>
> Regards
>
> Ram
>
>
--
// Jonathan Hsieh (shay)
// Software Engineer, Cloudera
// jon@cloudera.com