Package org.apache.helix.controller.strategy.AutoRebalanceStrategy

Examples of org.apache.helix.controller.strategy.AutoRebalanceStrategy.ReplicaPlacementScheme


      LOG.info("stateCountMap: " + stateCountMap);
      LOG.info("liveNodes: " + liveNodes);
      LOG.info("allNodes: " + allNodes);
      LOG.info("maxPartition: " + maxPartition);
    }
    ReplicaPlacementScheme placementScheme = new DefaultPlacementScheme();
    placementScheme.init(_manager);
    _algorithm =
        new AutoRebalanceStrategy(resourceName, partitions, stateCountMap, maxPartition,
            placementScheme);
    ZNRecord newMapping =
        _algorithm.computePartitionAssignment(liveNodes, currentMapping, allNodes);
View Full Code Here


      LOG.info("stateCountMap: " + stateCountMap);
      LOG.info("liveNodes: " + liveNodes);
      LOG.info("allNodes: " + allNodes);
      LOG.info("maxPartition: " + maxPartition);
    }
    ReplicaPlacementScheme placementScheme = new DefaultPlacementScheme();
    placementScheme.init(_manager);
    _algorithm =
        new AutoRebalanceStrategy(resourceName, partitions, stateCountMap, maxPartition,
            placementScheme);
    ZNRecord newMapping =
        _algorithm.computePartitionAssignment(liveNodes, currentMapping, allNodes);
View Full Code Here

      LOG.debug("stateCountMap: " + stateCountMap);
      LOG.debug("liveNodes: " + liveParticipantList);
      LOG.debug("allNodes: " + allParticipantList);
      LOG.debug("maxPartition: " + maxPartition);
    }
    ReplicaPlacementScheme placementScheme = new DefaultPlacementScheme();
    _algorithm =
        new AutoRebalanceStrategy(idealState.getResourceId(), partitions, stateCountMap,
            maxPartition, placementScheme);
    ZNRecord newMapping =
        _algorithm.typedComputePartitionAssignment(liveParticipantList, currentMapping,
View Full Code Here

    final int REPLICA_COUNT = 2;
    final ParticipantId[] NODES = {
        ParticipantId.from("n0"), ParticipantId.from("n1"), ParticipantId.from("n2")
    };

    ReplicaPlacementScheme scheme = new AutoRebalanceStrategy.DefaultPlacementScheme();
    // initial state, one node, no mapping
    List<ParticipantId> allNodes = Lists.newArrayList(NODES[0]);
    List<ParticipantId> liveNodes = Lists.newArrayList(NODES[0]);
    Map<PartitionId, Map<ParticipantId, State>> currentMapping = Maps.newHashMap();
    for (PartitionId partition : PARTITIONS) {
View Full Code Here

      LOG.info("stateCountMap: " + stateCountMap);
      LOG.info("liveNodes: " + liveParticipantList);
      LOG.info("allNodes: " + allParticipantList);
      LOG.info("maxPartition: " + maxPartition);
    }
    ReplicaPlacementScheme placementScheme = new DefaultPlacementScheme();
    _algorithm =
        new AutoRebalanceStrategy(config.getResourceId(), partitions, stateCountMap, maxPartition,
            placementScheme);
    ZNRecord newMapping =
        _algorithm.typedComputePartitionAssignment(liveParticipantList, currentMapping,
View Full Code Here

    // determine the preference
    LinkedHashMap<State, Integer> stateCounts =
        ConstraintBasedAssignment.stateCount(upperBounds, stateModelDef, participantSet.size(),
            getReplicaCount());
    ReplicaPlacementScheme placementScheme = new DefaultPlacementScheme();
    List<ParticipantId> participantList = new ArrayList<ParticipantId>(participantSet);
    List<PartitionId> partitionList = new ArrayList<PartitionId>(getPartitionSet());
    AutoRebalanceStrategy strategy =
        new AutoRebalanceStrategy(ResourceId.from(""), partitionList, stateCounts,
            getMaxPartitionsPerParticipant(), placementScheme);
View Full Code Here

    // determine the preference maps
    LinkedHashMap<State, Integer> stateCounts =
        ConstraintBasedAssignment.stateCount(upperBounds, stateModelDef, participantSet.size(),
            getReplicaCount());
    ReplicaPlacementScheme placementScheme = new DefaultPlacementScheme();
    List<ParticipantId> participantList = new ArrayList<ParticipantId>(participantSet);
    List<PartitionId> partitionList = new ArrayList<PartitionId>(getPartitionSet());
    AutoRebalanceStrategy strategy =
        new AutoRebalanceStrategy(ResourceId.from(""), partitionList, stateCounts,
            getMaxPartitionsPerParticipant(), placementScheme);
View Full Code Here

    final int REPLICA_COUNT = 2;
    final ParticipantId[] NODES = {
        ParticipantId.from("n0"), ParticipantId.from("n1"), ParticipantId.from("n2")
    };

    ReplicaPlacementScheme scheme = new AutoRebalanceStrategy.DefaultPlacementScheme();
    // initial state, one node, no mapping
    List<ParticipantId> allNodes = Lists.newArrayList(NODES[0]);
    List<ParticipantId> liveNodes = Lists.newArrayList(NODES[0]);
    Map<PartitionId, Map<ParticipantId, State>> currentMapping = Maps.newHashMap();
    for (PartitionId partition : PARTITIONS) {
View Full Code Here

      LOG.info("stateCountMap: " + stateCountMap);
      LOG.info("liveNodes: " + liveNodes);
      LOG.info("allNodes: " + allNodes);
      LOG.info("maxPartition: " + maxPartition);
    }
    ReplicaPlacementScheme placementScheme = new DefaultPlacementScheme();
    placementScheme.init(_manager);
    _algorithm =
        new AutoRebalanceStrategy(resourceName, partitions, stateCountMap, maxPartition,
            placementScheme);
    ZNRecord newMapping =
        _algorithm.computePartitionAssignment(liveNodes, currentMapping, allNodes);
View Full Code Here

TOP

Related Classes of org.apache.helix.controller.strategy.AutoRebalanceStrategy.ReplicaPlacementScheme

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.