You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hbase.apache.org by Shrijeet Paliwal <sh...@rocketfuel.com> on 2012/10/18 19:36:54 UTC

Re: renaming table

Sorry to bring this topic back . Here is a java copy of old script ,
changes made to make it work in 0.92.x https://gist.github.com/3913529

Stack, I disabled the old table before renaming it, but the new table
(renamed version) that gets created as a result of executing this program -
gets created in enabled state. By that I mean as soon as it finishes, the
hbck is going to report that we have entries in meta and data in HDFS but
no regionserver is serving those regions. Running hbck with repair flag
bring things back in order though.

Is this how it used to behave in 0.90.x as well? Could I do something which
makes the creation of renamed table in disabled state?

On Fri, Mar 23, 2012 at 11:54 AM, Stack <st...@duboce.net> wrote:

> On Fri, Mar 23, 2012 at 11:38 AM, Ted Yu <yu...@gmail.com> wrote:
> > Hi,
> > I noticed bin/rename_table.rb is no longer in 0.92 distro.
> >
>
> That script was a hack.
>
> > What is the recommended practice of renaming hbase table in 0.92 and
> newer
> > versions ?
> >
>
> Hack on bin/rename_table.rb to make it work w/ 0.92 (Will need to
> change .META., rename fs dir, and edit .tableinfo)
>
> St.Ack
>

Re: renaming table

Posted by Stack <st...@duboce.net>.
On Thu, Oct 18, 2012 at 10:36 AM, Shrijeet Paliwal
<sh...@rocketfuel.com> wrote:
> Sorry to bring this topic back . Here is a java copy of old script ,
> changes made to make it work in 0.92.x https://gist.github.com/3913529
>
> Stack, I disabled the old table before renaming it, but the new table
> (renamed version) that gets created as a result of executing this program -
> gets created in enabled state. By that I mean as soon as it finishes, the
> hbck is going to report that we have entries in meta and data in HDFS but
> no regionserver is serving those regions. Running hbck with repair flag
> bring things back in order though.
>
> Is this how it used to behave in 0.90.x as well? Could I do something which
> makes the creation of renamed table in disabled state?
>

Do we need a create disabled command?

What you describe above I believe is difference between 0.90 and 0.92.
 IIRC, you had to disable and reenable to have all in proper state in
0.92.  A table used to be 'disabled' if all regions in the table had
an offline state (I haven't looked but maybe the old rename would was
making use of this fact).  In 0.92, we made it so state was a flag up
in zk.

Maybe after adding first region, set its state disabled in zk?  Then
after all regions are loaded up, enable the table?

St.Ack