You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@hbase.apache.org by Jack Levin <ma...@gmail.com> on 2011/02/26 18:31:50 UTC

.regioninfo has old name after rename_table ran

Hello - I am trying to rename some of my tables, what I see that after using
rename shell tool, meta gets new name, and describe 'table' reports new name
in schema, but .regioninfo<http://img699.imageshack.us:50075/browseDirectory.jsp?dir=%2Fhbase%2Ftesting_media_data%2Fff7a545a6e9943aef11e5ac5a10d92f7%2F.regioninfo&namenodeInfoPort=50070>
containts
old name, this is problematic, as we try to copy tables to other clusters
and they show up with old names in
.regioninfo<http://img699.imageshack.us:50075/browseDirectory.jsp?dir=%2Fhbase%2Ftesting_media_data%2Fff7a545a6e9943aef11e5ac5a10d92f7%2F.regioninfo&namenodeInfoPort=50070>
and
on the 'list', but in /hbase/<new_name>, you can see how this leads to be an
issue....   Any ideas how to resolve it?  Do I have a broken
rename_table.rb?

-Jack

Re: .regioninfo has old name after rename_table ran

Posted by Jack Levin <ma...@gmail.com>.
Is there a patched version anyone might be using?  I figured someone must
have fixed it.  To be honest I never wrote Ruby in my life, just a little
bit of cuda C and php :)

-Jack

On Sat, Feb 26, 2011 at 10:19 AM, Stack <st...@duboce.net> wrote:

> rename_table.rb never rewrote .regioninfo.  It should.  Shouldn't be
> hard to amend.  See add_table.rb for how to read the .regioninfo.
> You'd read in the .regioninfo to create a HRegionInfo, you'd use this
> as a source from which to read old table's config (column families,
> etc), make a new HRegionInfo with the new table's descriptor, add
> column famlies from the old HRegionInfo and then write it out again
> (you already have the path).  Ten lines of code?
> St.Ack
>
> On Sat, Feb 26, 2011 at 9:31 AM, Jack Levin <ma...@gmail.com> wrote:
> > Hello - I am trying to rename some of my tables, what I see that after
> using
> > rename shell tool, meta gets new name, and describe 'table' reports new
> name
> > in schema, but .regioninfo<
> http://img699.imageshack.us:50075/browseDirectory.jsp?dir=%2Fhbase%2Ftesting_media_data%2Fff7a545a6e9943aef11e5ac5a10d92f7%2F.regioninfo&namenodeInfoPort=50070
> >
> > containts
> > old name, this is problematic, as we try to copy tables to other clusters
> > and they show up with old names in
> > .regioninfo<
> http://img699.imageshack.us:50075/browseDirectory.jsp?dir=%2Fhbase%2Ftesting_media_data%2Fff7a545a6e9943aef11e5ac5a10d92f7%2F.regioninfo&namenodeInfoPort=50070
> >
> > and
> > on the 'list', but in /hbase/<new_name>, you can see how this leads to be
> an
> > issue....   Any ideas how to resolve it?  Do I have a broken
> > rename_table.rb?
> >
> > -Jack
> >
>

Re: .regioninfo has old name after rename_table ran

Posted by Stack <st...@duboce.net>.
rename_table.rb never rewrote .regioninfo.  It should.  Shouldn't be
hard to amend.  See add_table.rb for how to read the .regioninfo.
You'd read in the .regioninfo to create a HRegionInfo, you'd use this
as a source from which to read old table's config (column families,
etc), make a new HRegionInfo with the new table's descriptor, add
column famlies from the old HRegionInfo and then write it out again
(you already have the path).  Ten lines of code?
St.Ack

On Sat, Feb 26, 2011 at 9:31 AM, Jack Levin <ma...@gmail.com> wrote:
> Hello - I am trying to rename some of my tables, what I see that after using
> rename shell tool, meta gets new name, and describe 'table' reports new name
> in schema, but .regioninfo<http://img699.imageshack.us:50075/browseDirectory.jsp?dir=%2Fhbase%2Ftesting_media_data%2Fff7a545a6e9943aef11e5ac5a10d92f7%2F.regioninfo&namenodeInfoPort=50070>
> containts
> old name, this is problematic, as we try to copy tables to other clusters
> and they show up with old names in
> .regioninfo<http://img699.imageshack.us:50075/browseDirectory.jsp?dir=%2Fhbase%2Ftesting_media_data%2Fff7a545a6e9943aef11e5ac5a10d92f7%2F.regioninfo&namenodeInfoPort=50070>
> and
> on the 'list', but in /hbase/<new_name>, you can see how this leads to be an
> issue....   Any ideas how to resolve it?  Do I have a broken
> rename_table.rb?
>
> -Jack
>