incubator-hama-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From edwardy...@apache.org
Subject svn commit: r1061682 - /incubator/hama/trunk/src/java/org/apache/hama/bsp/BSPPeer.java
Date Fri, 21 Jan 2011 08:33:04 GMT
Author: edwardyoon
Date: Fri Jan 21 08:33:04 2011
New Revision: 1061682

URL: http://svn.apache.org/viewvc?rev=1061682&view=rev
Log:
Trivial changes: changes Set of peersName to SortedSet.

Modified:
    incubator/hama/trunk/src/java/org/apache/hama/bsp/BSPPeer.java

Modified: incubator/hama/trunk/src/java/org/apache/hama/bsp/BSPPeer.java
URL: http://svn.apache.org/viewvc/incubator/hama/trunk/src/java/org/apache/hama/bsp/BSPPeer.java?rev=1061682&r1=1061681&r2=1061682&view=diff
==============================================================================
--- incubator/hama/trunk/src/java/org/apache/hama/bsp/BSPPeer.java (original)
+++ incubator/hama/trunk/src/java/org/apache/hama/bsp/BSPPeer.java Fri Jan 21 08:33:04 2011
@@ -20,12 +20,12 @@ package org.apache.hama.bsp;
 import java.io.IOException;
 import java.net.InetSocketAddress;
 import java.util.Collection;
-import java.util.HashSet;
 import java.util.Iterator;
 import java.util.List;
 import java.util.Map;
-import java.util.Set;
 import java.util.Map.Entry;
+import java.util.SortedSet;
+import java.util.TreeSet;
 import java.util.concurrent.ConcurrentHashMap;
 import java.util.concurrent.ConcurrentLinkedQueue;
 
@@ -39,8 +39,8 @@ import org.apache.zookeeper.CreateMode;
 import org.apache.zookeeper.KeeperException;
 import org.apache.zookeeper.WatchedEvent;
 import org.apache.zookeeper.Watcher;
-import org.apache.zookeeper.ZooKeeper;
 import org.apache.zookeeper.ZooDefs.Ids;
+import org.apache.zookeeper.ZooKeeper;
 import org.apache.zookeeper.data.Stat;
 
 public class BSPPeer implements Watcher, BSPPeerInterface {
@@ -62,7 +62,7 @@ public class BSPPeer implements Watcher,
     new ConcurrentHashMap<InetSocketAddress, ConcurrentLinkedQueue<BSPMessage>>();
   private final ConcurrentLinkedQueue<BSPMessage> localQueue = 
     new ConcurrentLinkedQueue<BSPMessage>();
-  private Set<String> allPeerNames = new HashSet<String>();
+  private SortedSet<String> allPeerNames = new TreeSet<String>();
   private InetSocketAddress peerAddress;
   private TaskStatus currentTaskStatus;
 
@@ -297,7 +297,7 @@ public class BSPPeer implements Watcher,
    * @param allPeers
    */
   void setAllPeerNames(Collection<String> allPeerNames) {
-    this.allPeerNames = new HashSet<String>(allPeerNames);
+    this.allPeerNames = new TreeSet<String>(allPeerNames);
   }
 
   /**



Mime
View raw message