public static PartitionState convertReplicaSealStatusToPartitionState(ReplicaSealStatus replicaSealStatus) {
    PartitionState partitionState = null;
    switch (replicaSealStatus) {
      case SEALED:
        partitionState = PartitionState.READ_ONLY;
        break;
      case PARTIALLY_SEALED:
        partitionState = PartitionState.PARTIAL_READ_WRITE;
        break;
      case NOT_SEALED:
        partitionState = PartitionState.READ_WRITE;
        break;
    }
    return partitionState;
  }
Returns the replica's {@link PartitionState} based on the specified {@link ReplicaSealStatus}.
@param replicaSealStatus {@link ReplicaSealStatus} of the replica.
@return PartitionState object.
ambry-clustermap/src/main/java/com/github/ambry/clustermap/ClusterMapUtils.java