MAPREDUCE-3953. [Gridmix] Gridmix throws NPE and does not simulate a job if the trace contains null taskStatus for a task.(ravigummadi)
git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1303330 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
9e108e61fb
commit
7b3a98cfcd
|
@ -52,6 +52,10 @@ Trunk (unreleased changes)
|
|||
|
||||
BUG FIXES
|
||||
|
||||
MAPREDUCE-3953. [Gridmix] Gridmix throws NPE and does not simulate a
|
||||
job if the trace contains null taskStatus for a task.
|
||||
(ravigummadi)
|
||||
|
||||
MAPREDUCE-3829. [Gridmix] Gridmix should give better error message when
|
||||
input data directory already exists and -generate opton is
|
||||
given.(ravigummadi)
|
||||
|
|
|
@ -215,7 +215,13 @@ abstract class JobFactory<T> implements Gridmix.Component<Void>,StatListener<T>
|
|||
return null == job ? null : new FilterJobStory(job) {
|
||||
@Override
|
||||
public TaskInfo getTaskInfo(TaskType taskType, int taskNumber) {
|
||||
return new MinTaskInfo(this.job.getTaskInfo(taskType, taskNumber));
|
||||
TaskInfo info = this.job.getTaskInfo(taskType, taskNumber);
|
||||
if (info != null) {
|
||||
info = new MinTaskInfo(info);
|
||||
} else {
|
||||
info = new MinTaskInfo(new TaskInfo(0, 0, 0, 0, 0));
|
||||
}
|
||||
return info;
|
||||
}
|
||||
};
|
||||
}
|
||||
|
|
|
@ -638,6 +638,9 @@ public class ZombieJob implements JobStory {
|
|||
}
|
||||
|
||||
private TaskInfo getTaskInfo(LoggedTask loggedTask) {
|
||||
if (loggedTask == null) {
|
||||
return new TaskInfo(0, 0, 0, 0, 0);
|
||||
}
|
||||
List<LoggedTaskAttempt> attempts = loggedTask.getAttempts();
|
||||
|
||||
long inputBytes = -1;
|
||||
|
|
Loading…
Reference in New Issue