private Set<RegionInfo> getRegionsFromIndex(int index, int[][] regionsPerIndex) {
    int[] regionIndices = regionsPerIndex[index];
    if (regionIndices == null) {
      return Collections.emptySet();
    }
    return Arrays.stream(regionIndices).mapToObj(idx -> cluster.regions[idx])
      .collect(Collectors.toSet());
  }
Check if the conditional is violated by the given region plan.
@param regionPlan the region plan to check
@return true if the conditional is violated
hbase-balancer/src/main/java/org/apache/hadoop/hbase/master/balancer/RegionPlanConditional.java