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-6317) Master clean start up and Partially enabled tables make region assignment inconsistent.
Date Thu, 12 Jul 2012 07:06:34 GMT

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

rajeshbabu commented on HBASE-6317:

 +  public List<HRegionInfo> getEnablingTableRegions(String tableName) {
This is needed bacause we need to get enabling table regions in EnableTableHandler which is
org.apache.hadoop.hbase.master.handler package.
+  public boolean addPlanIfNotPresent(HRegionInfo hri, RegionPlan plan) {
bq.What does this protect against? Concurrent assignment by another thread?
bq.Can we not ask if regionInTransition rather than add this new method?
In master restart case this region may not be in RIT.
+    } catch (InterruptedException e) {
+      LOG.error("Error trying to enable the table " + this.tableNameStr, e);
Not Sure how to handle this.  Just used the way how KeeperException and IOException where
handled.  It is an issue here.  But if throw out the exception EventHandler will eat it. 
So better we can abort master i think?
bq.A comment would be good here I'd say (especially if I have it wrong).
Comment added.
+    List<HRegionInfo> hris = this.enablingTables.get(regionInfo.getTableNameAsString());
+    if(hris != null && !hris.isEmpty()){
+      hris.remove(regionInfo);
+    }
We are removing just before taking action based on the znode state on master restart.  As
we only populated all the regions for this table, it is ok to remove it because processRIT
will take appropriate action. and RIT also will not be available here as mentioned for the
other comment.
This is for 0.94.  We have a patch for trunk but testcase is not added for that.  If not would
have moved this to RB? May be by today we can move it to RB.

> Master clean start up and Partially enabled tables make region assignment inconsistent.
> ---------------------------------------------------------------------------------------
>                 Key: HBASE-6317
>                 URL: https://issues.apache.org/jira/browse/HBASE-6317
>             Project: HBase
>          Issue Type: Bug
>            Reporter: ramkrishna.s.vasudevan
>            Assignee: rajeshbabu
>             Fix For: 0.92.2, 0.96.0, 0.94.1
>         Attachments: HBASE-6317_94.patch, HBASE-6317_94_3.patch
> If we have a  table in partially enabled state (ENABLING) then on HMaster restart we
treat it as a clean cluster start up and do a bulk assign.  Currently in 0.94 bulk assign
will not handle ALREADY_OPENED scenarios and it leads to region assignment problems.  Analysing
more on this we found that we have better way to handle these scenarios.
> {code}
> if (false == checkIfRegionBelongsToDisabled(regionInfo)
>             && false == checkIfRegionsBelongsToEnabling(regionInfo)) {
>           synchronized (this.regions) {
>             regions.put(regionInfo, regionLocation);
>             addToServers(regionLocation, regionInfo);
>           }
> {code}
> We dont add to regions map so that enable table handler can handle it.  But as nothing
is added to regions map we think it as a clean cluster start up.
> Will come up with a patch tomorrow.

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira


View raw message