private void updateReplicaStateAndOverrideIfNeeded(AmbryReplica replica, Collection<String> sealedReplicas,
        Collection<String> partiallySealedReplicas, Collection<String> stoppedReplicas) {
      String partitionName = replica.getPartitionId().toPathString();
      replica.setSealedStatus(resolveReplicaSealStatus(partitionName, sealedReplicas, partiallySealedReplicas));
      replica.setStoppedState(stoppedReplicas.contains(partitionName));
    }
If partition override is enabled, we override replica's {@link ReplicaSealStatus} based on partitionOverrideMap.
If disabled, update replica state according to the info from {@link DataNodeConfig}.
@param replica the {@link ReplicaId} whose states (seal,stop) should be updated.
@param sealedReplicas a collection of {@link ReplicaId}(s) that are in SEALED state.
@param partiallySealedReplicas a collection of {@link ReplicaId}(s) that are in PARTIALLY_SEALED state.
@param stoppedReplicas a collection of {@link ReplicaId}(s) that are in STOPPED state.
ambry-clustermap/src/main/java/com/github/ambry/clustermap/HelixClusterManager.java