Author: mahadev
Date: Mon Dec  8 21:14:24 2008
New Revision: 724609

URL: http://svn.apache.org/viewvc?rev=724609&view=rev
Log:
ZOOKEEPER-248.  QuorumPeer should use Map interface instead of HashMap 
implementation. (nitay joffe via mahadev)

Modified:
    hadoop/zookeeper/trunk/CHANGES.txt
    
hadoop/zookeeper/trunk/src/java/main/org/apache/zookeeper/server/quorum/QuorumPeer.java

Modified: hadoop/zookeeper/trunk/CHANGES.txt
URL: 
http://svn.apache.org/viewvc/hadoop/zookeeper/trunk/CHANGES.txt?rev=724609&r1=724608&r2=724609&view=diff
==============================================================================
--- hadoop/zookeeper/trunk/CHANGES.txt (original)
+++ hadoop/zookeeper/trunk/CHANGES.txt Mon Dec  8 21:14:24 2008
@@ -44,6 +44,9 @@
    ZOOKEEPER-249. QuorumPeer.getClientPort() always returns -1. (nitay 
 joffe via mahadev)
 
+  ZOOKEEPER-248.  QuorumPeer should use Map interface instead of 
+HashMap implementation. (nitay joffe via mahadev)
+
 IMPROVEMENTS:
    
    ZOOKEEPER-64. Log system env information when initializing server and

Modified: 
hadoop/zookeeper/trunk/src/java/main/org/apache/zookeeper/server/quorum/QuorumPeer.java
URL: 
http://svn.apache.org/viewvc/hadoop/zookeeper/trunk/src/java/main/org/apache/zookeeper/server/quorum/QuorumPeer.java?rev=724609&r1=724608&r2=724609&view=diff
==============================================================================
--- 
hadoop/zookeeper/trunk/src/java/main/org/apache/zookeeper/server/quorum/QuorumPeer.java
 (original)
+++ 
hadoop/zookeeper/trunk/src/java/main/org/apache/zookeeper/server/quorum/QuorumPeer.java
 Mon Dec  8 21:14:24 2008
@@ -26,7 +26,7 @@
 import java.nio.ByteBuffer;
 import java.util.ArrayList;
 import java.util.List;
-import java.util.HashMap;
+import java.util.Map;
 
 import org.apache.jute.BinaryInputArchive;
 import org.apache.jute.InputArchive;
@@ -107,7 +107,7 @@
     /**
      * The servers that make up the cluster
      */
-    HashMap<Long, QuorumServer> quorumPeers;
+    Map<Long, QuorumServer> quorumPeers;
     public int getQuorumSize(){
         return quorumPeers.size();
     }
@@ -261,7 +261,7 @@
         QuorumStats.getInstance().setStatsProvider(this);
     }
     
-    public QuorumPeer(HashMap<Long, QuorumServer> quorumPeers, File dataDir,
+    public QuorumPeer(Map<Long, QuorumServer> quorumPeers, File dataDir,
             File dataLogDir, int electionType,
             long myid, int tickTime, int initLimit, int syncLimit,
             NIOServerCnxn.Factory cnxnFactory) throws IOException {
@@ -316,7 +316,7 @@
      * This constructor is only used by the existing unit test code.
      * It defaults to FileLogProvider persistence provider.
      */
-    public QuorumPeer(HashMap<Long,QuorumServer> quorumPeers, File snapDir,
+    public QuorumPeer(Map<Long,QuorumServer> quorumPeers, File snapDir,
             File logDir, int clientPort, int electionAlg,
             long myid, int tickTime, int initLimit, int syncLimit) throws 
IOException {
         this(quorumPeers, snapDir, logDir, electionAlg,
@@ -569,7 +569,7 @@
         this.cnxnFactory = cnxnFactory;
     }
 
-    public void setQuorumPeers(HashMap<Long,QuorumServer> quorumPeers) {
+    public void setQuorumPeers(Map<Long,QuorumServer> quorumPeers) {
         this.quorumPeers = quorumPeers;
     }
 


Reply via email to