public static long getTotalInputNumFiles (ContentSummary inputSummary, MapWork work,
      double highestSamplePercentage) {
    long totalInputNumFiles = inputSummary.getFileCount();
    if (MapUtils.isEmpty(work.getNameToSplitSample())) {
      // If percentage block sampling wasn't used, we don't need to do any estimation
      return totalInputNumFiles;
    }

    if (highestSamplePercentage >= 0) {
      totalInputNumFiles = Math.min((long) (totalInputNumFiles * (highestSamplePercentage / 100D))
          , totalInputNumFiles);
    }
    return totalInputNumFiles;
  }
Computes the total number of input files. If block sampling was used it will scale this
value by the highest sample percentage (as an estimate for # input files).

@param inputSummary
@param work
@param highestSamplePercentage
@return
ql/src/java/org/apache/hadoop/hive/ql/exec/Utilities.java