public static ReplicaSealStatus partitionStateStrToReplicaSealStatus(String partitionStateStr) {
    if (partitionStateStr.equals(READ_WRITE_STR)) {
      return ReplicaSealStatus.NOT_SEALED;
    } else if (partitionStateStr.equals(PARTIAL_READ_WRITE_STR)) {
      return ReplicaSealStatus.PARTIALLY_SEALED;
    } else if (partitionStateStr.equals(READ_ONLY_STR)) {
      return ReplicaSealStatus.SEALED;
    }
    throw new IllegalArgumentException(String.format("Invalid partition state str %s", partitionStateStr));
  }
Convert partition state string to {@link ReplicaSealStatus} object.
@param partitionStateStr the partition state string to convert.
@return ReplicaSealStatus object.
ambry-clustermap/src/main/java/com/github/ambry/clustermap/ClusterMapUtils.java