Examples of anyLiveParticipant()


Examples of org.apache.helix.controller.rebalancer.context.FullAutoRebalancerContext.anyLiveParticipant()

    // Compute a preference list based on the current ideal state
    List<PartitionId> partitions = new ArrayList<PartitionId>(config.getPartitionSet());
    Map<ParticipantId, Participant> liveParticipants = cluster.getLiveParticipantMap();
    Map<ParticipantId, Participant> allParticipants = cluster.getParticipantMap();
    int replicas = -1;
    if (config.anyLiveParticipant()) {
      replicas = liveParticipants.size();
    } else {
      replicas = config.getReplicaCount();
    }
View Full Code Here

Examples of org.apache.helix.controller.rebalancer.context.PartitionedRebalancerContext.anyLiveParticipant()

    if (partitionedContext != null) {
      IdealState idealState = new IdealState(partitionedContext.getResourceId());
      idealState.setRebalanceMode(partitionedContext.getRebalanceMode());
      idealState.setRebalancerRef(partitionedContext.getRebalancerRef());
      String replicas = null;
      if (partitionedContext.anyLiveParticipant()) {
        replicas = StateModelToken.ANY_LIVEINSTANCE.toString();
      } else {
        replicas = Integer.toString(partitionedContext.getReplicaCount());
      }
      idealState.setReplicas(replicas);
View Full Code Here

Examples of org.apache.helix.controller.rebalancer.context.PartitionedRebalancerContext.anyLiveParticipant()

      } else if (partitionedContext.getRebalanceMode() == RebalanceMode.CUSTOMIZED) {
        CustomRebalancerContext customContext =
            resource.getRebalancerConfig().getRebalancerContext(CustomRebalancerContext.class);
        sb.append(", preferenceMap: " + customContext.getPreferenceMap(partitionId));
      }
      if (partitionedContext.anyLiveParticipant()) {
        sb.append(", anyLiveParticipant: " + partitionedContext.anyLiveParticipant());
      } else {
        sb.append(", replicaCount: " + partitionedContext.getReplicaCount());
      }
    }
View Full Code Here

Examples of org.apache.helix.controller.rebalancer.context.PartitionedRebalancerContext.anyLiveParticipant()

        CustomRebalancerContext customContext =
            resource.getRebalancerConfig().getRebalancerContext(CustomRebalancerContext.class);
        sb.append(", preferenceMap: " + customContext.getPreferenceMap(partitionId));
      }
      if (partitionedContext.anyLiveParticipant()) {
        sb.append(", anyLiveParticipant: " + partitionedContext.anyLiveParticipant());
      } else {
        sb.append(", replicaCount: " + partitionedContext.getReplicaCount());
      }
    }
View Full Code Here

Examples of org.apache.helix.controller.rebalancer.context.ReplicatedRebalancerContext.anyLiveParticipant()

        max = cluster.getLiveParticipantMap().size();
      } else if ("R".equals(numInstancesPerState)) {
        // idealState is null when resource has been dropped,
        // R can't be evaluated and ignore state constraints
        if (context != null) {
          if (context.anyLiveParticipant()) {
            max = cluster.getLiveParticipantMap().size();
          } else {
            max = context.getReplicaCount();
          }
        }
View Full Code Here

Examples of org.apache.helix.controller.rebalancer.context.SemiAutoRebalancerContext.anyLiveParticipant()

        resource.getRebalancerConfig().getRebalancerContext(SemiAutoRebalancerContext.class);
    if (context == null) {
      LOG.info("Only SEMI_AUTO mode supported for resource expansion");
      return;
    }
    if (context.anyLiveParticipant()) {
      LOG.info("Resource uses ANY_LIVE_PARTICIPANT, skipping default assignment");
      return;
    }
    if (context.getPreferenceLists().size() == 0) {
      LOG.info("No preference lists have been set yet, skipping default assignment");
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.