public RegionGroupStatus getRegionGroupStatus(TConsensusGroupId consensusGroupId) {
    return Optional.ofNullable(regionGroupCacheMap.get(consensusGroupId))
        .map(x -> x.getCurrentStatistics().getRegionGroupStatus())
        .orElse(RegionGroupStatus.Disabled);
  }
Safely get RegionGroupStatus.

@param consensusGroupId Specified RegionGroupId
@return Corresponding RegionGroupStatus if cache exists, Disabled otherwise
iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/manager/load/cache/LoadCache.java