public List<TRegionReplicaSet> getAllReplicaSets(int dataNodeId) {
    return regionGroupMap.values().stream()
        .filter(regionGroup -> regionGroup.belongsToDataNode(dataNodeId))
        .map(RegionGroup::getReplicaSet)
        .collect(Collectors.toList());
  }
Get all RegionGroups currently owned by the specified Database.

@param dataNodeId The specified dataNodeId
@return Deep copy of all RegionGroups' RegionReplicaSet with the specified dataNodeId
iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/persistence/partition/DatabasePartitionTable.java