hbase-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "stack (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HBASE-6881) All regionservers are marked offline even there is still one up
Date Wed, 26 Sep 2012 22:19:08 GMT

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

stack commented on HBASE-6881:
------------------------------

This patch seems to be undoing hbase-6438?  Its ok to remove this bit added by hbase-6438?

{code}
-      if (!regionAlreadyInTransitionException ) {
-        String msg = "Unexpected state : " + state + " .. Cannot transit it to OFFLINE.";
-        this.server.abort(msg, new IllegalStateException(msg));
-        return -1;
-      } else {
-        LOG.debug("Unexpected state : " + state
-            + " but retrying to assign because RegionAlreadyInTransitionException.");
-      }
{code}

I suppose you are tightening up our state handling but the above seemed like a legit exception
over in hbase-6438?


Why change the final on the param?

{code}
-  private void assign(final HRegionInfo region, final RegionState state,
+  private void assign(final HRegionInfo region, RegionState state,
{code}

You update state inside the method? You have to?  Can you make a local variable instead and
leave the passed param final? Might make it easier to read?

Here, what does the comment mean?

{code}
+          // The new plan could be the same as the existing plan.
+          newPlan = getRegionPlan(state, true);
{code}

We could get same plan again?  Is that ok?  It could be going back to the same server again
since we don't pass the old destination server from previous plan?  Is that OK?


                
> All regionservers are marked offline even there is still one up
> ---------------------------------------------------------------
>
>                 Key: HBASE-6881
>                 URL: https://issues.apache.org/jira/browse/HBASE-6881
>             Project: HBase
>          Issue Type: Bug
>            Reporter: Jimmy Xiang
>            Assignee: Jimmy Xiang
>         Attachments: trunk-6881.patch
>
>
> {noformat}
> +        RegionPlan newPlan = plan;
> +        if (!regionAlreadyInTransitionException) {
> +          // Force a new plan and reassign. Will return null if no servers.
> +          newPlan = getRegionPlan(state, plan.getDestination(), true);
> +        }
> +        if (newPlan == null) {
>            this.timeoutMonitor.setAllRegionServersOffline(true);
>            LOG.warn("Unable to find a viable location to assign region " +
>              state.getRegion().getRegionNameAsString());
> {noformat}
> Here, when newPlan is null, plan.getDestination() could be up actually.

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