hbase-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "rajeshbabu (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HBASE-8627) HBCK can not fix meta not assigned issue
Date Mon, 22 Jul 2013 09:18:49 GMT

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

rajeshbabu commented on HBASE-8627:
-----------------------------------

[~anoop.hbase]
If meta server znode is deleted(in metaSSH), then patch is not able to fix this issue.
{code}
  public void assignMeta() throws KeeperException {
    MetaRegionTracker.deleteMetaLocation(this.watcher);
    assign(HRegionInfo.FIRST_META_REGIONINFO, true);
  }
{code}

In recordMetaRegion we will read meta location from zk, in this case we will get false and
returing without fixing.
{code}
    // get regions according to what is online on each RegionServer
    loadDeployedRegions();
    // check whether .META. is deployed and online
    if (!recordMetaRegion()) {
      // Will remove later if we can fix it
      errors.reportError("Fatal error: unable to get .META. region location. Exiting...");
      return -2;
    }
{code}

I think in checkMetaRegion only we need to read from zk and deployed regions list. If it is
not present in any case we need to deploy it.

Here is the test to reproduce the scenario. FYI
{code}
  @Test
  public void testFixAssignmentsWhenMETAinTransition() throws Exception {
    MiniHBaseCluster cluster = TEST_UTIL.getHBaseCluster();
    HBaseAdmin admin = null;
    try {
      admin = new HBaseAdmin(TEST_UTIL.getConfiguration());
      admin.closeRegion(cluster.getServerHoldingMeta(),
          HRegionInfo.FIRST_META_REGIONINFO);
    } finally {
      if (admin != null) {
        admin.close();
      }
    }
    regionStates.regionOffline(HRegionInfo.FIRST_META_REGIONINFO);
    MetaRegionTracker.deleteMetaLocation(cluster.getMaster().getZooKeeper());
    assertFalse(regionStates
        .isRegionAssigned(HRegionInfo.FIRST_META_REGIONINFO));
    HBaseFsck hbck = doFsck(conf, true);
    assertErrors(hbck, new ERROR_CODE[] { ERROR_CODE.NULL_META_REGION,
        ERROR_CODE.UNKNOWN });
    assertNoErrors(doFsck(conf, false));
  }
{code}

                
> HBCK can not fix meta not assigned issue
> ----------------------------------------
>
>                 Key: HBASE-8627
>                 URL: https://issues.apache.org/jira/browse/HBASE-8627
>             Project: HBase
>          Issue Type: Bug
>          Components: hbck
>    Affects Versions: 0.95.0
>            Reporter: Anoop Sam John
>            Assignee: Anoop Sam John
>         Attachments: HBASE-8627_Trunk.patch, HBASE-8627_Trunk-V2.patch
>
>
> When meta table region is not assigned to any RS, HBCK run will get exception. I can
see code added in checkMetaRegion() to solve this issue but it wont work. It still refers
to ROOT region!

--
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

Mime
View raw message