public static List<String> getBestLocations(Configuration conf,
    HDFSBlocksDistribution blockDistribution) {
    // 3 nodes will contain highly local blocks. So default to 3.
    return getBestLocations(conf, blockDistribution, 3);
  }
This computes the locations to be passed from the InputSplit. MR/Yarn schedulers does not take
weights into account, thus will treat every location passed from the input split as equal. We
do not want to blindly pass all the locations, since we are creating one split per region, and
the region's blocks are all distributed throughout the cluster unless favorite node assignment
is used. On the expected stable case, only one location will contain most of the blocks as
local. On the other hand, in favored node assignment, 3 nodes will contain highly local blocks.
Here we are doing a simple heuristic, where we will pass all hosts which have at least 80%
(hbase.tablesnapshotinputformat.locality.cutoff.multiplier) as much block locality as the top
host with the best locality. Return at most numTopsAtMost locations if there are more than
that.
hbase-mapreduce/src/main/java/org/apache/hadoop/hbase/mapreduce/TableSnapshotInputFormatImpl.java