From adf58e70a04229424902471f9a1ffbd885cd833c Mon Sep 17 00:00:00 2001 From: Mahadev Konar Date: Tue, 1 Nov 2011 04:32:03 +0000 Subject: [PATCH] MAPREDUCE-3317. Rumen TraceBuilder is emiting null as hostname. (Ravi Gummadi via mahadev) git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1195814 13f79535-47bb-0310-9956-ffa450edef68 --- hadoop-mapreduce-project/CHANGES.txt | 3 +++ .../org/apache/hadoop/tools/rumen/LoggedTaskAttempt.java | 7 ++++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/hadoop-mapreduce-project/CHANGES.txt b/hadoop-mapreduce-project/CHANGES.txt index 5a8218d3ce..be81c99ce9 100644 --- a/hadoop-mapreduce-project/CHANGES.txt +++ b/hadoop-mapreduce-project/CHANGES.txt @@ -1906,6 +1906,9 @@ Release 0.23.0 - Unreleased MAPREDUCE-3316. Rebooted link is not working properly. (Bhallamudi Venkata Siva Kamesh via mahadev) + MAPREDUCE-3317. Rumen TraceBuilder is emiting null as hostname. + (Ravi Gummadi via mahadev) + Release 0.22.0 - Unreleased INCOMPATIBLE CHANGES diff --git a/hadoop-mapreduce-project/src/tools/org/apache/hadoop/tools/rumen/LoggedTaskAttempt.java b/hadoop-mapreduce-project/src/tools/org/apache/hadoop/tools/rumen/LoggedTaskAttempt.java index 17246fc096..fde7d0545e 100644 --- a/hadoop-mapreduce-project/src/tools/org/apache/hadoop/tools/rumen/LoggedTaskAttempt.java +++ b/hadoop-mapreduce-project/src/tools/org/apache/hadoop/tools/rumen/LoggedTaskAttempt.java @@ -49,7 +49,6 @@ public class LoggedTaskAttempt implements DeepCompare { long startTime = -1L; long finishTime = -1L; String hostName; - String rackName; long hdfsBytesRead = -1L; long hdfsBytesWritten = -1L; @@ -329,9 +328,11 @@ public String getHostName() { return hostName; } + + // hostName is saved in the format rackName/NodeName void setHostName(String hostName, String rackName) { - this.hostName = hostName == null || this.rackName == null ? null - : hostName.intern() + "/" + rackName.intern(); + this.hostName = hostName == null || rackName == null ? null + : rackName.intern() + "/" + hostName.intern(); } public long getHdfsBytesRead() {