default Pair<byte[][], byte[][]> getStartEndKeys() throws IOException {
    List<HRegionLocation> regions = getAllRegionLocations().stream()
      .filter(loc -> RegionReplicaUtil.isDefaultReplica(loc.getRegion()))
      .collect(Collectors.toList());
    byte[][] startKeys = new byte[regions.size()][];
    byte[][] endKeys = new byte[regions.size()][];
    for (int i = 0, n = regions.size(); i < n; i++) {
      RegionInfo region = regions.get(i).getRegion();
      startKeys[i] = region.getStartKey();
      endKeys[i] = region.getEndKey();
    }
    return Pair.newPair(startKeys, endKeys);
  }
Gets the starting and ending row keys for every region in the currently open table.
<p>
This is mainly useful for the MapReduce integration.
@return Pair of arrays of region starting and ending row keys
@throws IOException if a remote or network exception occurs
hbase-client/src/main/java/org/apache/hadoop/hbase/client/RegionLocator.java