hbase-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "nkeywal (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HBASE-7390) Add extra test cases for assignement on the region server
Date Wed, 19 Dec 2012 17:33:13 GMT

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

nkeywal commented on HBASE-7390:
--------------------------------

This code there is very very smart: if there is a open in progress, it changes the internal
state to close, then raises an exception through the call to checkIfRegionInTransition. As
we changed the state, we will have, if we were currently opening, a message saying that we
were trying to close a region already closing.

As well, it really means the other stuff going on is supposed to catch the state change?

{code}
  public CloseRegionResponse closeRegion(final RpcController controller,
      final CloseRegionRequest request) throws ServiceException {
//..
      Boolean openAction = regionsInTransitionInRS.get(encodedName);
      if (openAction != null) {
        if (openAction.booleanValue()) {
          regionsInTransitionInRS.replace(encodedName, openAction, Boolean.FALSE);
        }
        checkIfRegionInTransition(encodedName, CLOSE);
      }
           
      requestCount.increment();
      LOG.info("Received close region: " + region.getRegionNameAsString() +
        ". Version of ZK closing node:" + versionOfClosingNode +
        ". Destination server:" + sn);
      HRegionInfo regionInfo = region.getRegionInfo();
      checkIfRegionInTransition(encodedName, CLOSE);
      boolean closed = closeRegion(
        regionInfo, false, zk, versionOfClosingNode, sn);
      CloseRegionResponse.Builder builder =
        CloseRegionResponse.newBuilder().setClosed(closed);
      return builder.build();
    } catch (IOException ie) {
      throw new ServiceException(ie);
    }
  }
{code}
                
> Add extra test cases for assignement on the region server
> ---------------------------------------------------------
>
>                 Key: HBASE-7390
>                 URL: https://issues.apache.org/jira/browse/HBASE-7390
>             Project: HBase
>          Issue Type: Bug
>          Components: Region Assignment, regionserver
>    Affects Versions: 0.96.0
>            Reporter: nkeywal
>            Priority: Minor
>         Attachments: 7390.v1.patch, assignment_zk_states.jpg
>
>
> We don't have a lot of tests on the region server itself.
> Here are some.
> Some of them are failing, feedback welcome.
> See as well the attached state diagram for the ZK nodes on assignment.

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