Package com.alibaba.wasp.master

Examples of com.alibaba.wasp.master.EntityGroupStates


          + " was carrying (skipping " + entityGroupsInTransition.size()
          + " entityGroup(s) that are already in transition)");

      // Iterate entityGroups that were on this server and assign them
      if (egis != null) {
        EntityGroupStates entityGroupStates = assignmentManager
            .getEntityGroupStates();
        List<EntityGroupInfo> toAssignEntityGroups = new ArrayList<EntityGroupInfo>();
        for (Map.Entry<EntityGroupInfo, Result> e : egis.entrySet()) {
          EntityGroupInfo egi = e.getKey();
          EntityGroupState egit = entityGroupStates
              .getEntityGroupTransitionState(egi);
          if (processDeadEntityGroup(egi, e.getValue(), assignmentManager,
              server)) {
            ServerName addressFromAM = entityGroupStates
                .getFServerOfEntityGroup(egi);
            if (addressFromAM != null && !addressFromAM.equals(this.serverName)) {
              // If this entityGroup is in transition on the dead server, it
              // must be
              // opening or pending_open, which is covered by
View Full Code Here


  private List<EntityGroupInfo> entityGroupsToAssignWithServerName(
      final List<Pair<EntityGroupInfo, ServerName>> entityGroupsInMeta)
      throws IOException {
    FServerManager serverManager = ((FMaster) this.server).getFServerManager();
    List<EntityGroupInfo> entityGroups = new ArrayList<EntityGroupInfo>();
    EntityGroupStates entityGroupStates = this.assignmentManager
        .getEntityGroupStates();
    for (Pair<EntityGroupInfo, ServerName> entityGroupLocation : entityGroupsInMeta) {
      EntityGroupInfo egi = entityGroupLocation.getFirst();
      ServerName sn = entityGroupLocation.getSecond();
      if (!entityGroupStates.isEntityGroupInTransition(egi)
          && !entityGroupStates.isEntityGroupAssigned(egi)) {
        if (this.retainAssignment && sn != null
            && serverManager.isServerOnline(sn)) {
          this.assignmentManager.addPlan(egi.getEncodedName(),
              new EntityGroupPlan(egi, null, sn));
        }
View Full Code Here

      this.entityGroups = entityGroups;
    }

    @Override
    protected void populatePool(ExecutorService pool) {
      EntityGroupStates entityGroupStates = assignmentManager
          .getEntityGroupStates();
      for (EntityGroupInfo entityGroup : entityGroups) {
        if (entityGroupStates.isEntityGroupInTransition(entityGroup))
          continue;
        final EntityGroupInfo egi = entityGroup;
        pool.execute(Trace.wrap(new Runnable() {
          public void run() {
            assignmentManager.unassign(egi);
View Full Code Here

TOP

Related Classes of com.alibaba.wasp.master.EntityGroupStates

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.