public Optional<TConsensusGroupType> getRegionType(int regionId) {
    return regionGroupMap.keySet().stream()
        .filter(tConsensusGroupId -> tConsensusGroupId.getId() == regionId)
        .map(TConsensusGroupId::getType)
        .findFirst();
  }
Check if the DatabasePartitionTable contains the specified Region.

@param regionId TConsensusGroupId
@return True if contains.
iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/persistence/partition/DatabasePartitionTable.java