public RegionInfoListResp getRegionInfoList(final GetRegionInfoListPlan req) {
    try {
      // Get static result
      final RegionInfoListResp regionInfoListResp =
          (RegionInfoListResp) getConsensusManager().read(req);
      // Get cached result
      final Map<TConsensusGroupId, Integer> allLeadership = getLoadManager().getRegionLeaderMap();
      regionInfoListResp
          .getRegionInfoList()
          .forEach(
              regionInfo -> {
                regionInfo.setStatus(
                    getLoadManager()
                        .getRegionStatus(
                            regionInfo.getConsensusGroupId(), regionInfo.getDataNodeId())
                        .getStatus());

                final String regionType =
                    regionInfo.getDataNodeId()
                            == allLeadership.getOrDefault(regionInfo.getConsensusGroupId(), -1)
                        ? RegionRoleType.Leader.toString()
                        : RegionRoleType.Follower.toString();
                regionInfo.setRoleType(regionType);

                long regionSize =
                    getLoadManager()
                        .getLoadCache()
                        .getRegionSizeMap()
                        .getOrDefault(regionInfo.getDataNodeId(), Collections.emptyMap())
                        .getOrDefault(regionInfo.getConsensusGroupId().getId(), -1L);
                regionInfo.setTsFileSize(regionSize);
              });

      return regionInfoListResp;

    } catch (final ConsensusException e) {
      LOGGER.warn(CONSENSUS_READ_ERROR, e);
      final TSStatus res = new TSStatus(TSStatusCode.EXECUTE_STATEMENT_ERROR.getStatusCode());
      res.setMessage(e.getMessage());
      final RegionInfoListResp resp = new RegionInfoListResp();
      resp.setStatus(res);
      return resp;
    }
  }
Get TSeriesPartitionSlot.

@param deviceID IDeviceID
@return SeriesPartitionSlot
iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/manager/partition/PartitionManager.java