public static RegionGroupStatus parse(String status) {
    for (RegionGroupStatus regionGroupStatus : RegionGroupStatus.values()) {
      if (regionGroupStatus.status.equals(status)) {
        return regionGroupStatus;
      }
    }
    throw new RuntimeException(String.format("RegionGroupStatus %s doesn't exist.", status));
  }
In scenarios other than the two mentioned above.
iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/manager/partition/RegionGroupStatus.java