public static List<String> getStatsTmpDirs(BaseWork work, Configuration conf) { List<String> statsTmpDirs = new ArrayList<>(); if (!StatsSetupConst.StatDB.fs.name().equalsIgnoreCase(HiveConf.getVar(conf, ConfVars.HIVESTATSDBCLASS))) { // no-op for non-fs stats collection return statsTmpDirs; } // if its auto-stats gather for inserts or CTAS, stats dir will be in FileSink Set<Operator<? extends OperatorDesc>> ops = work.getAllLeafOperators(); if (work instanceof MapWork) { // if its an anlayze statement, stats dir will be in TableScan ops.addAll(work.getAllRootOperators()); } for (Operator<? extends OperatorDesc> op : ops) { OperatorDesc desc = op.getConf(); String statsTmpDir = null; if (desc instanceof FileSinkDesc) { statsTmpDir = ((FileSinkDesc)desc).getStatsTmpDir(); } else if (desc instanceof TableScanDesc) { statsTmpDir = ((TableScanDesc) desc).getTmpStatsDir(); } if (statsTmpDir != null && !statsTmpDir.isEmpty()) { statsTmpDirs.add(statsTmpDir); } } return statsTmpDirs; }
sc.setStatsTmpDir(conf.getTmpStatsDir()); sc.setContextSuffix(getOperatorId()); if (!statsPublisher.connect(sc)) {
sc.setStatsTmpDir(conf.getTmpStatsDir()); if (!statsPublisher.connect(sc)) {
scanWork.setMapperCannotSpanPartns(true); scanWork.setAggKey(aggregationKey); scanWork.setStatsTmpDir(op.getConf().getTmpStatsDir(), parseCtx.getConf());
scanWork.setMapperCannotSpanPartns(true); scanWork.setAggKey(aggregationKey); scanWork.setStatsTmpDir(tableScan.getConf().getTmpStatsDir(), parseContext.getConf());
scanWork.setMapperCannotSpanPartns(true); scanWork.setAggKey(aggregationKey); scanWork.setStatsTmpDir(tableScan.getConf().getTmpStatsDir(), parseContext.getConf());
statsWork.setStatsTmpDir(tableScan.getConf().getTmpStatsDir()); statsWork.setSourceTask(context.currentTask); statsWork.setStatsReliable(parseContext.getConf().getBoolVar(
statsWork.setStatsTmpDir(tableScan.getConf().getTmpStatsDir()); statsWork.setSourceTask(context.currentTask); statsWork.setStatsReliable(parseContext.getConf().getBoolVar(HiveConf.ConfVars.HIVE_STATS_RELIABLE));
statsWork.setStatsTmpDir(tableScan.getConf().getTmpStatsDir()); statsWork.setSourceTask(context.currentTask); statsWork.setStatsReliable(parseContext.getConf().getBoolVar(
statsWork.setStatsTmpDir(op.getConf().getTmpStatsDir()); statsWork.setSourceTask(currTask); statsWork.setStatsReliable(parseCtx.getConf().getBoolVar(