MAPREDUCE-4822. Unnecessary conversions in History Events. Contributed by Chu Tong

git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1443257 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Jason Darrell Lowe 2013-02-06 22:47:10 +00:00
parent 4525c4a25b
commit ea94b7b9dd
5 changed files with 11 additions and 12 deletions

View File

@ -696,6 +696,9 @@ Release 0.23.7 - UNRELEASED
MAPREDUCE-4946. Fix a performance problem for large jobs by reducing the MAPREDUCE-4946. Fix a performance problem for large jobs by reducing the
number of map completion event type conversions. (Jason Lowe via sseth) number of map completion event type conversions. (Jason Lowe via sseth)
MAPREDUCE-4822. Unnecessary conversions in History Events. (Chu Tong via
jlowe)
BUG FIXES BUG FIXES
MAPREDUCE-4458. Warn if java.library.path is used for AM or Task MAPREDUCE-4458. Warn if java.library.path is used for AM or Task

View File

@ -178,7 +178,7 @@ public TaskAttemptID getAttemptId() {
/** Get the task type */ /** Get the task type */
public TaskType getTaskType() { public TaskType getTaskType() {
return TaskType.valueOf(taskType.toString()); return taskType;
} }
/** Get the task status */ /** Get the task status */
public String getTaskStatus() { return taskStatus.toString(); } public String getTaskStatus() { return taskStatus.toString(); }

View File

@ -176,11 +176,11 @@ public void setDatum(Object oDatum) {
public TaskID getTaskId() { return attemptId.getTaskID(); } public TaskID getTaskId() { return attemptId.getTaskID(); }
/** Get the attempt id */ /** Get the attempt id */
public TaskAttemptID getAttemptId() { public TaskAttemptID getAttemptId() {
return TaskAttemptID.forName(attemptId.toString()); return attemptId;
} }
/** Get the task type */ /** Get the task type */
public TaskType getTaskType() { public TaskType getTaskType() {
return TaskType.valueOf(taskType.toString()); return taskType;
} }
/** Get the task status */ /** Get the task status */
public String getTaskStatus() { return taskStatus.toString(); } public String getTaskStatus() { return taskStatus.toString(); }

View File

@ -105,11 +105,11 @@ public void setDatum(Object oDatum) {
public TaskID getTaskId() { return attemptId.getTaskID(); } public TaskID getTaskId() { return attemptId.getTaskID(); }
/** Get the task attempt id */ /** Get the task attempt id */
public TaskAttemptID getAttemptId() { public TaskAttemptID getAttemptId() {
return TaskAttemptID.forName(attemptId.toString()); return attemptId;
} }
/** Get the task type */ /** Get the task type */
public TaskType getTaskType() { public TaskType getTaskType() {
return TaskType.valueOf(taskType.toString()); return taskType;
} }
/** Get the task status */ /** Get the task status */
public String getTaskStatus() { return taskStatus.toString(); } public String getTaskStatus() { return taskStatus.toString(); }

View File

@ -95,14 +95,10 @@ public void setDatum(Object oDatum) {
} }
/** Get task id */ /** Get task id */
public TaskID getTaskId() { return TaskID.forName(taskid.toString()); } public TaskID getTaskId() { return taskid; }
/** Get successful task attempt id */ /** Get successful task attempt id */
public TaskAttemptID getSuccessfulTaskAttemptId() { public TaskAttemptID getSuccessfulTaskAttemptId() {
if(successfulAttemptId != null) return successfulAttemptId;
{
return TaskAttemptID.forName(successfulAttemptId.toString());
}
return null;
} }
/** Get the task finish time */ /** Get the task finish time */
public long getFinishTime() { return finishTime; } public long getFinishTime() { return finishTime; }
@ -110,7 +106,7 @@ public TaskAttemptID getSuccessfulTaskAttemptId() {
public Counters getCounters() { return counters; } public Counters getCounters() { return counters; }
/** Get task type */ /** Get task type */
public TaskType getTaskType() { public TaskType getTaskType() {
return TaskType.valueOf(taskType.toString()); return taskType;
} }
/** Get task status */ /** Get task status */
public String getTaskStatus() { return status.toString(); } public String getTaskStatus() { return status.toString(); }