@Override public boolean shouldSpeculateAllRemainingMaps() { if (speculativeMapUnfininshedThreshold == 0) { return false; } int unfinished = desiredMaps() - finishedMaps(); if (unfinished < desiredMaps() * speculativeMapUnfininshedThreshold || unfinished == 1) { return true; } return false; }
/** * Wait till noOfTasksToFinish number of tasks of type specified by isMap * are finished. This currently uses a jip object and directly uses its api to * determine the number of tasks finished. * * <p> * * TODO: It should eventually use a JobID and then get the information from * the JT to check the number of finished tasks. * * @param jip * @param isMap * @param noOfTasksToFinish * @throws InterruptedException */ static void waitTillNTotalTasksFinish(JobInProgress jip, boolean isMap, int noOfTasksToFinish) throws InterruptedException { int noOfTasksAlreadyFinished = 0; while (noOfTasksAlreadyFinished < noOfTasksToFinish) { Thread.sleep(1000); noOfTasksAlreadyFinished = (isMap ? jip.finishedMaps() : jip.finishedReduces()); LOG.info("Waiting till " + noOfTasksToFinish + (isMap ? " map" : " reduce") + " tasks of the job " + jip.getJobID() + " finish. " + noOfTasksAlreadyFinished + " tasks already got finished."); } }
int completedMaps = job.finishedMaps(); int completedReduces = job.finishedReduces(); String name = profile.getJobName();
int completedMaps = job.finishedMaps(); int completedReduces = job.finishedReduces(); String name = HtmlQuoting.quoteHtmlChars(profile.getJobName());
totalMaps += job.desiredMaps(); totalReduces += job.desiredReduces(); comMaps += job.finishedMaps(); comReduces += job.finishedReduces(); if (isRunning) { int completedMaps = job.finishedMaps(); int completedReduces = job.finishedReduces(); String runningMapTableData =
for (JobInProgress job : jobQueue) { if (job.getStatus().getRunState() == JobStatus.RUNNING) { neededMaps += job.desiredMaps() - job.finishedMaps(); neededReduces += job.desiredReduces() - job.finishedReduces();
totalMaps += job.desiredMaps(); totalReduces += job.desiredReduces(); comMaps += job.finishedMaps(); comReduces += job.finishedReduces(); if (isRunning) { int completedMaps = job.finishedMaps(); int completedReduces = job.finishedReduces(); String runningMapTableData =
for (JobInProgress job : jobQueue) { if (job.getStatus().getRunState() == JobStatus.RUNNING) { neededMaps += job.desiredMaps() - job.finishedMaps(); neededReduces += job.desiredReduces() - job.finishedReduces();
for (JobInProgress job : jobQueue) { if (job.getStatus().getRunState() == JobStatus.RUNNING) { neededMaps += job.desiredMaps() - job.finishedMaps(); neededReduces += job.desiredReduces() - job.finishedReduces();
for (int i = 0; i < 100 && (jip.finishedMaps() < 1); i++) { UtilsForTests.waitFor(1000); assertEquals(jip.finishedMaps(), 1);
for (JobInProgress job : jobQueue) { if (job.getStatus().getRunState() == JobStatus.RUNNING) { remainingMapLoad += (job.desiredMaps() - job.finishedMaps()); if (job.scheduleReduces()) { remainingReduceLoad +=
for (JobInProgress job : jobQueue) { if (job.getStatus().getRunState() == JobStatus.RUNNING) { remainingMapLoad += (job.desiredMaps() - job.finishedMaps()); if (job.scheduleReduces()) { remainingReduceLoad +=
int completedMaps = job.finishedMaps(); int completedReduces = job.finishedReduces(); int nonLocalRunningMaps = job.getNonLocalRunningMaps().size();
int totalMapTasks = job.desiredMaps(); int totalReduceTasks = job.desiredReduces(); remainingMapLoad += (totalMapTasks - job.finishedMaps()); remainingReduceLoad += (totalReduceTasks - job.finishedReduces());
/** * Returns an XML-formatted table of the jobs in the list. * This is called repeatedly for different lists of jobs (e.g., running, completed, failed). */ public void generateJobTable(JspWriter out, String label, List<JobInProgress> jobs) throws IOException { if (jobs.size() > 0) { for (JobInProgress job : jobs) { JobProfile profile = job.getProfile(); JobStatus status = job.getStatus(); JobID jobid = profile.getJobID(); int desiredMaps = job.desiredMaps(); int desiredReduces = job.desiredReduces(); int completedMaps = job.finishedMaps(); int completedReduces = job.finishedReduces(); String name = profile.getJobName(); out.print("<" + label + "_job jobid=\"" + jobid + "\">\n"); out.print(" <jobid>" + jobid + "</jobid>\n"); out.print(" <user>" + profile.getUser() + "</user>\n"); out.print(" <name>" + ("".equals(name) ? " " : name) + "</name>\n"); out.print(" <map_complete>" + StringUtils.formatPercent(status.mapProgress(), 2) + "</map_complete>\n"); out.print(" <map_total>" + desiredMaps + "</map_total>\n"); out.print(" <maps_completed>" + completedMaps + "</maps_completed>\n"); out.print(" <reduce_complete>" + StringUtils.formatPercent(status.reduceProgress(), 2) + "</reduce_complete>\n"); out.print(" <reduce_total>" + desiredReduces + "</reduce_total>\n"); out.print(" <reduces_completed>" + completedReduces + "</reduces_completed>\n"); out.print("</" + label + "_job>\n"); } } }
/** * Returns an XML-formatted table of the jobs in the list. * This is called repeatedly for different lists of jobs (e.g., running, completed, failed). */ public void generateJobTable(JspWriter out, String label, List<JobInProgress> jobs) throws IOException { if (jobs.size() > 0) { for (JobInProgress job : jobs) { JobProfile profile = job.getProfile(); JobStatus status = job.getStatus(); JobID jobid = profile.getJobID(); int desiredMaps = job.desiredMaps(); int desiredReduces = job.desiredReduces(); int completedMaps = job.finishedMaps(); int completedReduces = job.finishedReduces(); String name = profile.getJobName(); out.print("<" + label + "_job jobid=\"" + jobid + "\">\n"); out.print(" <jobid>" + jobid + "</jobid>\n"); out.print(" <user>" + profile.getUser() + "</user>\n"); out.print(" <name>" + ("".equals(name) ? " " : name) + "</name>\n"); out.print(" <map_complete>" + StringUtils.formatPercent(status.mapProgress(), 2) + "</map_complete>\n"); out.print(" <map_total>" + desiredMaps + "</map_total>\n"); out.print(" <maps_completed>" + completedMaps + "</maps_completed>\n"); out.print(" <reduce_complete>" + StringUtils.formatPercent(status.reduceProgress(), 2) + "</reduce_complete>\n"); out.print(" <reduce_total>" + desiredReduces + "</reduce_total>\n"); out.print(" <reduces_completed>" + completedReduces + "</reduces_completed>\n"); out.print("</" + label + "_job>\n"); } } }
jobInfo.getFinishedMaps() == jip.finishedMaps());