hadoop-mapreduce-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From maha...@apache.org
Subject svn commit: r1130366 - in /hadoop/mapreduce/branches/MR-279: CHANGES.txt yarn/yarn-server/yarn-server-common/src/main/java/org/apache/hadoop/yarn/server/api/records/impl/pb/NodeStatusPBImpl.java
Date Thu, 02 Jun 2011 01:06:15 GMT
Author: mahadev
Date: Thu Jun  2 01:06:14 2011
New Revision: 1130366

URL: http://svn.apache.org/viewvc?rev=1130366&view=rev
Log:
NodeStatus.getNodeHealthStatus().setBlah broken (siddharth seth)

Modified:
    hadoop/mapreduce/branches/MR-279/CHANGES.txt
    hadoop/mapreduce/branches/MR-279/yarn/yarn-server/yarn-server-common/src/main/java/org/apache/hadoop/yarn/server/api/records/impl/pb/NodeStatusPBImpl.java

Modified: hadoop/mapreduce/branches/MR-279/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/mapreduce/branches/MR-279/CHANGES.txt?rev=1130366&r1=1130365&r2=1130366&view=diff
==============================================================================
--- hadoop/mapreduce/branches/MR-279/CHANGES.txt (original)
+++ hadoop/mapreduce/branches/MR-279/CHANGES.txt Thu Jun  2 01:06:14 2011
@@ -5,6 +5,8 @@ Trunk (unreleased changes)
 
     MAPREDUCE-279
 
+    NodeStatus.getNodeHealthStatus().setBlah broken (siddharth seth)
+
     Fix a deadlock in the resourcemanager. (mahadev)
    
     Fix for NPE in TestRMNMRPCResponseId. (mahadev)

Modified: hadoop/mapreduce/branches/MR-279/yarn/yarn-server/yarn-server-common/src/main/java/org/apache/hadoop/yarn/server/api/records/impl/pb/NodeStatusPBImpl.java
URL: http://svn.apache.org/viewvc/hadoop/mapreduce/branches/MR-279/yarn/yarn-server/yarn-server-common/src/main/java/org/apache/hadoop/yarn/server/api/records/impl/pb/NodeStatusPBImpl.java?rev=1130366&r1=1130365&r2=1130366&view=diff
==============================================================================
--- hadoop/mapreduce/branches/MR-279/yarn/yarn-server/yarn-server-common/src/main/java/org/apache/hadoop/yarn/server/api/records/impl/pb/NodeStatusPBImpl.java
(original)
+++ hadoop/mapreduce/branches/MR-279/yarn/yarn-server/yarn-server-common/src/main/java/org/apache/hadoop/yarn/server/api/records/impl/pb/NodeStatusPBImpl.java
Thu Jun  2 01:06:14 2011
@@ -183,13 +183,23 @@ public class NodeStatusPBImpl extends Pr
   @Override
   public NodeHealthStatus getNodeHealthStatus() {
     NodeStatusProtoOrBuilder p = viaProto ? proto : builder;
-    return new NodeHealthStatusPBImpl(p.getNodeHealthStatus());
+    if (nodeHealthStatus != null) {
+      return nodeHealthStatus;
+    }
+    if (!p.hasNodeHealthStatus()) {
+      return null;
+    }
+    nodeHealthStatus = convertFromProtoFormat(p.getNodeHealthStatus());
+    return nodeHealthStatus;
   }
 
   @Override
   public void setNodeHealthStatus(NodeHealthStatus healthStatus) {
     maybeInitBuilder();
-    builder.setNodeHealthStatus(convertToProtoFormat(healthStatus));
+    if (healthStatus == null) {
+      builder.clearNodeHealthStatus();
+    }
+    this.nodeHealthStatus = healthStatus;
   }
 
   /*



Mime
View raw message