[ 
https://issues.apache.org/jira/browse/HBASE-9497?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13763680#comment-13763680
 ] 

Himanshu Vashishtha commented on HBASE-9497:
--------------------------------------------

Steps to test this:

h5. Pre 94 cluster file layout:
{code}
/.META.
/.META./1028785192
/.META./1028785192/.oldlogs
/.META./1028785192/.oldlogs/hlog.1378851818951
/.META./1028785192/.oldlogs/.hlog.1378851818951.crc
/.META./1028785192/.tmp
/.META./1028785192/..regioninfo.crc
/.META./1028785192/info
/.META./1028785192/info/5309944028345330435
/.META./1028785192/info/.5309944028345330435.crc
/.META./1028785192/.regioninfo

{code}

h5. Migrate to 0.94:
{code}

/.META.
/.META./.tableinfo.0000000001
/.META./..tableinfo.0000000001.crc
/.META./1028785192
/.META./1028785192/.oldlogs
/.META./1028785192/.oldlogs/hlog.1378851818951
/.META./1028785192/.oldlogs/.hlog.1378851818951.crc
/.META./1028785192/..regioninfo.crc
/.META./1028785192/info
/.META./1028785192/info/5309944028345330435
/.META./1028785192/info/.5309944028345330435.crc
/.META./1028785192/.regioninfo
/.META./.tmp
{code}

Without patch, the existing .tableinfo file was killing HMaster when it tries 
to read it. Once we clear the tableinfo file, it starts good. And, the 
.tableinfo files are created in the new location (.tabledesc directory) by 
master on startup.

h5. Post migration and restarting the cluster:
{code}

/data/hbase/meta
/data/hbase/meta/.tabledesc
/data/hbase/meta/.tabledesc/.tableinfo.0000000001
/data/hbase/meta/.tabledesc/..tableinfo.0000000001.crc
/data/hbase/meta/.tmp
/data/hbase/meta/1588230740
/data/hbase/meta/1588230740/.oldlogs
/data/hbase/meta/1588230740/.oldlogs/.hlog.1378852530850.crc
/data/hbase/meta/1588230740/.oldlogs/hlog.1378852530850
/data/hbase/meta/1588230740/..regioninfo.crc
/data/hbase/meta/1588230740/info
/data/hbase/meta/1588230740/info/.2421b894f7ac490a834bd6673854675c.crc
/data/hbase/meta/1588230740/info/bf85328d56cd40b3bd671a6a54a5ba75
/data/hbase/meta/1588230740/info/.bf85328d56cd40b3bd671a6a54a5ba75.crc
/data/hbase/meta/1588230740/info/2421b894f7ac490a834bd6673854675c
/data/hbase/meta/1588230740/.regioninfo
{code}
                
> Old .META. .tableinfo file kills HMaster
> ----------------------------------------
>
>                 Key: HBASE-9497
>                 URL: https://issues.apache.org/jira/browse/HBASE-9497
>             Project: HBase
>          Issue Type: Bug
>          Components: master, migration
>    Affects Versions: 0.95.2
>            Reporter: Himanshu Vashishtha
>             Fix For: 0.98.0, 0.96.0
>
>         Attachments: HBase-9497.patch
>
>
> In pre-0.96, .META. has .tableinfo files which refer to .META. On startup, 
> master tries to read it and aborts since the table name has changed. The 
> .META. .tableinfo files are not being created in 0.94.x (fixed for 96 in 
> HBASE-6971; but this can be reproduced when migrating from 0.92 -> 0.94 -> 
> 0.96. Our old users would be affected by this.
> {code}
> java.lang.IllegalArgumentException: .META. no longer exists. The table has 
> been renamed to hbase:meta
>       at org.apache.hadoop.hbase.TableName.valueOf(TableName.java:291)
>       at org.apache.hadoop.hbase.TableName.valueOf(TableName.java:283)
>       at 
> org.apache.hadoop.hbase.HTableDescriptor.readFields(HTableDescriptor.java:960)
>       at 
> org.apache.hadoop.hbase.util.Writables.getWritable(Writables.java:131)
>       at 
> org.apache.hadoop.hbase.util.Writables.getWritable(Writables.java:101)
>       at 
> org.apache.hadoop.hbase.HTableDescriptor.parseFrom(HTableDescriptor.java:1407)
>       at 
> org.apache.hadoop.hbase.util.FSTableDescriptors.readTableDescriptor(FSTableDescriptors.java:521)
>       at 
> org.apache.hadoop.hbase.util.FSTableDescriptors.createTableDescriptorForTableDirectory(FSTableDescriptors.java:707)
>       at 
> org.apache.hadoop.hbase.util.FSTableDescriptors.createTableDescriptor(FSTableDescriptors.java:683)
>       at 
> org.apache.hadoop.hbase.util.FSTableDescriptors.createTableDescriptor(FSTableDescriptors.java:670)
>       at 
> org.apache.hadoop.hbase.master.MasterFileSystem.checkRootDir(MasterFileSystem.java:485)
>       at 
> org.apache.hadoop.hbase.master.MasterFileSystem.createInitialFileSystemLayout(MasterFileSystem.java:145)
>       at 
> org.apache.hadoop.hbase.master.MasterFileSystem.<init>(MasterFileSystem.java:129)
>       at 
> org.apache.hadoop.hbase.master.HMaster.finishInitialization(HMaster.java:761)
> {code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to