Package com.alibaba.wasp.master.handler

Examples of com.alibaba.wasp.master.handler.OpenedEntityGroupHandler


        forceOffline(entityGroupInfo, egTransition);
      } else {
        // EntityGroup is opened, insert into EGIT and handle it
        entityGroupStates.updateEntityGroupState(egTransition,
            EntityGroupState.State.OPEN);
        new OpenedEntityGroupHandler(server, this, entityGroupInfo, sn,
            expectedVersion).process();
      }
      break;
    case FSERVER_ZK_ENTITYGROUP_SPLITTING:
      LOG.debug("Processed entityGroup in state : " + et);
View Full Code Here


        }
        // Handle OPENED by removing from transition and deleted zk node
        entityGroupState = entityGroupStates.updateEntityGroupState(
            egTransition, EntityGroupState.State.OPEN);
        if (entityGroupState != null) {
          this.executorService.submit(new OpenedEntityGroupHandler(server,
              this, entityGroupState.getEntityGroup(), sn, expectedVersion));
        }
        break;

      default:
View Full Code Here

      String nodeName = ZKAssign.getNodeName(zkw, entityGroup
          .getEntityGroupInfo().getEncodedName());
      ZKUtil.getDataAndWatch(zkw, nodeName, stat);

      // use the version for the OpenedEntityGroupHandler
      OpenedEntityGroupHandler handler = new OpenedEntityGroupHandler(server,
          am, entityGroup.getEntityGroupInfo(), server.getServerName(),
          stat.getVersion());
      // Once again overwrite the same znode so that the version changes.
      ZKAssign.transitionNode(zkw, entityGroup.getEntityGroupInfo(),
          server.getServerName(), EventType.FSERVER_ZK_ENTITYGROUP_OPENED,
          EventType.FSERVER_ZK_ENTITYGROUP_OPENED, stat.getVersion());

      // Should not invoke assignmentmanager.entityGroupOnline. If it is
      // invoked as per current mocking it will throw null pointer exception.
      boolean expectedException = false;
      try {
        handler.process();
      } catch (Exception e) {
        expectedException = true;
      }
      assertFalse("The process method should not throw any exception.",
          expectedException);
View Full Code Here

TOP

Related Classes of com.alibaba.wasp.master.handler.OpenedEntityGroupHandler

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.