private static void addTaskInfo(JobHistoryParser.JobInfo job, TaskType type, int id, TaskStatus.State status) { JobHistoryParser.TaskInfo task = new JobHistoryParser.TaskInfo(); task.taskId = new TaskID(job.getJobId(), type, id); task.startTime = job.getLaunchTime() + id * 1000; task.finishTime = task.startTime + id * 1000; task.taskType = type; task.counters = createCounters(); task.status = status.name(); task.attemptsMap = new HashMap<>(); addTaskAttemptInfo(task, 1); job.tasksMap.put(task.getTaskId(), task); }
/** * Constructs the HistoryViewer object * @param historyFile The fully qualified Path of the History File * @param conf The Configuration file * @param printAll Toggle to print all status to only killed/failed status * @throws IOException */ public HistoryViewer(String historyFile, Configuration conf, boolean printAll) throws IOException { this.printAll = printAll; String errorMsg = "Unable to initialize History Viewer"; try { Path jobFile = new Path(historyFile); fs = jobFile.getFileSystem(conf); String[] jobDetails = jobFile.getName().split("_"); if (jobDetails.length < 2) { // NOT a valid name System.err.println("Ignore unrecognized file: " + jobFile.getName()); throw new IOException(errorMsg); } JobHistoryParser parser = new JobHistoryParser(fs, jobFile); job = parser.parse(); jobId = job.getJobId().toString(); } catch(Exception e) { throw new IOException(errorMsg, e); } }
/** * Constructs the HistoryViewer object * @param historyFile The fully qualified Path of the History File * @param conf The Configuration file * @param printAll Toggle to print all status to only killed/failed status * @throws IOException */ public HistoryViewer(String historyFile, Configuration conf, boolean printAll) throws IOException { this.printAll = printAll; String errorMsg = "Unable to initialize History Viewer"; try { Path jobFile = new Path(historyFile); fs = jobFile.getFileSystem(conf); String[] jobDetails = jobFile.getName().split("_"); if (jobDetails.length < 2) { // NOT a valid name System.err.println("Ignore unrecognized file: " + jobFile.getName()); throw new IOException(errorMsg); } JobHistoryParser parser = new JobHistoryParser(fs, jobFile); job = parser.parse(); jobId = job.getJobId().toString(); } catch(Exception e) { throw new IOException(errorMsg, e); } }
out.write('"'); out.write('>'); out.print(job.getJobId() ); out.write(" </a></h2>\n<b>User : </b> "); out.print(HtmlQuoting.quoteHtmlChars(job.getUsername()) );
out.write('>'); out.write(' '); out.print(job.getJobId() ); out.write(" </a></h2>\n<center>\n<table border=\"2\" cellpadding=\"5\" cellspacing=\"2\">\n<tr><td>Task Id</td><td>Start Time</td>\n");
out.write('"'); out.write('>'); out.print(job.getJobId() ); out.write(" </a></h2>\n<center>\n<table border=\"2\" cellpadding=\"5\" cellspacing=\"2\">\n<tr><td>Task Id</td><td>Start Time</td><td>Finish Time<br/></td><td>Error</td></tr>\n");
StringBuffer taskList = new StringBuffer(); taskList.append("\n").append(taskType); taskList.append(" task list for ").append(job.getJobId()); taskList.append("\nTaskId\t\tStartTime"); if (TaskType.REDUCE.equals(taskType)) {
StringBuffer taskList = new StringBuffer(); taskList.append("\n").append(taskType); taskList.append(" task list for ").append(job.getJobId()); taskList.append("\nTaskId\t\tStartTime"); if (TaskType.REDUCE.equals(taskType)) {
StringBuffer taskList = new StringBuffer(); taskList.append("\n").append(taskType); taskList.append(" task list for ").append(job.getJobId()); taskList.append("\nTaskId\t\tStartTime"); if (TaskType.REDUCE.equals(taskType)) {
StringBuffer taskList = new StringBuffer(); taskList.append("\n").append(taskType); taskList.append(" task list for ").append(job.getJobId()); taskList.append("\nTaskId\t\tStartTime"); if (TaskType.REDUCE.equals(taskType)) {
StringBuffer taskList = new StringBuffer(); taskList.append("\n").append(taskType); taskList.append(" task list for ").append(job.getJobId()); taskList.append("\nTaskId\t\tStartTime"); if (TaskType.REDUCE.equals(taskType)) {
/** * Constructs the HistoryViewer object * @param historyFile The fully qualified Path of the History File * @param conf The Configuration file * @param printAll Toggle to print all status to only killed/failed status * @throws IOException */ public HistoryViewer(String historyFile, Configuration conf, boolean printAll) throws IOException { this.printAll = printAll; String errorMsg = "Unable to initialize History Viewer"; try { Path jobFile = new Path(historyFile); fs = jobFile.getFileSystem(conf); String[] jobDetails = jobFile.getName().split("_"); if (jobDetails.length < 2) { // NOT a valid name System.err.println("Ignore unrecognized file: " + jobFile.getName()); throw new IOException(errorMsg); } JobHistoryParser parser = new JobHistoryParser(fs, jobFile); job = parser.parse(); jobId = job.getJobId().toString(); } catch(Exception e) { throw new IOException(errorMsg, e); } }
/** * Constructs the HistoryViewer object * @param historyFile The fully qualified Path of the History File * @param conf The Configuration file * @param printAll Toggle to print all status to only killed/failed status * @throws IOException */ public HistoryViewer(String historyFile, Configuration conf, boolean printAll) throws IOException { this.printAll = printAll; String errorMsg = "Unable to initialize History Viewer"; try { Path jobFile = new Path(historyFile); fs = jobFile.getFileSystem(conf); String[] jobDetails = jobFile.getName().split("_"); if (jobDetails.length < 2) { // NOT a valid name System.err.println("Ignore unrecognized file: " + jobFile.getName()); throw new IOException(errorMsg); } JobHistoryParser parser = new JobHistoryParser(fs, jobFile); job = parser.parse(); jobId = job.getJobId().toString(); } catch(Exception e) { throw new IOException(errorMsg, e); } }
/** * Constructs the HistoryViewer object * @param historyFile The fully qualified Path of the History File * @param conf The Configuration file * @param printAll Toggle to print all status to only killed/failed status * @throws IOException */ public HistoryViewer(String historyFile, Configuration conf, boolean printAll) throws IOException { this.printAll = printAll; String errorMsg = "Unable to initialize History Viewer"; try { Path jobFile = new Path(historyFile); fs = jobFile.getFileSystem(conf); String[] jobDetails = jobFile.getName().split("_"); if (jobDetails.length < 2) { // NOT a valid name System.err.println("Ignore unrecognized file: " + jobFile.getName()); throw new IOException(errorMsg); } JobHistoryParser parser = new JobHistoryParser(fs, jobFile); job = parser.parse(); jobId = job.getJobId().toString(); } catch(Exception e) { throw new IOException(errorMsg, e); } }
private void printJobDetails() { StringBuffer jobDetails = new StringBuffer(); jobDetails.append("\nHadoop job: " ).append(job.getJobId()); jobDetails.append("\n====================================="); jobDetails.append("\nUser: ").append(job.getUsername()); jobDetails.append("\nJobName: ").append(job.getJobname()); jobDetails.append("\nJobConf: ").append(job.getJobConfPath()); jobDetails.append("\nSubmitted At: ").append(StringUtils. getFormattedTimeWithDiff(dateFormat, job.getSubmitTime(), 0)); jobDetails.append("\nLaunched At: ").append(StringUtils. getFormattedTimeWithDiff(dateFormat, job.getLaunchTime(), job.getSubmitTime())); jobDetails.append("\nFinished At: ").append(StringUtils. getFormattedTimeWithDiff(dateFormat, job.getFinishTime(), job.getLaunchTime())); jobDetails.append("\nStatus: ").append(((job.getJobStatus() == null) ? "Incomplete" :job.getJobStatus())); printCounters(jobDetails, job.getTotalCounters(), job.getMapCounters(), job.getReduceCounters()); jobDetails.append("\n"); jobDetails.append("\n====================================="); System.out.println(jobDetails.toString()); }
private void printJobDetails() { StringBuffer jobDetails = new StringBuffer(); jobDetails.append("\nHadoop job: " ).append(job.getJobId()); jobDetails.append("\n====================================="); jobDetails.append("\nUser: ").append(job.getUsername()); jobDetails.append("\nJobName: ").append(job.getJobname()); jobDetails.append("\nJobConf: ").append(job.getJobConfPath()); jobDetails.append("\nSubmitted At: ").append(StringUtils. getFormattedTimeWithDiff(dateFormat, job.getSubmitTime(), 0)); jobDetails.append("\nLaunched At: ").append(StringUtils. getFormattedTimeWithDiff(dateFormat, job.getLaunchTime(), job.getSubmitTime())); jobDetails.append("\nFinished At: ").append(StringUtils. getFormattedTimeWithDiff(dateFormat, job.getFinishTime(), job.getLaunchTime())); jobDetails.append("\nStatus: ").append(((job.getJobStatus() == null) ? "Incomplete" :job.getJobStatus())); printCounters(jobDetails, job.getTotalCounters(), job.getMapCounters(), job.getReduceCounters()); jobDetails.append("\n"); jobDetails.append("\n====================================="); System.out.println(jobDetails.toString()); }
private void printJobDetails() { StringBuffer jobDetails = new StringBuffer(); jobDetails.append("\nHadoop job: " ).append(job.getJobId()); jobDetails.append("\n====================================="); jobDetails.append("\nUser: ").append(job.getUsername()); jobDetails.append("\nJobName: ").append(job.getJobname()); jobDetails.append("\nJobConf: ").append(job.getJobConfPath()); jobDetails.append("\nSubmitted At: ").append(StringUtils. getFormattedTimeWithDiff(dateFormat, job.getSubmitTime(), 0)); jobDetails.append("\nLaunched At: ").append(StringUtils. getFormattedTimeWithDiff(dateFormat, job.getLaunchTime(), job.getSubmitTime())); jobDetails.append("\nFinished At: ").append(StringUtils. getFormattedTimeWithDiff(dateFormat, job.getFinishTime(), job.getLaunchTime())); jobDetails.append("\nStatus: ").append(((job.getJobStatus() == null) ? "Incomplete" :job.getJobStatus())); printCounters(jobDetails, job.getTotalCounters(), job.getMapCounters(), job.getReduceCounters()); jobDetails.append("\n"); jobDetails.append("\n====================================="); System.out.println(jobDetails.toString()); }
private void printJobDetails() { StringBuffer jobDetails = new StringBuffer(); jobDetails.append("\nHadoop job: " ).append(job.getJobId()); jobDetails.append("\n====================================="); jobDetails.append("\nUser: ").append(job.getUsername()); jobDetails.append("\nJobName: ").append(job.getJobname()); jobDetails.append("\nJobConf: ").append(job.getJobConfPath()); jobDetails.append("\nSubmitted At: ").append(StringUtils. getFormattedTimeWithDiff(dateFormat, job.getSubmitTime(), 0)); jobDetails.append("\nLaunched At: ").append(StringUtils. getFormattedTimeWithDiff(dateFormat, job.getLaunchTime(), job.getSubmitTime())); jobDetails.append("\nFinished At: ").append(StringUtils. getFormattedTimeWithDiff(dateFormat, job.getFinishTime(), job.getLaunchTime())); jobDetails.append("\nStatus: ").append(((job.getJobStatus() == null) ? "Incomplete" :job.getJobStatus())); printCounters(jobDetails, job.getTotalCounters(), job.getMapCounters(), job.getReduceCounters()); jobDetails.append("\n"); jobDetails.append("\n====================================="); System.out.println(jobDetails.toString()); }
private void printJobDetails() { StringBuffer jobDetails = new StringBuffer(); jobDetails.append("\nHadoop job: " ).append(job.getJobId()); jobDetails.append("\n====================================="); jobDetails.append("\nUser: ").append(job.getUsername()); jobDetails.append("\nJobName: ").append(job.getJobname()); jobDetails.append("\nJobConf: ").append(job.getJobConfPath()); jobDetails.append("\nSubmitted At: ").append(StringUtils. getFormattedTimeWithDiff(dateFormat, job.getSubmitTime(), 0)); jobDetails.append("\nLaunched At: ").append(StringUtils. getFormattedTimeWithDiff(dateFormat, job.getLaunchTime(), job.getSubmitTime())); jobDetails.append("\nFinished At: ").append(StringUtils. getFormattedTimeWithDiff(dateFormat, job.getFinishTime(), job.getLaunchTime())); jobDetails.append("\nStatus: ").append(((job.getJobStatus() == null) ? "Incomplete" :job.getJobStatus())); printCounters(jobDetails, job.getTotalCounters(), job.getMapCounters(), job.getReduceCounters()); jobDetails.append("\n"); jobDetails.append("\n====================================="); System.out.println(jobDetails.toString()); }