private ExecutorService buildBasicStatsExecutor() {
    //Get the file status up-front for all partitions. Beneficial in cases of blob storage systems
    int poolSize = conf.getInt(ConfVars.HIVE_MOVE_FILES_THREAD_COUNT.varname, 1);
    // In case thread count is set to 0, use single thread.
    poolSize = Math.max(poolSize, 1);
    final ExecutorService pool = Executors.newFixedThreadPool(poolSize, new ThreadFactoryBuilder().setDaemon(true).setNameFormat("stats-updater-thread-%d").build());
    LOG.debug("Getting file stats of all partitions. threadpool size:" + poolSize);
    return pool;
  }
StatsTask implementation. StatsTask mainly deals with "collectable" stats. These are
stats that require data scanning and are collected during query execution (unless the user
explicitly requests data scanning just for the purpose of stats computation using the "ANALYZE"
command. All other stats are computed directly by the MetaStore. The rationale being that the
MetaStore layer covers all Thrift calls and provides better guarantees about the accuracy of
those stats.
ql/src/java/org/apache/hadoop/hive/ql/stats/BasicStatsTask.java