public static ClusterStatusProtos.RegionStatesCount
    toTableRegionStatesCount(RegionStatesCount regionStatesCount) {
    int openRegions = 0;
    int splitRegions = 0;
    int closedRegions = 0;
    int regionsInTransition = 0;
    int totalRegions = 0;
    if (regionStatesCount != null) {
      openRegions = regionStatesCount.getOpenRegions();
      splitRegions = regionStatesCount.getSplitRegions();
      closedRegions = regionStatesCount.getClosedRegions();
      regionsInTransition = regionStatesCount.getRegionsInTransition();
      totalRegions = regionStatesCount.getTotalRegions();
    }
    return ClusterStatusProtos.RegionStatesCount.newBuilder().setOpenRegions(openRegions)
      .setSplitRegions(splitRegions).setClosedRegions(closedRegions)
      .setRegionsInTransition(regionsInTransition).setTotalRegions(totalRegions).build();
  }
Convert HBaseProto.RegionInfo to a RegionInfo
@param proto the RegionInfo to convert
@return the converted RegionInfo
hbase-client/src/main/java/org/apache/hadoop/hbase/shaded/protobuf/ProtobufUtil.java