incubator-hama-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From edwardy...@apache.org
Subject svn commit: r1026930 - in /incubator/hama/trunk: CHANGES.txt src/java/org/apache/hama/bsp/HeartbeatResponse.java
Date Mon, 25 Oct 2010 01:16:07 GMT
Author: edwardyoon
Date: Mon Oct 25 01:16:07 2010
New Revision: 1026930

URL: http://svn.apache.org/viewvc?rev=1026930&view=rev
Log:
groom servers Map in HeartbeatResponse not correctly serialized

Modified:
    incubator/hama/trunk/CHANGES.txt
    incubator/hama/trunk/src/java/org/apache/hama/bsp/HeartbeatResponse.java

Modified: incubator/hama/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/incubator/hama/trunk/CHANGES.txt?rev=1026930&r1=1026929&r2=1026930&view=diff
==============================================================================
--- incubator/hama/trunk/CHANGES.txt (original)
+++ incubator/hama/trunk/CHANGES.txt Mon Oct 25 01:16:07 2010
@@ -172,6 +172,8 @@ Trunk (unreleased changes)
 
   BUG FIXES
   
+    HAMA-319: groom servers Map in HeartbeatResponse not correctly serialized
+                (Filipe Manana)
     HAMA-317: Remove HBASE_CONF_DIR and HBASE_HEAPSIZE properties (edwardyoon)
     HAMA-315: Uncomment code in checkLocalDirs() (edwardyoon)
     HAMA-314: Remove unnecessary methods from HamaConfiguration (edwardyoon)

Modified: incubator/hama/trunk/src/java/org/apache/hama/bsp/HeartbeatResponse.java
URL: http://svn.apache.org/viewvc/incubator/hama/trunk/src/java/org/apache/hama/bsp/HeartbeatResponse.java?rev=1026930&r1=1026929&r2=1026930&view=diff
==============================================================================
--- incubator/hama/trunk/src/java/org/apache/hama/bsp/HeartbeatResponse.java (original)
+++ incubator/hama/trunk/src/java/org/apache/hama/bsp/HeartbeatResponse.java Mon Oct 25 01:16:07
2010
@@ -20,7 +20,9 @@ package org.apache.hama.bsp;
 import java.io.DataInput;
 import java.io.DataOutput;
 import java.io.IOException;
+import java.util.ArrayList;
 import java.util.HashMap;
+import java.util.List;
 import java.util.Map;
 
 import org.apache.hadoop.conf.Configurable;
@@ -106,8 +108,12 @@ public class HeartbeatResponse implement
     }
     String[] groomServerNames = groomServers.keySet().toArray(new String[0]);
     WritableUtils.writeCompressedStringArray(out, groomServerNames);
-    String[] groomServerAddresses = groomServers.values().toArray(new String[0]);
-    WritableUtils.writeCompressedStringArray(out, groomServerAddresses);
+
+    List<String> groomServerAddresses = new ArrayList<String>(groomServerNames.length);
+    for (String groomName : groomServerNames) {
+      groomServerAddresses.add(groomServers.get(groomName));
+    }
+    WritableUtils.writeCompressedStringArray(out, groomServerAddresses.toArray(new String[0]));
   }
 
   @Override



Mime
View raw message