public RegionStatus getRegionStatus(TConsensusGroupId consensusGroupId, int dataNodeId) {
    return Optional.ofNullable(regionGroupCacheMap.get(consensusGroupId))
        .map(x -> x.getCurrentStatistics().getRegionStatus(dataNodeId))
        .orElse(RegionStatus.Unknown);
  }
Safely get RegionStatus.

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