MAPREDUCE-3317. Rumen TraceBuilder is emiting null as hostname. (Ravi Gummadi via mahadev) - Merging r1195814 from trunk.

git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/branch-0.23@1195815 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Mahadev Konar 2011-11-01 04:33:40 +00:00
parent 61e69297d9
commit ff4146e5bb
2 changed files with 7 additions and 3 deletions

View File

@ -1870,6 +1870,9 @@ Release 0.23.0 - Unreleased
MAPREDUCE-3316. Rebooted link is not working properly. MAPREDUCE-3316. Rebooted link is not working properly.
(Bhallamudi Venkata Siva Kamesh via mahadev) (Bhallamudi Venkata Siva Kamesh via mahadev)
MAPREDUCE-3317. Rumen TraceBuilder is emiting null as hostname.
(Ravi Gummadi via mahadev)
Release 0.22.0 - Unreleased Release 0.22.0 - Unreleased
INCOMPATIBLE CHANGES INCOMPATIBLE CHANGES

View File

@ -49,7 +49,6 @@ public class LoggedTaskAttempt implements DeepCompare {
long startTime = -1L; long startTime = -1L;
long finishTime = -1L; long finishTime = -1L;
String hostName; String hostName;
String rackName;
long hdfsBytesRead = -1L; long hdfsBytesRead = -1L;
long hdfsBytesWritten = -1L; long hdfsBytesWritten = -1L;
@ -329,9 +328,11 @@ public class LoggedTaskAttempt implements DeepCompare {
return hostName; return hostName;
} }
// hostName is saved in the format rackName/NodeName
void setHostName(String hostName, String rackName) { void setHostName(String hostName, String rackName) {
this.hostName = hostName == null || this.rackName == null ? null this.hostName = hostName == null || rackName == null ? null
: hostName.intern() + "/" + rackName.intern(); : rackName.intern() + "/" + hostName.intern();
} }
public long getHdfsBytesRead() { public long getHdfsBytesRead() {