Examples of addReplicaMap()


Examples of org.apache.helix.controller.stages.ResourceAssignment.addReplicaMap()

      List<String> preferenceList =
          ConstraintBasedAssignment.getPreferenceList(cache, partition, idealState, stateModelDef);
      Map<String, String> bestStateForPartition =
          ConstraintBasedAssignment.computeAutoBestStateForPartition(cache, stateModelDef,
              preferenceList, currentStateMap, disabledInstancesForPartition);
      partitionMapping.addReplicaMap(partition, bestStateForPartition);
    }
    return partitionMapping;
  }

  /**
 
View Full Code Here

Examples of org.apache.helix.controller.stages.ResourceAssignment.addReplicaMap()

      Map<String, String> idealStateMap =
          idealState.getInstanceStateMap(partition.getPartitionName());
      Map<String, String> bestStateForPartition =
          computeCustomizedBestStateForPartition(cache, stateModelDef, idealStateMap,
              currentStateMap, disabledInstancesForPartition);
      partitionMapping.addReplicaMap(partition, bestStateForPartition);
    }
    return partitionMapping;
  }

  /**
 
View Full Code Here

Examples of org.apache.helix.controller.stages.ResourceAssignment.addReplicaMap()

      List<String> preferenceList =
          ConstraintBasedAssignment.getPreferenceList(cache, partition, idealState, stateModelDef);
      Map<String, String> bestStateForPartition =
          ConstraintBasedAssignment.computeAutoBestStateForPartition(cache, stateModelDef,
              preferenceList, currentStateMap, disabledInstancesForPartition);
      partitionMapping.addReplicaMap(partition, bestStateForPartition);
    }
    return partitionMapping;
  }
}
View Full Code Here

Examples of org.apache.helix.controller.stages.ResourceAssignment.addReplicaMap()

      List<String> preferenceList =
          ConstraintBasedAssignment.getPreferenceList(cache, partition, idealState, stateModelDef);
      Map<String, String> bestStateForPartition =
          ConstraintBasedAssignment.computeAutoBestStateForPartition(cache, stateModelDef,
              preferenceList, currentStateMap, disabledInstancesForPartition);
      partitionMapping.addReplicaMap(partition, bestStateForPartition);
    }
    return partitionMapping;
  }
}
View Full Code Here

Examples of org.apache.helix.model.ResourceAssignment.addReplicaMap()

        Map<ParticipantId, State> replicaMap =
            ConstraintBasedAssignment.computeCustomizedBestStateForPartition(cluster
                .getLiveParticipantMap().keySet(), stateModelDef, newIdealState
                .getParticipantStateMap(partitionId), currentState.getCurrentStateMap(resourceId,
                partitionId), disabledParticipants, idealState.isEnabled());
        assignment.addReplicaMap(partitionId, replicaMap);
      }
    } else {
      // other modes use auto assignment
      Map<State, String> upperBounds =
          ConstraintBasedAssignment
View Full Code Here

Examples of org.apache.helix.model.ResourceAssignment.addReplicaMap()

        Map<ParticipantId, State> replicaMap =
            ConstraintBasedAssignment.computeAutoBestStateForPartition(upperBounds, cluster
                .getLiveParticipantMap().keySet(), stateModelDef, newIdealState
                .getPreferenceList(partitionId), currentState.getCurrentStateMap(resourceId,
                partitionId), disabledParticipants, idealState.isEnabled());
        assignment.addReplicaMap(partitionId, replicaMap);
      }
    }
    return assignment;
  }
}
View Full Code Here

Examples of org.apache.helix.model.ResourceAssignment.addReplicaMap()

      Map<ParticipantId, State> bestStateForPartition =
          ConstraintBasedAssignment.computeCustomizedBestStateForPartition(cluster
              .getLiveParticipantMap().keySet(), stateModelDef, idealState
              .getParticipantStateMap(partition), currentStateMap, disabledInstancesForPartition,
              isEnabled);
      partitionMapping.addReplicaMap(partition, bestStateForPartition);
    }
    return partitionMapping;
  }
}
View Full Code Here

Examples of org.apache.helix.model.ResourceAssignment.addReplicaMap()

      Map<ParticipantId, State> bestStateForPartition =
          ConstraintBasedAssignment.computeAutoBestStateForPartition(upperBounds,
              liveParticipants.keySet(), stateModelDef, preferenceList,
              currentState.getCurrentStateMap(idealState.getResourceId(), partition),
              disabledParticipantsForPartition, isEnabled);
      partitionMapping.addReplicaMap(partition, bestStateForPartition);
    }
    return partitionMapping;
  }

  private Map<PartitionId, Map<ParticipantId, State>> currentMapping(IdealState idealState,
View Full Code Here

Examples of org.apache.helix.model.ResourceAssignment.addReplicaMap()

      Map<ParticipantId, State> bestStateForPartition =
          ConstraintBasedAssignment.computeAutoBestStateForPartition(upperBounds, cluster
              .getLiveParticipantMap().keySet(), stateModelDef, preferenceList, currentStateMap,
              disabledInstancesForPartition, isEnabled);
      partitionMapping.addReplicaMap(partition, bestStateForPartition);
    }
    return partitionMapping;
  }

}
View Full Code Here

Examples of org.apache.helix.model.ResourceAssignment.addReplicaMap()

      for (PartitionId partitionId : idealState.getPartitionIdSet()) {
        int nodeIndex = i % liveParticipants.size();
        Map<ParticipantId, State> replicaMap = new HashMap<ParticipantId, State>();
        replicaMap.put(liveParticipants.get(nodeIndex), stateModelDef.getTypedStatesPriorityList()
            .get(0));
        resourceMapping.addReplicaMap(partitionId, replicaMap);
        i++;
      }
      testRebalancerInvoked = true;

      // set some basic context
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.