/** * Returns the total job counters, by adding together the job, * the map and the reduce counters. */ public Counters getCounters() { Counters result = new Counters(); synchronized (this) { result.incrAllCounters(getJobCounters()); } incrementTaskCounters(result, maps); return incrementTaskCounters(result, reduces); }
/** * Returns the total job counters, by adding together the job, * the map and the reduce counters. */ public synchronized Counters getCounters() { Counters result = new Counters(); result.incrAllCounters(getJobCounters()); incrementTaskCounters(result, maps); return incrementTaskCounters(result, reduces); }
/** * Returns the total job counters, by adding together the job, * the map and the reduce counters. */ public Counters getCounters() { Counters result = new Counters(); synchronized (this) { result.incrAllCounters(getJobCounters()); } // the counters of TIPs are not updated in place. // hence read-only access is ok without any locks incrementTaskCounters(result, maps); return incrementTaskCounters(result, reduces); }
static void checkTaskCounts(JobInProgress jip, int runningMaps, int pendingMaps, int runningReduces, int pendingReduces) { Counters counter = jip.getJobCounters(); long totalTaskCount = counter.getCounter(JobCounter.TOTAL_LAUNCHED_MAPS) + counter.getCounter(JobCounter.TOTAL_LAUNCHED_REDUCES); LOG.info("totalTaskCount is " + totalTaskCount); LOG.info(" Running Maps:" + jip.runningMaps() + " Pending Maps:" + jip.pendingMaps() + " Running Reds:" + jip.runningReduces() + " Pending Reds:" + jip.pendingReduces()); assertEquals(jip.getNumTaskCompletionEvents(),totalTaskCount); assertEquals(runningMaps, jip.runningMaps()); assertEquals(pendingMaps, jip.pendingMaps()); assertEquals(runningReduces, jip.runningReduces()); assertEquals(pendingReduces, jip.pendingReduces()); }
StringUtils.ESCAPE_CHAR, charsToEscape); Counters jobCounters = job.getJobCounters(); long mapSlotSeconds = (jobCounters.getCounter(Counter.SLOTS_MILLIS_MAPS) +
JobStatus status = job.getStatus(); JobProfile profile = job.getProfile(); Counters jobCounters = job.getJobCounters(); long mapSlotSeconds = (jobCounters.getCounter(JobCounter.SLOTS_MILLIS_MAPS) +