-Re: renaming table
Stack 2012-10-18, 21:45
On Thu, Oct 18, 2012 at 10:36 AM, Shrijeet Paliwal
<[EMAIL PROTECTED]> 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
Maybe after adding first region, set its state disabled in zk? Then
after all regions are loaded up, enable the table?