public static StatsPublisher getStatsPublisher(JobConf jc) { String statsImplementationClass = HiveConf.getVar(jc, HiveConf.ConfVars.HIVESTATSDBCLASS); if (StatsFactory.setImplementation(statsImplementationClass, jc)) { return StatsFactory.getStatsPublisher(); } else { return null; } }
/** * This method is static as it is called from the shutdown hook at the ExecDriver. */ public static void cleanUp(String jobID, Configuration config) { StatsAggregator statsAggregator; String statsImplementationClass = HiveConf.getVar(config, HiveConf.ConfVars.HIVESTATSDBCLASS); StatsFactory.setImplementation(statsImplementationClass, config); statsAggregator = StatsFactory.getStatsAggregator(); if (statsAggregator.connect(config)) { statsAggregator.cleanUp(jobID + Path.SEPARATOR); // Adding the path separator to avoid an Id being a prefix of another ID } } }
private int aggregateStats() { StatsFactory.setImplementation(statsImplementationClass, conf); StatsAggregator statsAggregator = StatsFactory.getStatsAggregator();
if (StatsFactory.setImplementation(statsImplementationClass, job)) { statsPublisher = StatsFactory.getStatsPublisher();