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
|
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
|
MAPREDUCE-3829. [Gridmix] Gridmix should give better error message when
|
||||||
input data directory already exists and -generate opton is
|
input data directory already exists and -generate opton is
|
||||||
given.(ravigummadi)
|
given.(ravigummadi)
|
||||||
|
@ -215,7 +215,13 @@ protected JobStory getNextJobFiltered() throws IOException {
|
|||||||
return null == job ? null : new FilterJobStory(job) {
|
return null == job ? null : new FilterJobStory(job) {
|
||||||
@Override
|
@Override
|
||||||
public TaskInfo getTaskInfo(TaskType taskType, int taskNumber) {
|
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 @@ private TaskAttemptInfo getTaskAttemptInfo(LoggedTask loggedTask,
|
|||||||
}
|
}
|
||||||
|
|
||||||
private TaskInfo getTaskInfo(LoggedTask loggedTask) {
|
private TaskInfo getTaskInfo(LoggedTask loggedTask) {
|
||||||
|
if (loggedTask == null) {
|
||||||
|
return new TaskInfo(0, 0, 0, 0, 0);
|
||||||
|
}
|
||||||
List<LoggedTaskAttempt> attempts = loggedTask.getAttempts();
|
List<LoggedTaskAttempt> attempts = loggedTask.getAttempts();
|
||||||
|
|
||||||
long inputBytes = -1;
|
long inputBytes = -1;
|
||||||
|
Loading…
Reference in New Issue
Block a user