public static int getKParamForKllSketch(Configuration conf) {
    int k = HiveConf.getIntVar(conf, HiveConf.ConfVars.HIVE_STATS_KLL_K_PARAM);

    if (k < 8 || k > 65535) {
      throw new IllegalArgumentException(HiveConf.ConfVars.HIVE_STATS_KLL_K_PARAM.varname +
          " must be in the range [8, 65535], got " + k);
    }
    return k;
  }
Get all file status from a root path and recursively go deep into certain levels.

@param path
         the root path
@param level
         the depth of directory to explore
@param fs
         the file system
@return array of FileStatus
@throws IOException
common/src/java/org/apache/hadoop/hive/common/HiveStatsUtils.java