// get the error participants
Map<ParticipantId, State> currentStateMap =
currentStateOutput.getCurrentStateMap(resourceId, partitionId);
Set<ParticipantId> errorParticipants = Sets.newHashSet();
for (ParticipantId participantId : currentStateMap.keySet()) {
State state = currentStateMap.get(participantId);
if (state.equals(State.from(HelixDefinedState.ERROR))) {
errorParticipants.add(participantId);
}
}
// get the dropped and disabled map
State initialState = stateModelDef.getTypedInitialState();
Map<ParticipantId, State> participantStateMap = resourceAssignment.getReplicaMap(partitionId);
Set<ParticipantId> participants = participantStateMap.keySet();
Map<ParticipantId, State> droppedAndDisabledMap =
ConstraintBasedAssignment.dropAndDisablePartitions(currentStateMap, participants,
disabledParticipants, initialState);