From 488806baca6d84c12b24532ddeacf6d249c2136b Mon Sep 17 00:00:00 2001 From: Jason Lowe Date: Fri, 14 Sep 2018 15:04:18 -0500 Subject: [PATCH] MAPREDUCE-7140. Refactoring TaskAttemptInfo to separate Map and Reduce tasks. Contributed by Oleksandr Shevchenko --- .../v2/app/webapp/AMWebServices.java | 9 +++-- .../v2/app/webapp/JAXBContextResolver.java | 7 ++-- .../mapreduce/v2/app/webapp/TaskPage.java | 3 +- .../v2/app/webapp/dao/MapTaskAttemptInfo.java | 39 +++++++++++++++++++ .../app/webapp/dao/ReduceTaskAttemptInfo.java | 11 +++--- .../v2/app/webapp/dao/TaskAttemptInfo.java | 14 +++---- .../v2/app/webapp/dao/TaskAttemptsInfo.java | 10 ++--- .../mapreduce/v2/hs/webapp/HsTaskPage.java | 3 +- .../mapreduce/v2/hs/webapp/HsTasksBlock.java | 5 ++- .../mapreduce/v2/hs/webapp/HsWebServices.java | 9 +++-- .../v2/hs/webapp/JAXBContextResolver.java | 4 +- 11 files changed, 77 insertions(+), 37 deletions(-) create mode 100644 hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-app/src/main/java/org/apache/hadoop/mapreduce/v2/app/webapp/dao/MapTaskAttemptInfo.java diff --git a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-app/src/main/java/org/apache/hadoop/mapreduce/v2/app/webapp/AMWebServices.java b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-app/src/main/java/org/apache/hadoop/mapreduce/v2/app/webapp/AMWebServices.java index f477d314c7..fe3ace8bef 100644 --- a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-app/src/main/java/org/apache/hadoop/mapreduce/v2/app/webapp/AMWebServices.java +++ b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-app/src/main/java/org/apache/hadoop/mapreduce/v2/app/webapp/AMWebServices.java @@ -65,6 +65,7 @@ import org.apache.hadoop.mapreduce.v2.app.webapp.dao.JobTaskAttemptState; import org.apache.hadoop.mapreduce.v2.app.webapp.dao.JobTaskCounterInfo; import org.apache.hadoop.mapreduce.v2.app.webapp.dao.JobsInfo; +import org.apache.hadoop.mapreduce.v2.app.webapp.dao.MapTaskAttemptInfo; import org.apache.hadoop.mapreduce.v2.app.webapp.dao.ReduceTaskAttemptInfo; import org.apache.hadoop.mapreduce.v2.app.webapp.dao.TaskAttemptInfo; import org.apache.hadoop.mapreduce.v2.app.webapp.dao.TaskAttemptsInfo; @@ -396,9 +397,9 @@ public TaskAttemptsInfo getJobTaskAttempts(@Context HttpServletRequest hsr, for (TaskAttempt ta : task.getAttempts().values()) { if (ta != null) { if (task.getType() == TaskType.REDUCE) { - attempts.add(new ReduceTaskAttemptInfo(ta, task.getType())); + attempts.add(new ReduceTaskAttemptInfo(ta)); } else { - attempts.add(new TaskAttemptInfo(ta, task.getType(), true)); + attempts.add(new MapTaskAttemptInfo(ta, true)); } } } @@ -419,9 +420,9 @@ public TaskAttemptInfo getJobTaskAttemptId(@Context HttpServletRequest hsr, Task task = getTaskFromTaskIdString(tid, job); TaskAttempt ta = getTaskAttemptFromTaskAttemptString(attId, task); if (task.getType() == TaskType.REDUCE) { - return new ReduceTaskAttemptInfo(ta, task.getType()); + return new ReduceTaskAttemptInfo(ta); } else { - return new TaskAttemptInfo(ta, task.getType(), true); + return new MapTaskAttemptInfo(ta, true); } } diff --git a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-app/src/main/java/org/apache/hadoop/mapreduce/v2/app/webapp/JAXBContextResolver.java b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-app/src/main/java/org/apache/hadoop/mapreduce/v2/app/webapp/JAXBContextResolver.java index 88c7d86110..625eb4ef32 100644 --- a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-app/src/main/java/org/apache/hadoop/mapreduce/v2/app/webapp/JAXBContextResolver.java +++ b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-app/src/main/java/org/apache/hadoop/mapreduce/v2/app/webapp/JAXBContextResolver.java @@ -42,8 +42,8 @@ import org.apache.hadoop.mapreduce.v2.app.webapp.dao.JobsInfo; import org.apache.hadoop.mapreduce.v2.app.webapp.dao.JobTaskAttemptCounterInfo; import org.apache.hadoop.mapreduce.v2.app.webapp.dao.JobTaskCounterInfo; +import org.apache.hadoop.mapreduce.v2.app.webapp.dao.MapTaskAttemptInfo; import org.apache.hadoop.mapreduce.v2.app.webapp.dao.ReduceTaskAttemptInfo; -import org.apache.hadoop.mapreduce.v2.app.webapp.dao.TaskAttemptInfo; import org.apache.hadoop.mapreduce.v2.app.webapp.dao.TaskAttemptsInfo; import org.apache.hadoop.mapreduce.v2.app.webapp.dao.TaskCounterGroupInfo; import org.apache.hadoop.mapreduce.v2.app.webapp.dao.TaskCounterInfo; @@ -62,9 +62,8 @@ public class JAXBContextResolver implements ContextResolver { AppInfo.class, CounterInfo.class, JobTaskAttemptCounterInfo.class, JobTaskCounterInfo.class, TaskCounterGroupInfo.class, ConfInfo.class, JobCounterInfo.class, TaskCounterInfo.class, CounterGroupInfo.class, - JobInfo.class, JobsInfo.class, ReduceTaskAttemptInfo.class, - TaskAttemptInfo.class, TaskInfo.class, TasksInfo.class, - TaskAttemptsInfo.class, ConfEntryInfo.class, RemoteExceptionData.class}; + JobInfo.class, JobsInfo.class, MapTaskAttemptInfo.class, ReduceTaskAttemptInfo.class, + TaskInfo.class, TasksInfo.class, TaskAttemptsInfo.class, ConfEntryInfo.class, RemoteExceptionData.class}; // these dao classes need root unwrapping private final Class[] rootUnwrappedTypes = {JobTaskAttemptState.class}; diff --git a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-app/src/main/java/org/apache/hadoop/mapreduce/v2/app/webapp/TaskPage.java b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-app/src/main/java/org/apache/hadoop/mapreduce/v2/app/webapp/TaskPage.java index 4b8cde3b0e..5a4f4cc202 100644 --- a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-app/src/main/java/org/apache/hadoop/mapreduce/v2/app/webapp/TaskPage.java +++ b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-app/src/main/java/org/apache/hadoop/mapreduce/v2/app/webapp/TaskPage.java @@ -34,6 +34,7 @@ import org.apache.hadoop.mapreduce.v2.api.records.TaskAttemptState; import org.apache.hadoop.mapreduce.v2.api.records.TaskId; import org.apache.hadoop.mapreduce.v2.app.job.TaskAttempt; +import org.apache.hadoop.mapreduce.v2.app.webapp.dao.MapTaskAttemptInfo; import org.apache.hadoop.mapreduce.v2.app.webapp.dao.TaskAttemptInfo; import org.apache.hadoop.mapreduce.v2.util.MRWebAppUtil; import org.apache.hadoop.util.StringUtils; @@ -124,7 +125,7 @@ protected void render(Block html) { StringBuilder attemptsTableData = new StringBuilder("[\n"); for (TaskAttempt attempt : getTaskAttempts()) { - TaskAttemptInfo ta = new TaskAttemptInfo(attempt, true); + TaskAttemptInfo ta = new MapTaskAttemptInfo(attempt, true); String progress = StringUtils.format("%.2f", ta.getProgress()); String nodeHttpAddr = ta.getNode(); diff --git a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-app/src/main/java/org/apache/hadoop/mapreduce/v2/app/webapp/dao/MapTaskAttemptInfo.java b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-app/src/main/java/org/apache/hadoop/mapreduce/v2/app/webapp/dao/MapTaskAttemptInfo.java new file mode 100644 index 0000000000..bcd790a9c3 --- /dev/null +++ b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-app/src/main/java/org/apache/hadoop/mapreduce/v2/app/webapp/dao/MapTaskAttemptInfo.java @@ -0,0 +1,39 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + *

+ * http://www.apache.org/licenses/LICENSE-2.0 + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.hadoop.mapreduce.v2.app.webapp.dao; + +import org.apache.hadoop.mapreduce.v2.api.records.TaskType; +import org.apache.hadoop.mapreduce.v2.app.job.TaskAttempt; + +import javax.xml.bind.annotation.XmlRootElement; + +@XmlRootElement(name = "taskAttempt") +public class MapTaskAttemptInfo extends TaskAttemptInfo { + + public MapTaskAttemptInfo() { + } + + public MapTaskAttemptInfo(TaskAttempt ta) { + this(ta, false); + } + + public MapTaskAttemptInfo(TaskAttempt ta, Boolean isRunning) { + super(ta, TaskType.MAP, isRunning); + } +} \ No newline at end of file diff --git a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-app/src/main/java/org/apache/hadoop/mapreduce/v2/app/webapp/dao/ReduceTaskAttemptInfo.java b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-app/src/main/java/org/apache/hadoop/mapreduce/v2/app/webapp/dao/ReduceTaskAttemptInfo.java index 4d44d11b41..dbc76ec9d0 100644 --- a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-app/src/main/java/org/apache/hadoop/mapreduce/v2/app/webapp/dao/ReduceTaskAttemptInfo.java +++ b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-app/src/main/java/org/apache/hadoop/mapreduce/v2/app/webapp/dao/ReduceTaskAttemptInfo.java @@ -18,8 +18,6 @@ package org.apache.hadoop.mapreduce.v2.app.webapp.dao; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlRootElement; import org.apache.hadoop.mapreduce.v2.api.records.TaskType; @@ -27,7 +25,6 @@ import org.apache.hadoop.yarn.util.Times; @XmlRootElement(name = "taskAttempt") -@XmlAccessorType(XmlAccessType.FIELD) public class ReduceTaskAttemptInfo extends TaskAttemptInfo { protected long shuffleFinishTime; @@ -39,8 +36,12 @@ public class ReduceTaskAttemptInfo extends TaskAttemptInfo { public ReduceTaskAttemptInfo() { } - public ReduceTaskAttemptInfo(TaskAttempt ta, TaskType type) { - super(ta, type, false); + public ReduceTaskAttemptInfo(TaskAttempt ta) { + this(ta, false); + } + + public ReduceTaskAttemptInfo(TaskAttempt ta, Boolean isRunning) { + super(ta, TaskType.REDUCE, isRunning); this.shuffleFinishTime = ta.getShuffleFinishTime(); this.mergeFinishTime = ta.getSortFinishTime(); diff --git a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-app/src/main/java/org/apache/hadoop/mapreduce/v2/app/webapp/dao/TaskAttemptInfo.java b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-app/src/main/java/org/apache/hadoop/mapreduce/v2/app/webapp/dao/TaskAttemptInfo.java index 892c626961..140202ef4c 100644 --- a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-app/src/main/java/org/apache/hadoop/mapreduce/v2/app/webapp/dao/TaskAttemptInfo.java +++ b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-app/src/main/java/org/apache/hadoop/mapreduce/v2/app/webapp/dao/TaskAttemptInfo.java @@ -17,8 +17,6 @@ */ package org.apache.hadoop.mapreduce.v2.app.webapp.dao; -import java.util.List; - import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlRootElement; @@ -31,13 +29,12 @@ import org.apache.hadoop.mapreduce.v2.app.job.TaskAttempt; import org.apache.hadoop.mapreduce.v2.util.MRApps; import org.apache.hadoop.yarn.api.records.ContainerId; -import org.apache.hadoop.yarn.util.ConverterUtils; import org.apache.hadoop.yarn.util.Times; @XmlRootElement(name = "taskAttempt") -@XmlSeeAlso({ ReduceTaskAttemptInfo.class }) +@XmlSeeAlso({MapTaskAttemptInfo.class, ReduceTaskAttemptInfo.class}) @XmlAccessorType(XmlAccessType.FIELD) -public class TaskAttemptInfo { +public abstract class TaskAttemptInfo { protected long startTime; protected long finishTime; @@ -58,10 +55,6 @@ public class TaskAttemptInfo { public TaskAttemptInfo() { } - public TaskAttemptInfo(TaskAttempt ta, Boolean isRunning) { - this(ta, TaskType.MAP, isRunning); - } - public TaskAttemptInfo(TaskAttempt ta, TaskType type, Boolean isRunning) { final TaskAttemptReport report = ta.getReport(); this.type = type.toString(); @@ -133,4 +126,7 @@ public String getNote() { return this.diagnostics; } + public String getType() { + return type; + } } diff --git a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-app/src/main/java/org/apache/hadoop/mapreduce/v2/app/webapp/dao/TaskAttemptsInfo.java b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-app/src/main/java/org/apache/hadoop/mapreduce/v2/app/webapp/dao/TaskAttemptsInfo.java index 6f188d9d77..866b2fe90f 100644 --- a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-app/src/main/java/org/apache/hadoop/mapreduce/v2/app/webapp/dao/TaskAttemptsInfo.java +++ b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-app/src/main/java/org/apache/hadoop/mapreduce/v2/app/webapp/dao/TaskAttemptsInfo.java @@ -18,6 +18,7 @@ package org.apache.hadoop.mapreduce.v2.app.webapp.dao; import java.util.ArrayList; +import java.util.List; import javax.xml.bind.annotation.XmlElementRef; import javax.xml.bind.annotation.XmlRootElement; @@ -25,21 +26,20 @@ @XmlRootElement(name = "taskAttempts") public class TaskAttemptsInfo { - protected ArrayList taskAttempt = new ArrayList(); + protected List taskAttempts = new ArrayList<>(); public TaskAttemptsInfo() { } // JAXB needs this public void add(TaskAttemptInfo taskattemptInfo) { - taskAttempt.add(taskattemptInfo); + taskAttempts.add(taskattemptInfo); } // XmlElementRef annotation should be used to identify the exact type of a list element // otherwise metadata will be added to XML attributes, // it can lead to incorrect JSON marshaling @XmlElementRef - public ArrayList getTaskAttempts() { - return taskAttempt; + public List getTaskAttempts() { + return taskAttempts; } - } diff --git a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-hs/src/main/java/org/apache/hadoop/mapreduce/v2/hs/webapp/HsTaskPage.java b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-hs/src/main/java/org/apache/hadoop/mapreduce/v2/hs/webapp/HsTaskPage.java index 8defc4fe26..5b0c59f51a 100644 --- a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-hs/src/main/java/org/apache/hadoop/mapreduce/v2/hs/webapp/HsTaskPage.java +++ b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-hs/src/main/java/org/apache/hadoop/mapreduce/v2/hs/webapp/HsTaskPage.java @@ -34,6 +34,7 @@ import org.apache.hadoop.mapreduce.v2.api.records.TaskType; import org.apache.hadoop.mapreduce.v2.app.job.TaskAttempt; import org.apache.hadoop.mapreduce.v2.app.webapp.App; +import org.apache.hadoop.mapreduce.v2.app.webapp.dao.MapTaskAttemptInfo; import org.apache.hadoop.mapreduce.v2.app.webapp.dao.TaskAttemptInfo; import org.apache.hadoop.mapreduce.v2.util.MRApps; import org.apache.hadoop.mapreduce.v2.util.MRWebAppUtil; @@ -115,7 +116,7 @@ protected void render(Block html) { StringBuilder attemptsTableData = new StringBuilder("[\n"); for (TaskAttempt attempt : getTaskAttempts()) { - final TaskAttemptInfo ta = new TaskAttemptInfo(attempt, false); + final TaskAttemptInfo ta = new MapTaskAttemptInfo(attempt, false); String taid = ta.getId(); String nodeHttpAddr = ta.getNode(); diff --git a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-hs/src/main/java/org/apache/hadoop/mapreduce/v2/hs/webapp/HsTasksBlock.java b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-hs/src/main/java/org/apache/hadoop/mapreduce/v2/hs/webapp/HsTasksBlock.java index 702c13c01d..a00146e680 100644 --- a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-hs/src/main/java/org/apache/hadoop/mapreduce/v2/hs/webapp/HsTasksBlock.java +++ b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-hs/src/main/java/org/apache/hadoop/mapreduce/v2/hs/webapp/HsTasksBlock.java @@ -24,6 +24,7 @@ import org.apache.hadoop.mapreduce.v2.app.job.Task; import org.apache.hadoop.mapreduce.v2.app.job.TaskAttempt; import org.apache.hadoop.mapreduce.v2.app.webapp.App; +import org.apache.hadoop.mapreduce.v2.app.webapp.dao.MapTaskAttemptInfo; import org.apache.hadoop.mapreduce.v2.app.webapp.dao.ReduceTaskAttemptInfo; import org.apache.hadoop.mapreduce.v2.app.webapp.dao.TaskAttemptInfo; import org.apache.hadoop.mapreduce.v2.app.webapp.dao.TaskInfo; @@ -129,7 +130,7 @@ public class HsTasksBlock extends HtmlBlock { if(successful != null) { TaskAttemptInfo ta; if(type == TaskType.REDUCE) { - ReduceTaskAttemptInfo rta = new ReduceTaskAttemptInfo(successful, type); + ReduceTaskAttemptInfo rta = new ReduceTaskAttemptInfo(successful); shuffleFinishTime = rta.getShuffleFinishTime(); sortFinishTime = rta.getMergeFinishTime(); elapsedShuffleTime = rta.getElapsedShuffleTime(); @@ -137,7 +138,7 @@ public class HsTasksBlock extends HtmlBlock { elapsedReduceTime = rta.getElapsedReduceTime(); ta = rta; } else { - ta = new TaskAttemptInfo(successful, type, false); + ta = new MapTaskAttemptInfo(successful, false); } attemptStartTime = ta.getStartTime(); attemptFinishTime = ta.getFinishTime(); diff --git a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-hs/src/main/java/org/apache/hadoop/mapreduce/v2/hs/webapp/HsWebServices.java b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-hs/src/main/java/org/apache/hadoop/mapreduce/v2/hs/webapp/HsWebServices.java index dda237db83..dabb760d1c 100644 --- a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-hs/src/main/java/org/apache/hadoop/mapreduce/v2/hs/webapp/HsWebServices.java +++ b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-hs/src/main/java/org/apache/hadoop/mapreduce/v2/hs/webapp/HsWebServices.java @@ -48,6 +48,7 @@ import org.apache.hadoop.mapreduce.v2.app.webapp.dao.JobCounterInfo; import org.apache.hadoop.mapreduce.v2.app.webapp.dao.JobTaskAttemptCounterInfo; import org.apache.hadoop.mapreduce.v2.app.webapp.dao.JobTaskCounterInfo; +import org.apache.hadoop.mapreduce.v2.app.webapp.dao.MapTaskAttemptInfo; import org.apache.hadoop.mapreduce.v2.app.webapp.dao.ReduceTaskAttemptInfo; import org.apache.hadoop.mapreduce.v2.app.webapp.dao.TaskAttemptInfo; import org.apache.hadoop.mapreduce.v2.app.webapp.dao.TaskAttemptsInfo; @@ -361,9 +362,9 @@ public TaskAttemptsInfo getJobTaskAttempts(@Context HttpServletRequest hsr, for (TaskAttempt ta : task.getAttempts().values()) { if (ta != null) { if (task.getType() == TaskType.REDUCE) { - attempts.add(new ReduceTaskAttemptInfo(ta, task.getType())); + attempts.add(new ReduceTaskAttemptInfo(ta)); } else { - attempts.add(new TaskAttemptInfo(ta, task.getType(), false)); + attempts.add(new MapTaskAttemptInfo(ta, false)); } } } @@ -385,9 +386,9 @@ public TaskAttemptInfo getJobTaskAttemptId(@Context HttpServletRequest hsr, TaskAttempt ta = AMWebServices.getTaskAttemptFromTaskAttemptString(attId, task); if (task.getType() == TaskType.REDUCE) { - return new ReduceTaskAttemptInfo(ta, task.getType()); + return new ReduceTaskAttemptInfo(ta); } else { - return new TaskAttemptInfo(ta, task.getType(), false); + return new MapTaskAttemptInfo(ta, false); } } diff --git a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-hs/src/main/java/org/apache/hadoop/mapreduce/v2/hs/webapp/JAXBContextResolver.java b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-hs/src/main/java/org/apache/hadoop/mapreduce/v2/hs/webapp/JAXBContextResolver.java index e03d27fe0b..ad1c7a9fad 100644 --- a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-hs/src/main/java/org/apache/hadoop/mapreduce/v2/hs/webapp/JAXBContextResolver.java +++ b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-hs/src/main/java/org/apache/hadoop/mapreduce/v2/hs/webapp/JAXBContextResolver.java @@ -36,8 +36,8 @@ import org.apache.hadoop.mapreduce.v2.app.webapp.dao.JobCounterInfo; import org.apache.hadoop.mapreduce.v2.app.webapp.dao.JobTaskAttemptCounterInfo; import org.apache.hadoop.mapreduce.v2.app.webapp.dao.JobTaskCounterInfo; +import org.apache.hadoop.mapreduce.v2.app.webapp.dao.MapTaskAttemptInfo; import org.apache.hadoop.mapreduce.v2.app.webapp.dao.ReduceTaskAttemptInfo; -import org.apache.hadoop.mapreduce.v2.app.webapp.dao.TaskAttemptInfo; import org.apache.hadoop.mapreduce.v2.app.webapp.dao.TaskAttemptsInfo; import org.apache.hadoop.mapreduce.v2.app.webapp.dao.TaskCounterGroupInfo; import org.apache.hadoop.mapreduce.v2.app.webapp.dao.TaskCounterInfo; @@ -63,7 +63,7 @@ public class JAXBContextResolver implements ContextResolver { JobsInfo.class, TaskInfo.class, TasksInfo.class, TaskAttemptsInfo.class, ConfInfo.class, CounterInfo.class, JobTaskCounterInfo.class, JobTaskAttemptCounterInfo.class, TaskCounterInfo.class, - JobCounterInfo.class, ReduceTaskAttemptInfo.class, TaskAttemptInfo.class, + JobCounterInfo.class, MapTaskAttemptInfo.class, ReduceTaskAttemptInfo.class, TaskAttemptsInfo.class, CounterGroupInfo.class, TaskCounterGroupInfo.class, AMAttemptInfo.class, AMAttemptsInfo.class, RemoteExceptionData.class };