default CompletableFuture<List<Pair<byte[], byte[]>>> getStartEndKeys() {
    return getAllRegionLocations().thenApply(
      locs -> locs.stream().filter(loc -> RegionReplicaUtil.isDefaultReplica(loc.getRegion()))
        .map(HRegionLocation::getRegion).map(r -> Pair.newPair(r.getStartKey(), r.getEndKey()))
        .collect(Collectors.toList()));
  }
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
hbase-client/src/main/java/org/apache/hadoop/hbase/client/AsyncTableRegionLocator.java